Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 28 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,45 @@
[![npm downloads](https://img.shields.io/npm/dm/modelparams.svg)](https://www.npmjs.com/package/modelparams)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

[modelparams.dev](https://modelparams.dev) is an open-source database that lists the parameters available for popular AI models. It is heavily inspired on [models.dev](https://github.com/anomalyco/models.dev) and we use it at [Manifest](https://manifest.build/).
Every parameter each AI model accepts, in one place. Inspired by [models.dev](https://github.com/anomalyco/models.dev); we use it at [Manifest](https://manifest.build/).

## TypeScript

```bash
npm install modelparams
```

`ParamsOf<Id>` is the exact set of parameters a model accepts. Pass one it doesn't, and your code won't compile.

```ts
import type { ParamsOf } from "modelparams";
import OpenAI from "openai";

const params: ParamsOf<"openai/gpt-4.1"> = {
max_tokens: 1024,
temperature: 0.7,
// top_k: 40, // won't compile: gpt-4.1 has no top_k
};

await new OpenAI().chat.completions.create({ model: "gpt-4.1", messages, ...params });
```

Defaults, runtime validation, and the helper APIs are in the [package README](packages/modelparams/README.md).

## API

You can access this data through an API.
Prefer raw JSON?

```
curl https://modelparams.dev/api/v1/models.json
curl https://modelparams.dev/api/v1/params/gpt-5.5.json
curl https://modelparams.dev/api/v1/params/gpt-5.5-subscription.json
```

The catalog follows the [Model Parameters convention](docs/model-parameters-schema.md).
The generated JSON Schema is available at
`https://modelparams.dev/api/v1/schema.json`.

## Adding a model or a parameter

See [CONTRIBUTING.md](CONTRIBUTING.md). The short version:
Schema at `https://modelparams.dev/api/v1/schema.json`, per the [Model Parameters convention](docs/model-parameters-schema.md).

1. Pick a unique ID: `<provider>/<model>` for the API-key variant, `<provider>/<model>-subscription` for the subscription variant. Example: `mistral/mistral-large`.
2. Add a YAML file at `models/<provider>/<model>.yaml` (or `models/<provider>/<model>-subscription.yaml`).
3. Open a PR. CI validates against the schema and rebuilds.
## Adding a model

Don't want to open a PR? [File an issue](https://github.com/mnfst/modelparams.dev/issues/new/choose) with the model and a link to the official docs, and someone will pick it up.
Drop a YAML file in `models/<provider>/`, open a PR, and CI validates it against the schema. Details in [CONTRIBUTING.md](CONTRIBUTING.md). Can't open a PR? [File an issue](https://github.com/mnfst/modelparams.dev/issues/new/choose) with a link to the docs.

## Local development

Expand Down
Loading