# Models API

> What's on sale, which options each model takes, and what it costs.

Source: https://docs.nocamclub.com/api/models

Both calls are open: no key, up to 60 calls a minute per address.

```http
GET /v1/models
GET /v1/models?kind=video
GET /v1/models/{id}
```

`kind` is `image` (photos), `video` or `text`.

## What a model says about itself

```json
{
  "id": "muse-video",
  "object": "model",
  "name": "Muse Video",
  "kind": "video",
  "family": "Meta",
  "description": "…",
  "input_schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "required": ["prompt"],
    "additionalProperties": false,
    "properties": {
      "prompt": { "type": "string", "minLength": 1, "maxLength": 10000 },
      "aspect_ratio": { "type": "string", "enum": ["9:16", "16:9", "1:1"], "default": "9:16" },
      "images": { "type": "array", "maxItems": 1, "items": { "type": "string" } }
    }
  },
  "prices": [{ "credits": 2, "usd": "0.02" }],
  "routes": 1,
  "no_fallback": true,
  "stats": null
}
```

| Field | What it tells you |
|---|---|
| `input_schema` | JSON Schema of `input`, limited to what can be made right now. Validate against it, or build a form from it |
| `prices` | Every combination you can buy now. If it isn't here, it can't be bought now |
| `prices[].with_video` | This price applies when a video is among your files |
| `routes`, `no_fallback` | How many routes can serve it. With one, the model is down when that route is |
| `stats` | Over 7 days of orders through the API: `median_seconds`, `p90_seconds`, `success_rate`, `samples`. `null` until there are some |

The catalog changes: routes go on and off, and models come and go. Read it rather than remembering it.

## Pricing a request

To price one exact request with its files, use the estimate. It takes the same body as `POST /v1/generations`, runs every check, and charges nothing.

```bash
curl https://api.nocamclub.com/v1/estimate \
  -H "Authorization: Bearer $NOCAM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "seedance-2.5", "input": { "prompt": "A paper boat in a gutter", "duration": 5 } }'
```

```json
{
  "object": "estimate",
  "valid": true,
  "model": "seedance-2.5",
  "params": { "aspect_ratio": "9:16", "resolution": "720p", "duration": 5 },
  "credits": 60,
  "usd": "0.60"
}
```

`params` shows the settings it would run with, defaults filled in, spelled as in a request.

## Pick one

[Models](https://docs.nocamclub.com/models.md) has which model for which job, and a page per model with prompt tips.
