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 field | Meaning |
|---|---|
| page, limit, total, pageCount | Pagination state. Defaults: page 1, limit 50 (maximum 250). |
| hasNextPage, hasPreviousPage | Convenience flags for walking pages. |
| query | Echo of the applied filters, sort, and order. |
| facets | Available filter values: organizations, families, modalities, and benchmarks for models; organizations for image and video models. |
| related | On 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"
}
}| code | Status and meaning |
|---|---|
| INVALID_QUERY | 400 — a query parameter failed validation; details names the offending parameter. |
| MISSING_QUERY | 400 — a required query parameter is missing (compare endpoints). |
| INVALID_COMPARE | 400 — an image or video comparison mixed catalogs; both slugs must belong to the same kind. |
| NOT_FOUND | 404 — the requested slug, benchmark ID, or comparison does not exist. |
| INTERNAL_ERROR | 500 — an unexpected server failure. |
Endpoints
Paths below are relative to /api/v1. Braces mark path parameters.
Models
| Endpoint | Description |
|---|---|
| GET/models | List 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}/related | The related models array only. |
Image models
| Endpoint | Description |
|---|---|
| GET/image-models | List 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
| Endpoint | Description |
|---|---|
| GET/video-models | List 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
| Endpoint | Description |
|---|---|
| GET/benchmarks | Every benchmark with methodology, category, metric, top models, and scored counts. |
| GET/benchmarks/{id} | One benchmark with its top-10 ranking. |
Organizations and releases
| Endpoint | Description |
|---|---|
| GET/organizations | Organization summaries derived from the catalog. |
| GET/releases | Models sorted by release date (newest first by default); accepts the same query parameters as /models. |
Comparisons
| Endpoint | Description |
|---|---|
| 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
| Endpoint | Description |
|---|---|
| GET/api/v1 | Machine-readable index with catalog statistics and endpoint paths. |
| GET/api/openapi.json | OpenAPI 3.1 description of the API. |
Query parameters
/models and /releases accept:
| parameter | Meaning |
|---|---|
| q | Free-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. |
| family | Product-line family ID, e.g. gemini. See meta.facets.families. |
| openSource | true or false (1 and 0 are accepted). license=open and license=closed are aliases. |
| modality | text, image, audio, or video; matches input or output modalities. |
| benchmark | A benchmark ID, e.g. swe-bench-verified. Keeps only models that have a score for it. |
| minScore | Numeric floor applied to the benchmark parameter. Requires benchmark to be set. |
| sort | name, organization, releaseDate, contextWindow, inputPrice, outputPrice, tokensPerSec, slug, or any benchmark ID. Defaults to lmarena-elo. Models without a value sort last. |
| order | asc or desc. Defaults to desc. |
| page | Page number, starting at 1. |
| limit | Results per page, between 1 and 250. Defaults to 50. |
/image-models and /video-models accept a smaller set:
| parameter | Meaning |
|---|---|
| q | Free-text search across name, organization, slug, and summary. |
| organization (alias: org) | Exact organization name. See meta.facets.organizations. |
| openSource | true or false, with the same license aliases as /models. |
| sort | name, organization, releaseDate, slug, price, or elo. Defaults to elo. |
| order | asc or desc. Defaults to desc. |
| page, limit | Same 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.