Skip to main content
$ AIPriceBoardbeta

API reference

Public REST API for LLMs, agents and scripts. Read endpoints are free and need no key; providers can also push their own catalog data with an ingest key.

Quickstart

# cheapest offers for a model
curl -s "https://aipriceboard.com/api/v1/pricing?model=gpt-4o&sort=price_input&limit=5"

# what a specific model costs at every provider
curl -s "https://aipriceboard.com/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

  • Read endpoints are GET and return JSON. No authentication and no API key required; 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_mtok are USD per 1M tokens, usd_per_hour is USD per hour.
  • checked_at / last_synced_at are 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-After header. Fair use — please cache.

GET /api/v1/providers

All active providers with logos, training/retention/BYOK policies, headquarters and terms/privacy links.

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 with metadata and 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

Provider ingest API (write)

Listed providers can push their own catalog data — model pricing, GPU rental offers and agent hosting plans — instead of waiting for our crawlers. Authentication is a Bearer ingest key issued in our admin panel (shown once at creation; it can be revoked there at any time):

curl -s -X POST https://aipriceboard.com/api/v1/ingest/models \
  -H "Authorization: Bearer apb_…your-ingest-key…" \
  -H "Content-Type: application/json" \
  -d '{
    "models": [{
      "id": "my-org/my-model-v2",
      "name": "My Model v2",
      "price_input_per_mtok": "0.27",
      "price_output_per_mtok": "1.10",
      "context_window": 163840,
      "is_available": true
    }]
  }'

Endpoints:

  • POST /api/v1/ingest/models — upsert model offers. id is your upstream model id; models are matched to the shared catalog automatically. Prices are USD per 1M tokens, 0 < x ≤ 100. Optional delist_missing: true marks your models absent from the batch as unavailable.
  • POST /api/v1/ingest/gpus — upsert GPU rental offers (identity: category containers | llm_deploy + gpu_config, price usd_per_hour). Optional replace: true deletes offers absent from the batch.
  • POST /api/v1/ingest/agent-plans — upsert agent hosting plans (identity: agent_slug + plan_id). Same optional replace semantics.
  • GET /api/v1/ingest/catalog — your own current rows as we store them; diff against it before pushing.

A push responds immediately with a tally: {"accepted", "created", "updated", "delisted", "deleted", "errors": [{"index", "message"}]} — invalid items are rejected individually without affecting the rest of the batch, and every push is recorded in our sync journal. Batches are capped at 500 items. Ask us via the contact page to get a key.

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.