# Deployments: Chat

A chat deployment answers `/v1/chat/completions`, `/v1/messages` and `/v1/responses`. It is metered in tokens. This is the default kind.

[Deployments](https://liquidinference.ai/docs/provider-models.md) has the fields that every kind shares, the listing statuses and the lifecycle. This page has what is special to this kind.

## Register a deployment

Copy the request, set your provider key and change the names. Every endpoint here takes the [provider key](https://liquidinference.ai/docs/provider.md) as a bearer token.

```bash
curl https://router.inference.ai.exchange/v1/provider/models \
  -H "Authorization: Bearer $LIQUID_PROVIDER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "deployment_name": "gpt-oss-120b",
      "model": "gpt-oss-120b",
      "creator": "openai",
      "precision": "fp8",
      "region": "eu-west",
      "max_input_tokens": 128000,
      "max_output_tokens": 4096,
      "tokenizer_id": "o200k_base",
      "input_modalities": [
        {
          "type": "text"
        },
        {
          "type": "image",
          "max_bytes": 20000000,
          "max_references": 8
        }
      ],
      "output_modalities": [
        {
          "type": "text"
        }
      ]
    }'
```

```python
import os
import requests

response = requests.post(
    "https://router.inference.ai.exchange/v1/provider/models",
    headers={"Authorization": f"Bearer {os.environ['LIQUID_PROVIDER_KEY']}"},
    json={
        "deployment_name": "gpt-oss-120b",
        "model": "gpt-oss-120b",
        "creator": "openai",
        "precision": "fp8",
        "region": "eu-west",
        "max_input_tokens": 128000,
        "max_output_tokens": 4096,
        "tokenizer_id": "o200k_base",
        "input_modalities": [
            {
                "type": "text"
            },
            {
                "type": "image",
                "max_bytes": 20000000,
                "max_references": 8
            }
        ],
        "output_modalities": [
            {
                "type": "text"
            }
        ]
    },
)
response.raise_for_status()
print(response.json()["status"])
```

```typescript
const response = await fetch('https://router.inference.ai.exchange/v1/provider/models', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.LIQUID_PROVIDER_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    deployment_name: 'gpt-oss-120b',
    model: 'gpt-oss-120b',
    creator: 'openai',
    precision: 'fp8',
    region: 'eu-west',
    max_input_tokens: 128000,
    max_output_tokens: 4096,
    tokenizer_id: 'o200k_base',
    input_modalities: [
      {
        type: 'text',
      },
      {
        type: 'image',
        max_bytes: 20000000,
        max_references: 8,
      },
    ],
    output_modalities: [
      {
        type: 'text',
      },
    ],
  }),
})
if (!response.ok) throw new Error(await response.text())
console.log((await response.json()).status)
```

The answer is `201` with the registration. A new registration is `UNLISTED`. The default `kind` is `chat`.

## What you declare

| Field               | Meaning                                                                                                                                  |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `max_input_tokens`  | Context limit in the deployment tokenizer. Input and output of one job must fit in it together.                                          |
| `max_output_tokens` | The most tokens for one job. Omit it to state no limit.                                                                                  |
| `tokenizer_id`      | The tokenizer of your usage reports. Default: `provider-native`.                                                                         |
| `input_modalities`  | What the model reads besides text: `image`, `audio`, `video` or `file`, each once, with limits such as `max_bytes` and `max_references`. |
| `output_modalities` | Leave it as `[{ "type": "text" }]`. A chat model that also draws or speaks declares the features `output.image` or `output.audio`.       |

A request that sends a part that you did not list goes to another offer before the award. The error names the limit, such as `image.max_bytes`.

## Add images, audio and files

State a limit for each kind that the model reads. Your agent quotes `input.image`, `input.audio` or `input.file` only for a kind that the list names.

```json
"input_modalities": [
  { "type": "text" },
  { "type": "image", "formats": ["image/png", "image/jpeg"], "max_bytes": 20000000, "max_references": 8 },
  { "type": "audio", "max_duration_seconds": 600 },
  { "type": "file", "formats": ["application/pdf"], "max_bytes": 32000000 }
]
```

## Quote and serve

Quote token prices, for example `input.text` and `output.text`, in your session. See [Quote over the session](https://liquidinference.ai/docs/provider-quoting.md). To serve jobs, use the [OpenAI-compatible API](https://liquidinference.ai/docs/provider-openai.md), the [Anthropic API](https://liquidinference.ai/docs/provider-anthropic.md) or your own agent: [Serve and get paid](https://liquidinference.ai/docs/provider-dispatch.md).

## Charge

The charge is the tokens that you meter, at your rates, up to the cap. The cap holds the prompt and the longest output that the buyer allowed.

## Next

- Quote the deployment: [Quote over the session](https://liquidinference.ai/docs/provider-quoting.md).
- Get it on the public book: [Deployments](https://liquidinference.ai/docs/provider-models.md#from-registration-to-the-public-book).
