CarsXE is built to be agent-friendly. Whether you are a coding agent onboarding a new project, an LLM reasoning about vehicle data, or an automation pipeline calling REST endpoints, this page covers the features we ship specifically for AI and agent use cases.

---

## Browser-based agent onboarding

Getting a CarsXE API key from inside any AI agent — Claude Code, Claude Desktop, Cursor, Codex CLI, Gemini CLI, or any other coding assistant — takes just a few steps with no CLI install required. The agent directs you to a browser page, waits for you to authorize, then retrieves and stores your key automatically.

<Note>
  The complete machine-readable skill document for agents is available at
  `https://api.carsxe.com/agent-onboarding/SKILL.md`. Agents that support skill discovery (such as Claude Code) will
  pick this up automatically.
</Note>

### Step 1 — Give your agent the onboarding skill

Pass the skill document URL to your agent so it knows exactly how to authenticate:

> "Use this skill to get a CarsXE API key: https://api.carsxe.com/agent-onboarding/SKILL.md"

The agent fetches the skill, generates secure session parameters, then presents you with a clickable link to open in your browser.

### Step 2 — Authorize in the browser

Click the link the agent provides. You will be taken to the CarsXE authorization page where you can sign in or create an account and approve access. No typing required — just click **Authorize**.

### Step 3 — Your agent retrieves the key

Once you click Authorize, the agent polls in the background and retrieves your API key. It stores it automatically (typically as `CARSXE_API_KEY` in your environment or project `.env` file).

### Step 4 — Start making calls

Your agent can immediately start making vehicle data calls on your behalf:

> "Decode VIN WBAFR7C57CC811956"
> "What is the market value of this vehicle with 50,000 miles?"
> "Check for any open recalls."

---

## Machine-readable documentation (`Accept: text/markdown`)

CarsXE documentation pages support HTTP content negotiation. Send `Accept: text/markdown` on any documentation, support, or guide page to receive clean Markdown instead of HTML — fewer tokens, no layout markup, and higher signal for RAG pipelines and LLM context windows.

### How to use it

<CodeGroup title="Terminal">

```bash
# Any docs page as Markdown
curl -H "Accept: text/markdown" https://api.carsxe.com/docs/quickstart

# Specific API reference page
curl -H "Accept: text/markdown" https://api.carsxe.com/docs/v1/specifications

# Direct Markdown endpoint — no content negotiation needed
curl https://api.carsxe.com/api/markdown/docs/v1/specifications
```

</CodeGroup>

### Supported content types

The site produces two content types:

| Type            | Description                                      |
| --------------- | ------------------------------------------------ |
| `text/html`     | Default browser response                         |
| `text/markdown` | Clean Markdown — no layout, no navigation chrome |

If the `Accept` header explicitly excludes both (for example `Accept: application/pdf`), the server returns `406 Not Acceptable` with a plain-text body listing the available types.

### The `Vary: Accept` header

All responses include `Vary: Accept` so HTTP caches store separate entries for the HTML and Markdown representations of the same URL.

### The `Link: rel="alternate"` header

HTML responses on documentation, support, and guide pages include a `Link` header advertising the direct Markdown URL. Agents that inspect response headers can discover the Markdown endpoint without making a second request.

<CodeGroup title="Response Headers">

```bash
Link: </api/markdown/docs/v1/specifications>; rel="alternate"; type="text/markdown"
Vary: Accept
```

</CodeGroup>

### Direct Markdown endpoint

The `/api/markdown/[[...slug]]` route serves `text/markdown` unconditionally — no `Accept` header required. Use it when you want to hard-code the Markdown URL in a retrieval pipeline or a prompt template.

<CodeGroup title="Terminal">

```bash
curl https://api.carsxe.com/api/markdown/docs/quickstart
curl https://api.carsxe.com/api/markdown/docs/authentication
curl https://api.carsxe.com/api/markdown/docs/v1/specifications
curl https://api.carsxe.com/api/markdown/docs/v2/market-value
curl https://api.carsxe.com/api/markdown/support/ARTICLE_SLUG
curl https://api.carsxe.com/api/markdown/guides/GUIDE_SLUG
```

</CodeGroup>

Responses include `Cache-Control: s-maxage=300, stale-while-revalidate=86400` and `Vary: Accept`.

---

## Site index for LLMs (`llms.txt`)

The site exposes a machine-readable index at `/llms.txt`. This document provides a plain-text overview of CarsXE for language models — product description, all API endpoints with pricing, subscription tiers, quick links, and recent blog posts. It is generated on each request with live pricing data so models always see current overage rates and tier names.

<CodeGroup title="Terminal">

```bash
curl https://api.carsxe.com/llms.txt
```

</CodeGroup>

---

## Making API calls from an agent

All endpoints accept `key=YOUR_API_KEY` as a query parameter — the same environment variable the onboarding flow stores. POST endpoints also send the body as JSON with `Content-Type: application/json`.

### Vehicle Specifications (VIN Decode)

Decode a VIN and retrieve full vehicle specifications: make, model, year, engine, trim, equipment, and more. See [full reference](/docs/v1/specifications).

<CodeGroup title="Request" tag="GET" label="/specs">

```bash
curl -G https://api.carsxe.com/specs \
  -d key=YOUR_API_KEY \
  -d vin=WBAFR7C57CC811956
```

</CodeGroup>

### Market Value

Estimate retail, trade-in, and auction values for a vehicle by VIN, with optional mileage, state, and condition adjustments. See [full reference](/docs/v2/market-value).

<CodeGroup title="Request" tag="GET" label="/v2/marketvalue">

