Developer

Models.dev: Open source database for AI model specs and pricing

Models.dev is a new open source project that compiles AI model specifications, pricing, and capabilities into a single community maintained database. The project provides an API for programmatic access, supports SVG provider logos, and encourages contributions via pull requests with TOML based model definitions.

Neura News

Neura News

Neura Market Editorial

May 23, 20264 min read
Models.dev: Open source database for AI model specs and pricing

A new open source project aims to solve the problem of finding reliable information about AI models in one place. Models.dev is a community driven database that tracks model specifications, pricing, and capabilities across providers.

The project was created by the maintainers of SST and is used internally in their opencode tool. It organizes data in TOML files stored in a public repository on GitHub.

API and Logo Access

Models.dev offers a straightforward API endpoint for retrieving data. Users can make a GET request to https://models.dev/api.json to get the full dataset. The API uses a Model ID field for lookups, which matches the identifier used by the AI SDK.

Provider logos are also available through the API as SVG files. The URL pattern is https://models.dev/logos/{provider}.svg, where {provider} is the Provider ID such as anthropic, openai, or google. If a provider does not have a logo available, the API serves a default placeholder.

Contributing to the Project

The data is stored in the repository as TOML files organized by provider and model. Logos are stored as SVGs. The maintainers rely on community contributions to keep the information current.

Adding a New Model

To add a new model, contributors first check if the provider already exists in the providers/ directory. If not, they must create a new provider folder with the provider ID and a provider.toml file containing the provider name, AI SDK package name (npm), environment variable keys used for authentication, and a link to the provider's documentation. If the provider exposes an OpenAI compatible endpoint but does not publish an npm package, contributors can use @ai-sdk/openai-compatible and include the base API URL.

Optionally, a logo can be added as an SVG file in the provider's directory. The SVG must use currentColor for fills and strokes and should not have fixed sizes.

Each model gets its own TOML file placed in a models/ subdirectory within the provider folder. The filename becomes the model ID. For models with IDs containing a slash, subfolders are used. For example, openai/gpt-5 would be stored as providers/openai/models/gpt-5.toml.

The TOML file includes fields like display name, support for attachments, reasoning, tool calling, structured output, temperature control, knowledge cutoff date, release date, last updated date, and whether the model has open weights. Pricing is defined under a [cost] table with per million token costs for input, output, reasoning, cache reads, cache writes, and audio tokens. A [limit] table specifies maximum context window, input, and output tokens. The [modalities] table lists supported input and output types such as text, image, audio, and video.

For wrapper providers that mirror a model from another provider, the project supports an extends mechanism. This allows reusing a canonical model definition instead of duplicating the entire file. The [extends] section points to the source model using <provider>/<model-id> format and can optionally omit certain fields. This feature is reserved for non first party wrappers and should not be used inside the actual lab provider directories like Anthropic, OpenAI, or Google.

The #1 Newsletter in AI

Stay ahead of the AI curve

The most important updates, news, and content — delivered weekly.

No spam. Unsubscribe anytime.

Validation and Pull Requests

After adding the necessary files, contributors fork the repository, create a new branch, and open a pull request with a clear description. A GitHub Action automatically validates submissions against the project's schema, checking for required fields, correct data types, acceptable value ranges, and valid TOML syntax.

For converting existing wrapper models to use extends, there is a comparison script that prints a diff of the generated JSON output so contributors can verify their changes only affect the intended fields.

Schema Reference

The project defines a strict schema for both providers and models. The provider schema requires fields for name, npm package, environment variable array, and documentation link. An optional API field can be set for OpenAI compatible endpoints.

The model schema covers display name, boolean flags for various capabilities, date strings for knowledge cutoff, release and update dates, open weights status, cost tables, limit tables, modality arrays, and an optional status field that can be alpha, beta, or deprecated. Interleaved reasoning support is indicated by a boolean or an object with a field name specifying the format.

Examples of existing providers in the repository include Anthropic for Claude models, OpenAI for GPT models, and Google for Gemini models.

Frontend Development

The project uses Bun for development. To work on the frontend, contributors run bun install, navigate to packages/web, and start the dev server with bun run dev, which opens the frontend at http://localhost:3000.

For manual testing with opencode, contributors build the web package and set the OPENCODE_MODELS_PATH environment variable to the generated API JSON file.

Questions or help requests can be directed by opening an issue on the repository.

Related on Neura Market

More from Neura News