LLMcompare

Search

Search for a command to run...

API Documentation

LLMcompare exposes the catalog as a read-only REST API. It serves the same curated data as the site: model specifications, pricing, context windows, benchmarks, releases, organizations, and comparisons.

Overview

  • Read-only: GET, HEAD, and OPTIONS only. No authentication or API keys required.
  • CORS is open: responses are sent with Access-Control-Allow-Origin: * so you can call the API from any client.
  • Responses are cacheable for 60 seconds in browsers and one hour in shared caches, with one day of stale-while-revalidate.
  • The catalog is a static, hand-curated snapshot. Every response carries meta.dataFreshness, the date the data was last refreshed.

Base URL

All versioned endpoints live under /api/v1:

/api/v1

The machine-readable index at /api/v1 lists every endpoint with catalog statistics, and /api/openapi.json serves an OpenAPI 3.1 description of the API.

Response envelope

Every successful response is wrapped in a common envelope: data holds the payload and meta holds API version, data freshness, and endpoint-specific fields.

{
  "data": [ … ],
  "meta": {
    "apiVersion": "v1",
    "dataFreshness": "2026-09-29",
    "page": 1,
    "limit": 50,
    "total": …,
    "pageCount": …,
    "hasNextPage": true,
    "hasPreviousPage": false,
    "query": { … },
    "facets": { … }
  }
}

For list endpoints, meta also includes pagination, an echo of the applied query, and filter facets:

meta fieldMeaning
page, limit, total, pageCountPagination state. Defaults: page 1, limit 50 (maximum 250).
hasNextPage, hasPreviousPageConvenience flags for walking pages.
queryEcho of the applied filters, sort, and order.
facetsAvailable filter values: organizations, families, modalities, and benchmarks for models; organizations for image and video models.
relatedOn GET /models/{slug} only: same-family models, newest first.

Errors

Errors use a parallel envelope with an error object instead of data. Validation failures return 400; unknown slugs or IDs return 404.

{
  "error": {
    "code": "NOT_FOUND",
    "message": "Model 'gpt-99' was not found.",
    "details": { "resource": "model", "value": "gpt-99" }
  },
  "meta": {
    "apiVersion": "v1",
    "dataFreshness": "2026-09-29"
  }
}
codeStatus and meaning
INVALID_QUERY400 — a query parameter failed validation; details names the offending parameter.
MISSING_QUERY400 — a required query parameter is missing (compare endpoints).
INVALID_COMPARE400 — an image or video comparison mixed catalogs; both slugs must belong to the same kind.
NOT_FOUND404 — the requested slug, benchmark ID, or comparison does not exist.
INTERNAL_ERROR500 — an unexpected server failure.

Endpoints

Paths below are relative to /api/v1. Braces mark path parameters.

Models

EndpointDescription
GET/modelsList models with search, filters, sorting, and pagination.
GET/models/{slug}One model, including specs, pricing, and benchmark scores; meta.related lists same-family models.
GET/models/{slug}/relatedThe related models array only.

Image models

EndpointDescription
GET/image-modelsList image models with search, filters, sorting, and pagination.
GET/image-models/{slug}One image model.
GET/image-models/compare?a={slug}&b={slug}Compare two image models. Both slugs must be image models; mixed kinds return 400.
GET/image-models/compare/{a}-vs-{b}The same comparison addressed by its canonical slug.

Video models

EndpointDescription
GET/video-modelsList video models with search, filters, sorting, and pagination.
GET/video-models/{slug}One video model.
GET/video-models/compare?a={slug}&b={slug}Compare two video models. Both slugs must be video models; mixed kinds return 400.
GET/video-models/compare/{a}-vs-{b}The same comparison addressed by its canonical slug.

Benchmarks

EndpointDescription
GET/benchmarksEvery benchmark with methodology, category, metric, top models, and scored counts.
GET/benchmarks/{id}One benchmark with its top-10 ranking.

Organizations and releases

EndpointDescription
GET/organizationsOrganization summaries derived from the catalog.
GET/releasesModels sorted by release date (newest first by default); accepts the same query parameters as /models.

Comparisons

EndpointDescription
GET/compare?a={slug}&b={slug}Compare two models: verdict and per-dimension breakdown.
GET/compare/{a}-vs-{b}The same comparison addressed by its canonical slug.

Index and schema

EndpointDescription
GET/api/v1Machine-readable index with catalog statistics and endpoint paths.
GET/api/openapi.jsonOpenAPI 3.1 description of the API.

Query parameters

/models and /releases accept:

parameterMeaning
qFree-text search across name, organization, slug, and summary. Maximum 200 characters.
organization (alias: org)Exact organization name, e.g. Google. See meta.facets.organizations for valid values.
familyProduct-line family ID, e.g. gemini. See meta.facets.families.
openSourcetrue or false (1 and 0 are accepted). license=open and license=closed are aliases.
modalitytext, image, audio, or video; matches input or output modalities.
benchmarkA benchmark ID, e.g. swe-bench-verified. Keeps only models that have a score for it.
minScoreNumeric floor applied to the benchmark parameter. Requires benchmark to be set.
sortname, organization, releaseDate, contextWindow, inputPrice, outputPrice, tokensPerSec, slug, or any benchmark ID. Defaults to lmarena-elo. Models without a value sort last.
orderasc or desc. Defaults to desc.
pagePage number, starting at 1.
limitResults per page, between 1 and 250. Defaults to 50.

/image-models and /video-models accept a smaller set:

parameterMeaning
qFree-text search across name, organization, slug, and summary.
organization (alias: org)Exact organization name. See meta.facets.organizations.
openSourcetrue or false, with the same license aliases as /models.
sortname, organization, releaseDate, slug, price, or elo. Defaults to elo.
orderasc or desc. Defaults to desc.
page, limitSame pagination behavior as /models.

Examples

# Five highest-scoring models on SWE-bench Verified
GET /api/v1/models?benchmark=swe-bench-verified&limit=5

# Open-weight Google models, largest context window first
GET /api/v1/models?organization=Google&openSource=true&sort=contextWindow

# One model, with same-family related models in meta
GET /api/v1/models/claude-opus-5

# Compare two models, or address the comparison by canonical slug
GET /api/v1/compare?a=claude-opus-5&b=gpt-5-6-sol
GET /api/v1/compare/claude-opus-5-vs-gpt-5-6-sol

The same calls work from a local dev server with curl, for example:

curl -s "http://localhost:3000/api/v1/models?benchmark=swe-bench-verified&limit=5"

Data notes

  • Values that cannot be verified from a trustworthy source are omitted rather than estimated. Treat absent fields as unknown, never as zero.
  • Benchmark scores keep each benchmark's native metric and version, so scores with the same name are not always comparable across benchmark variants. Check the benchmark metadata returned by /benchmarks before comparing.
  • Some coding benchmarks evaluate an agent system (scaffold, tools, harness) rather than a raw model; the benchmark metadata notes this where relevant.
  • Prices and specifications are point-in-time observations. Verify critical numbers with the provider before relying on them.

Back to catalog