Model Prices

API

The app's server function returns the current model catalogue from models.dev (MIT licence) as one compact JSON table. It is free, uses no credits, and needs a SkillSafe app token for this app. The bundled snapshot is a plain static file anyone can fetch.

1. Get a token

Exchange your SkillSafe API key for an app token (valid 30 days). Guest tokens are refused by the live endpoint.

curl -s -X POST https://api.skillsafe.ai/v1/app-api/authorize \
  -H "Authorization: Bearer YOUR_SKILLSAFE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"model-prices"}'
# -> {"ok":true,"data":{"token":"aut_...","expires_at":"..."}}

2. Fetch the live catalogue

GET https://model-prices.skillsafe.ai/api/models with Authorization: Bearer <token>. About 1.5 MB of JSON (much less compressed); cache it for a few minutes rather than calling it per request.

curl -s https://model-prices.skillsafe.ai/api/models \
  -H "Authorization: Bearer YOUR_APP_TOKEN" -o models.json

No token? The bundled snapshot has the same shape: GET https://model-prices.skillsafe.ai/snapshot.json.

3. The response

{
  "v": 1,
  "source": "models.dev",
  "license": "MIT",
  "fetched_at": "2026-10-31T06:16:00.000Z",
  "mods": ["text", "image", "audio", "video", "pdf"],
  "providers": { "anthropic": "Anthropic", "openai": "OpenAI", ... },
  "rows": [ [host, id, name, maker, canonical_id, family,
             input, output, cache_read, cache_write, input_over_200k, output_over_200k,
             context, max_output, input_mods, output_mods, flags,
             released, knowledge, status, kind], ... ]
}
IndexFieldMeaning
0, 1, 2host, id, nameThe API host's id (a key of providers), its model id, and display name.
3, 4, 5maker, canonical_id, familyWho made the model, a cross-host id such as anthropic/claude-sonnet-4-5 (empty when unknown), and the model family.
6 to 11pricesUSD per million tokens: input, output, cached-input read, cache write, and the input and output prices above 200K prompt tokens. null when the host lists none.
12, 13context, max_outputToken limits; null when unknown.
14, 15input_mods, output_modsBit masks over mods: bit 0 text, 1 image, 2 audio, 3 video, 4 pdf.
16flags1 reasoning, 2 tool calls, 4 open weights, 8 structured output, 16 file attachments, 32 sold by its own maker.
17, 18, 19released, knowledge, statusRelease date and knowledge cutoff (YYYY-MM or YYYY-MM-DD), and "", beta, alpha or deprecated.
20kind"" for language models; otherwise image, video, speech, transcription, embedding, reranking or realtime.

4. Errors

HTTPBodyWhat to do
401sign-in requiredMissing, expired or guest token. Get a new token (step 1).
429{"error":{"code":"upstream_429"}}The catalogue source is rate limiting. Wait a minute.
502upstream_unreachable, upstream_<status>, upstream_parse, upstream_emptyThe source did not answer usefully. Retry later or use snapshot.json.
404not_foundOnly /api/models and /api/health exist.