```bash
curl -G https://api.carsxe.com/v2/marketvalue \
  -d key=YOUR_API_KEY \
  -d vin=WBAFR7C57CC811956 \
  -d mileage=50000 \
  -d state=CA \
  -d condition=clean
```

</CodeGroup>

### Vehicle History

Retrieve a comprehensive history report including title records, junk/salvage events, and insurance information for a VIN. See [full reference](/docs/v1/history).

<CodeGroup title="Request" tag="GET" label="/history">

```bash
curl -G https://api.carsxe.com/history \
  -d key=YOUR_API_KEY \
  -d vin=WBAFR7C57CC811956
```

</CodeGroup>

### Vehicle Recalls

Check for open safety recalls associated with a VIN. See [full reference](/docs/v1/vehicle-recalls).

<CodeGroup title="Request" tag="GET" label="/v1/recalls">

```bash
curl -G https://api.carsxe.com/v1/recalls \
  -d key=YOUR_API_KEY \
  -d vin=WBAFR7C57CC811956
```

</CodeGroup>

### Lien & Theft Check

Check whether a vehicle has active liens or has been reported stolen. See [full reference](/docs/v1/lien-theft).

<CodeGroup title="Request" tag="GET" label="/v1/lien-theft">

```bash
curl -G https://api.carsxe.com/v1/lien-theft \
  -d key=YOUR_API_KEY \
  -d vin=WBAFR7C57CC811956
```

</CodeGroup>

### Plate Decoder

Look up a vehicle by license plate number. Supports 50+ countries. See [full reference](/docs/v2/plate-decoder).

<CodeGroup title="Request" tag="GET" label="/v2/platedecoder">

```bash
curl -G https://api.carsxe.com/v2/platedecoder \
  -d key=YOUR_API_KEY \
  -d plate=7XER187 \
  -d country=US \
  -d state=CA
```

</CodeGroup>

### International VIN Decoder

Decode a non-US VIN from European, Asian, and other markets. See [full reference](/docs/v1/international-vin-decoder).

<CodeGroup title="Request" tag="GET" label="/v1/international-vin-decoder">

```bash
curl -G https://api.carsxe.com/v1/international-vin-decoder \
  -d key=YOUR_API_KEY \
  -d vin=WF0MXXGBWM8R43240
```

</CodeGroup>

### Vehicle Images

Retrieve vehicle photos by make, model, and year. Supports filtering by color, angle, photo type, and size. See [full reference](/docs/v1/images).

<CodeGroup title="Request" tag="GET" label="/images">

```bash
curl -G https://api.carsxe.com/images \
  -d key=YOUR_API_KEY \
  -d make=BMW \
  -d model=5-Series \
  -d year=2012
```

</CodeGroup>

### Year / Make / Model

Look up vehicle data when you don't have a VIN — search by year, make, and model instead. See [full reference](/docs/v1/year-make-model).

<CodeGroup title="Request" tag="GET" label="/v1/ymm">

```bash
curl -G https://api.carsxe.com/v1/ymm \
  -d key=YOUR_API_KEY \
  -d year=2012 \
  -d make=BMW \
  -d model=5-Series
```

</CodeGroup>

### Plate Image Recognition

Extract and decode a license plate number from an image URL. See [full reference](/docs/v1/plate-image-recognition).

<CodeGroup title="Request" tag="POST" label="/platerecognition">

```bash
curl -X POST "https://api.carsxe.com/platerecognition?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"image_url": "https://imagedelivery.net/moyiiSImjJPI_EZVxNMBBw/f49aed53-d736-4370-f3f4-97418841c800/public"}'
```

</CodeGroup>

### VIN OCR

Extract a VIN from a photo of a VIN plate or dashboard sticker. See [full reference](/docs/v1/vin-ocr).

<CodeGroup title="Request" tag="POST" label="/v1/vinocr">

```bash
curl -X POST "https://api.carsxe.com/v1/vinocr?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"image_url": "https://user-images.githubusercontent.com/5663423/30922082-64edb4fa-a3a8-11e7-873e-3fbcdce8ea3a.png"}'
```

</CodeGroup>

### OBD Codes Decoder

Decode a diagnostic trouble code (DTC) from an OBD-II scanner — over 3,000 codes supported. See [full reference](/docs/v1/obd-codes-decoder).

<CodeGroup title="Request" tag="GET" label="/obdcodesdecoder">

```bash
curl -G https://api.carsxe.com/obdcodesdecoder \
  -d key=YOUR_API_KEY \
  -d code=P0300
```

</CodeGroup>

---

## MCP server for AI tools

For interactive AI editors and chat clients (Claude Desktop, Cursor, VS Code, Windsurf), the CarsXE MCP server is the recommended integration path — it exposes all endpoints as named tools and formats responses as Markdown automatically.

See the [MCP Quickstart Guide](/docs/integrations/mcp-quickstart) for installation instructions for each editor.

---

## What's next?

- [Agent onboarding skill document](/agent-onboarding/SKILL.md) — machine-readable PKCE auth flow
- [llms.txt](/llms.txt) — full site index for LLMs
- [MCP Quickstart](/docs/integrations/mcp-quickstart) — MCP server for Claude, Cursor, VS Code, Windsurf
- [Claude Code Plugin](/docs/integrations/claude-quickstart) — slash commands and auto-invoked skills
- [CLI Quickstart](/docs/integrations/cli-quickstart) — terminal tool for agent-driven shell workflows
- [Authentication](/docs/authentication) — API key management
- [Quickstart](/docs/quickstart) — first API call walkthrough
