Every record in the directory is machine-readable: read-only JSON endpoints are open cross-origin, corrections go through a protected write endpoint, and AI clients can attach the directory as MCP.
No auth, Access-Control-Allow-Origin: *, cached for 5 minutes. Prices are per 1M tokens.
| Path | Contents |
|---|---|
/api/v1/all.json | Full snapshot (vendors, models, suppliers, prices, changes) |
/api/v1/models.json | Models with official prices and specs |
/api/v1/vendors.json | Vendor directory |
/api/v1/offers.json | Token supplier directory |
/api/v1/prices.json | Per-model, per-supplier price rows |
/api/v1/changes.json | Price and supply changelog |
/llms.txt | Site index for LLMs |
curl -s https://kunlab.cn/api/v1/prices.json | head -c 400
The write endpoint is separate from the read API: submissions land in a review queue and only change published data after verification.
POST https://kunlab.cn/api/v1/corrections/public — public submissions, rate limited to 5 per IP per hour
POST https://kunlab.cn/api/v1/corrections — partner endpoint, requires an X-KunLab-Key header
curl -X POST https://kunlab.cn/api/v1/corrections/public \
-H 'Content-Type: application/json' \
-d '{"model":"claude-fable-5-2","offer":"ohmygpt","price_in":7.04,
"price_out":35.2,"currency":"USD","source_url":"https://example.com/pricing",
"note":"页面显示的输入价","contact":"you@example.com"}'
The same SQLite source, exposed as MCP tools to AI clients (Claude Desktop / Cursor / your own agent).
{
"mcpServers": {
"kunlab-directory": {
"command": "/srv/kunlab-directory/.venv/bin/python",
"args": ["/srv/kunlab-directory/scripts/mcp_server.py"]
}
}
}
Tools: search_models · get_model · get_price · list_vendors · list_offers · price_index