BYTETOOLS

models.dev API

Free AI model dataset with no key: one JSON document covering providers, models, pricing, context limits and capability flags, community-maintained on GitHub. Tested example included.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the models.dev API?

models.dev publishes a single JSON document describing AI model providers and their models, with no API key. It is keyed by provider and gives each model's pricing, context limits, capability flags and the SDK package and environment variable needed to call it.

This is a dataset rather than a service — one file, community-maintained through pull requests on GitHub, covering the whole landscape. That editorial model is the point: when a provider changes pricing, someone opens a PR and the change is visible in the history, which is more transparent than a scraper you cannot inspect.

The integration-oriented fields set it apart from other model catalogues. Each provider entry carries `npm`, naming the SDK package that talks to it, `env`, listing the environment variables holding its credentials, and `api`, giving the base URL. That turns the file into something a tool can use to configure itself rather than merely display. Structurally it is an object keyed by provider id rather than an array, with `models` nested as another object keyed by model id — so you iterate over keys, not indices, and the document is a couple of megabytes.

Quick facts

Base URL
https://models.dev
Authentication
No API key. It is a static JSON file served from the project's own site.
Rate limit
None beyond ordinary fair use. Fetch once and cache — the file changes when contributors merge updates.
Pricing
Free and open source.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the models.dev API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. Fetch the full model and provider dataset

GET https://models.dev/api.json

curl
curl 'https://models.dev/api.json'
JavaScript (fetch)
const res = await fetch("https://models.dev/api.json");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://models.dev/api.json", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
{
  "hpc-ai": {
    "id": "hpc-ai",
    "env": [
      "HPC_AI_API_KEY"
    ],
    "npm": "@ai-sdk/openai-compatible",
    "api": "https://api.hpc-ai.com/inference/v1",
    "name": "HPC-AI",
    "doc": "https://www.hpc-ai.com/doc/docs/quickstart/",
    "models": {
      "deepseek/deepseek-v4-flash": {
        "id": "deepseek/deepseek-v4-flash",
        "name": "DeepSeek V4 Flash",
        "description": "Fast DeepSeek V4 lane for economical reasoning, coding, and long-context work",
        "family": "deepseek-flash",
        "attachment": false,
        "reasoning": true,
        "reasoning_options": [
          {
            "type": "effort",
            "values": [
              "high",
              "max"
            ]
          }
        ],
        "tool_call": true,
        "interleaved": {
          "field": "reasoning_content"
        },
        "structured_output": true,
        "temperature": true,
        "knowledge": "2025-05",
        "release_date": "2026-04-24",
        "last_updated": "2026-04-24",
        "modalities": {
          "input": [
            "text"
          ],
          "output": [
            "text"
          ]
        },
        "open_weights": true,
        "limit": {
          "context": 1048576,
          "output": 128000
        },
        "cost": {
          "input": 0.14,
          "output": 0.28,
          "cache_read": 0.028
        }
      },
      "deepseek/deepseek-v4-pro": {
        "id": "deepseek/deepseek-v4-pro",
        "name": "DeepSeek V4 Pro",
        "description": "Open MoE flagship with million-token context for coding a

Parameters

ParameterTypeRequiredDescription
(none)n/aOptionalA static document. There are no parameters and no filtering — fetch it and query locally.

Response fields

(root)object
Keyed by provider id such as `hpc-ai` or `anthropic`. Iterate over keys rather than array indices.
[provider].id / namestring
Provider identifier and display name.
[provider].apistring
Base URL for that provider's API.
[provider].npmstring
The SDK package that talks to it, for example `@ai-sdk/openai-compatible`.
[provider].envarray
Environment variable names the SDK expects credentials in.
[provider].docstring
Link to the provider's own documentation.
[provider].modelsobject
Keyed by model id, not an array.
[provider].models[].name / description / familystring
Display name, summary and model family grouping.
[provider].models[].reasoningboolean
Whether the model performs explicit reasoning, with `reasoning_options` describing the effort levels it accepts.
[provider].models[].tool_callboolean
Whether it supports function or tool calling.
[provider].models[].attachmentboolean
Whether it accepts file attachments.
[provider].models[].interleavedobject
How reasoning content is returned, naming the response field it arrives in.

What you can build with the models.dev API

  • Populate a model picker in a developer tool from a single fetch
  • Auto-configure an SDK using the npm package and env variable names
  • Compare capability flags across providers in one place
  • Track pricing changes through the project's public commit history

Common errors and how to fix them

Array iteration fails

Both the root and `models` are objects keyed by id.

Fix: Use key iteration — `Object.entries` or the equivalent. There are no arrays at those levels.

Large payload

One document covers every provider and model.

Fix: Fetch once at startup and cache. There is no filtering or pagination by design.

Missing or stale model

The dataset is community-maintained through pull requests.

Fix: A newly released model appears when someone contributes it. Check the GitHub repository, or open a PR yourself.

Pricing disagrees with the provider

Community data can lag a provider's own change.

Fix: Treat it as a well-maintained reference rather than a billing authority, and verify anything financially significant.

models.dev API — frequently asked questions

Is models.dev free?

Yes, entirely — it is an open source, community-maintained dataset served as a static JSON file with no key and no account.

How is it structured?

As an object keyed by provider id, with each provider's `models` nested as another object keyed by model id. Nothing at those levels is an array, so iterate over keys.

What makes it different from other model catalogues?

The integration fields. Each provider carries the SDK package name, the environment variables for its credentials and its base URL, so a tool can configure itself rather than just display information.

How current is the pricing?

It is updated by contributors through pull requests, so it is usually close but can lag a provider's own announcement. The public commit history makes it easy to see when each figure last changed.

Tools that pair with this API

models.dev is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.