# Models

Source: https://aiand-docs-staging.pages.dev/api/models/

```http
GET /v1/models
```

Lists models with pricing and metadata.

Authentication is optional. With an API key, the list holds only the models your organization has access to, priced in its billing currency. Without one, it lists every model ai& serves, priced in USD. Requests without a key are rate-limited to 600 per minute per IP, one budget shared by every catalog endpoint callable without a key, including [`GET /v1/videos/models`](/api/videos/#list-video-models).

## Example

```bash
curl https://api.aiand.com/v1/models
```

With an API key:

```bash
curl https://api.aiand.com/v1/models \
  -H "Authorization: Bearer sk-your-api-key"
```

## Response

```json
{
  "object": "list",
  "data": [
    {
      "id": "google/gemma-4-31b-it",
      "name": "google/gemma-4-31b-it",
      "object": "model",
      "created": 1775474514,
      "owned_by": "ai&",
      "provider": "google",
      "context_window": 262144,
      "max_output_tokens": 32768,
      "capabilities": [
        "reasoning",
        "tool_calling",
        "vision",
        "video",
        "document"
      ],
      "reasoning_efforts": [
        "none",
        "high"
      ],
      "reasoning_effort_default": "none",
      "description": "Largest Gemma 4 instruction model for open, self-hosted chat and reasoning",
      "currency": "usd",
      "input_per_1m": "0.200000",
      "output_per_1m": "0.500000",
      "cached_input_per_1m": "0.050000",
      "deprecation_date": null
    }
  ]
}
```

### Model object

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Model identifier — use this as the `model` parameter in requests |
| `object` | string | Always `"model"` |
| `created` | integer | Unix timestamp |
| `owned_by` | string | Always `"ai&"` |
| `provider` | string | Upstream provider name |
| `context_window` | integer | Maximum context length in tokens |
| `max_output_tokens` | integer \| null | Recorded maximum generation length. `null` when no limit is recorded for the model |
| `description` | string | Short model description |
| `currency` | string | Your organization's billing currency (`usd` or `jpy`) |
| `input_per_1m` | string | Cost per 1M input tokens, in your billing currency. Numeric value returned as a string for precision (e.g. `"0.150000"`) |
| `output_per_1m` | string | Cost per 1M output tokens, in your billing currency |
| `deprecation_date` | string \| null | When the model stops serving requests, as an ISO 8601 timestamp. `null` when no retirement is scheduled |

## Example

```bash
curl https://api.aiand.com/v1/models \
  -H "Authorization: Bearer sk-your-api-key"
```

## Model name resolution

The `model` parameter you send on an inference request (`/v1/chat/completions`, `/v1/responses`, `/v1/messages`) must be an **exact** model `id` from `GET /v1/models`. Matching is case-insensitive, but partial names are not accepted: a model family without its version returns a `404` with error code `model_not_found` rather than guessing a version. Use `GET /v1/models` as the source of valid names.

A model that exists but your organization does not have access to returns a `404` with error code `model_access_denied`. It is also left out of your organization's `GET /v1/models` list.

Usage is always recorded and billed against the model's canonical `id`, regardless of the casing you sent.

## Cost calculation

```
cost = (input_tokens / 1_000_000 * input_per_1m) + (output_tokens / 1_000_000 * output_per_1m)
```

Credits are deducted after each successful request. Failed requests (4xx/5xx) are not billed.
