CarsXE Skill
CarsXE provides a REST API for comprehensive vehicle data. All endpoints are at
https://api.carsxe.com and require an API key passed as ?key=YOUR_API_KEY.
API Key setup: The user must have a CarsXE API key from https://api.carsxe.com/dashboard/developer.
If no key is configured, ask the user to provide it before making any API calls.
See references/api-reference.md for full endpoint details, parameters, and response formats.
Quick API Map
| User intent | Endpoint | Parameters |
|---|
| Decode a VIN / get specs | INLINECODE3 | INLINECODE4 |
| Decode a license plate |
GET /platedecoder |
plate,
country (required),
state (optional) |
| Market value |
GET /marketvalue |
vin |
| Vehicle history report |
GET /history |
vin |
| Vehicle images |
GET /images |
make,
model + optional filters |
| Safety recalls |
GET /recalls |
vin |
| Lien & theft check |
GET /lientheft |
vin |
| International VIN |
GET /internationalvin |
vin |
| Year/Make/Model lookup |
GET /ymm |
year,
make,
model, optional
trim |
| OBD code diagnosis |
GET /obd |
code |
| VIN OCR from image |
POST /vinocr |
imageUrl in JSON body |
| Plate OCR from image |
POST /platerecognition |
imageUrl in JSON body |
Workflow
1. Authenticate
Always confirm or ask for the API key before making requests. The key is passed as a query param:
CODEBLOCK0
2. Choose the right endpoint
Match the user's query to the table above. When context is ambiguous:
- - VIN provided → prefer
/specs first, then chain to other endpoints as needed - Plate provided → use
/platedecoder to resolve VIN, then chain if needed - Make/Model/Year only → use
/ymm or INLINECODE36 - OBD code (P/C/B/U + digits) → use INLINECODE37
- Image URL provided → use
/vinocr or /platerecognition (POST)
3. Chain requests when helpful
A common power workflow: plate → VIN → specs + history + recalls in parallel.
Example:
"Is this plate stolen and does it have open recalls?"
- 1.
GET /platedecoder → extract VIN - In parallel:
GET /lientheft + INLINECODE42
4. Present results
Format output clearly with sections per API call. Use Markdown tables or lists for specs,
highlight important findings (open recalls, theft records, salvage titles) prominently.
Error Handling
| HTTP Status | Meaning | Action |
|---|
| 401 / INLINECODE43 | Bad or missing API key | Ask user to check their key |
| 404 / INLINECODE44 |
VIN/plate not found in database | Inform user, suggest double-checking |
| 429 | Rate limit exceeded | Wait and retry, inform user |
| 5xx | Server error | Retry once, then report error |
Always check the error field in JSON responses — CarsXE sometimes returns HTTP 200 with an error body.
Examples
"What are the specs for VIN WBAFR7C57CC811956?"
→ INLINECODE46
"Decode California plate 7XER187"
→ INLINECODE47
"What's my car worth? VIN WBAFR7C57CC811956"
→ INLINECODE48
"Does this car have any recalls? 1C4JJXR64PW696340"
→ INLINECODE49
"My check engine light shows P0300"
→ INLINECODE50
"Extract the VIN from this photo: https://example.com/vin.jpg"
→ POST https://api.carsxe.com/vinocr?key=KEY with body {"imageUrl":"https://example.com/vin.jpg"}
Reference Files
- -
references/api-reference.md — Full parameter lists, response field descriptions, and edge cases for all 11 endpoints. Read this when you need exact field names or want to use optional filters.
CarsXE 技能
CarsXE 提供用于获取全面车辆数据的 REST API。所有端点的地址均为 https://api.carsxe.com,并且需要通过 ?key=YOURAPIKEY 传递 API 密钥。
API 密钥设置:用户必须从 https://api.carsxe.com/dashboard/developer 获取 CarsXE API 密钥。
如果未配置密钥,请在发起任何 API 调用前要求用户提供。
有关完整的端点详情、参数和响应格式,请参阅 references/api-reference.md。
快速 API 映射
| 用户意图 | 端点 | 参数 |
|---|
| 解码 VIN / 获取规格 | GET /specs | vin |
| 解码车牌 |
GET /platedecoder | plate、country(必填)、state(可选)|
| 市场价值 | GET /marketvalue | vin |
| 车辆历史报告 | GET /history | vin |
| 车辆图片 | GET /images | make、model + 可选过滤器 |
| 安全召回 | GET /recalls | vin |
| 留置权与盗窃检查 | GET /lientheft | vin |
| 国际 VIN | GET /internationalvin | vin |
| 年份/品牌/型号查询 | GET /ymm | year、make、model、可选 trim |
| OBD 代码诊断 | GET /obd | code |
| 从图片中识别 VIN | POST /vinocr | JSON 正文中的 imageUrl |
| 从图片中识别车牌 | POST /platerecognition | JSON 正文中的 imageUrl |
工作流程
1. 身份验证
在发起请求前,始终确认或询问 API 密钥。密钥作为查询参数传递:
https://api.carsxe.com/specs?key=USERAPIKEY&vin=WBAFR7C57CC811956
2. 选择正确的端点
将用户的查询与上表匹配。当上下文不明确时:
- - 提供了 VIN → 优先使用 /specs,然后根据需要链接到其他端点
- 提供了车牌 → 使用 /platedecoder 解析 VIN,然后根据需要链接
- 仅提供了品牌/型号/年份 → 使用 /ymm 或 /images
- OBD 代码(P/C/B/U + 数字)→ 使用 /obd
- 提供了图片 URL → 使用 /vinocr 或 /platerecognition(POST)
3. 在必要时链接请求
一个常见的强大工作流程:车牌 → VIN → 并行获取规格 + 历史 + 召回。
示例:
这个车牌是否被盗?是否有未处理的召回?
- 1. GET /platedecoder → 提取 VIN
- 并行执行:GET /lientheft + GET /recalls
4. 呈现结果
按每次 API 调用分节清晰格式化输出。使用 Markdown 表格或列表显示规格,
突出显示重要发现(未处理的召回、盗窃记录、报废车记录)。
错误处理
| HTTP 状态 | 含义 | 操作 |
|---|
| 401 / invalid key | API 密钥错误或缺失 | 要求用户检查密钥 |
| 404 / no results |
数据库中未找到 VIN/车牌 | 告知用户,建议重新检查 |
| 429 | 超出速率限制 | 等待后重试,告知用户 |
| 5xx | 服务器错误 | 重试一次,然后报告错误 |
始终检查 JSON 响应中的 error 字段——CarsXE 有时会返回 HTTP 200 但包含错误正文。
示例
VIN 为 WBAFR7C57CC811956 的车辆规格是什么?
→ GET https://api.carsxe.com/specs?key=KEY&vin=WBAFR7C57CC811956
解码加州车牌 7XER187
→ GET https://api.carsxe.com/platedecoder?key=KEY&plate=7XER187&state=CA&country=US
我的车值多少钱?VIN 为 WBAFR7C57CC811956
→ GET https://api.carsxe.com/marketvalue?key=KEY&vin=WBAFR7C57CC811956
这辆车有召回吗?1C4JJXR64PW696340
→ GET https://api.carsxe.com/recalls?key=KEY&vin=1C4JJXR64PW696340
我的发动机故障灯显示 P0300
→ GET https://api.carsxe.com/obd?key=KEY&code=P0300
从这张照片中提取 VIN:https://example.com/vin.jpg
→ POST https://api.carsxe.com/vinocr?key=KEY,正文为 {imageUrl:https://example.com/vin.jpg}
参考文件
- - references/api-reference.md — 所有 11 个端点的完整参数列表、响应字段描述和边界情况。当需要确切的字段名称或希望使用可选过滤器时,请阅读此文件。