API reference
Public REST API for LLMs, agents and scripts. Free, read-only, no API key required.
Quickstart
# cheapest offers for a model
curl -s "https://costsaver.coopermed.beget.tech/api/v1/pricing?model=gpt-4o&sort=price_input&limit=5"
# what a specific model costs at every provider
curl -s "https://costsaver.coopermed.beget.tech/api/v1/models/deepseek-v3-2"
The canonical base path is /api/v1;
/api is an alias of v1
(same endpoints, e.g. /api/providers).
Bare /api returns a JSON index of the API.
Interactive playground: /docs,
machine schema: /openapi.json.
Conventions
- All endpoints are GET and return JSON. No authentication; responses are safe to cache.
- List endpoints return
{"items": [...], "meta": {"total", "limit", "offset"}}; detail endpoints return a single object. - Money is a string (lossless Decimal):
price_input_per_mtok/price_output_per_mtokare USD per 1M tokens,usd_per_houris USD per hour. checked_at/last_synced_atare ISO 8601 timestamps — use them to judge data freshness.is_available= the provider currently lists this offer.- Rate limit: per client IP, answered with 429 and a
Retry-Afterheader. Fair use — please cache.
GET /api/v1/providers
All active providers in the catalog.
| Param | Default | Meaning |
|---|---|---|
q |
— | substring match on provider name/slug |
limit · offset |
100 · 0 | pagination (limit ≤ 500); total count is in meta.total |
GET /api/v1/providers/{slug}
One provider plus aggregate counts of its catalog entries (models_count, gpu_offers_count, agent_plans_count) and last_synced_at.
GET /api/v1/models
All models with per-model aggregates: providers_count and min prices across available offers.
| Param | Default | Meaning |
|---|---|---|
model_type |
— | text | image | video | speech | transcription | embeddings | rerank | decisions | audio |
vendor |
— | exact vendor, e.g. anthropic, moonshotai |
q |
— | substring match on model name/slug/vendor |
limit · offset |
100 · 0 | pagination |
GET /api/v1/models/{slug}
One model plus every provider offer: prices, upstream model id, effective context window, availability, last check time.
| Param | Default | Meaning |
|---|---|---|
available |
— | true / false — filter offers by availability |
GET /api/v1/pricing
Flat provider × model offer matrix — the "who is cheapest" endpoint. Rows join model and provider fields.
| Param | Default | Meaning |
|---|---|---|
sort |
— | price_input | price_output — ascending, offers without a price last |
model |
— | substring match on model name/slug |
provider |
— | provider slug |
model_type |
— | same taxonomy as /models |
available |
true | true / false / omit to include everything |
limit · offset |
100 · 0 | pagination |
GET /api/v1/pricing?model=deepseek-v3.2&sort=price_input&limit=1
{
"items": [{
"provider_slug": "deepinfra",
"model_slug": "deepseek-v3-2",
"price_input_per_mtok": "0.270000",
"price_output_per_mtok": "0.400000",
"context_window": 163840,
"is_available": true,
"checked_at": "2026-09-26T12:00:00Z"
}],
"meta": { "total": 12, "limit": 1, "offset": 0 }
}
GET /api/v1/gpus
Dedicated GPU rental offers, priced per hour.
| Param | Default | Meaning |
|---|---|---|
category |
— | containers | llm_deploy |
gpu_type |
— | substring, e.g. B200, H100 |
provider |
— | provider slug |
available |
— | true / false |
limit · offset |
100 · 0 | pagination |
GET /api/v1/agent-plans
Managed agent-framework hosting plans across providers.
| Param | Default | Meaning |
|---|---|---|
agent_slug |
— | framework id, e.g. openclaw |
provider |
— | provider slug |
limit · offset |
100 · 0 | pagination |
GET /api/v1/benchmarks
Curated benchmark scores for catalog models.
| Param | Default | Meaning |
|---|---|---|
benchmark |
— | substring, e.g. MMLU |
model |
— | substring match on model name/slug |
limit · offset |
100 · 0 | pagination |
Errors
Unknown slug → 404 {"detail": "..."}.
Invalid parameter (e.g. limit > 500, unsupported sort) → 422 with a field-level description.
Rate limited → 429 plus Retry-After seconds.
Also for machines
-
GET /api/search/suggest?q=claude— JSON search suggestions (the same data that powers the site search box): matching models with the cheapest input price and providers, with relative links into the catalog. -
GET /llms.txt— a plain-text index of the whole catalog in the llms.txt convention: a short site summary followed by links to every provider and model page. -
GET /sitemap.xml— a standard XML sitemap of all indexable pages for search engines.