> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/api/model-api-key.md).

# Call the Duaer model gateway with a Model API Key

In Duaer, a Model API Key lets your own code call Duaer's model gateway at https://api.duaer.com/v1/*, limited to the models an admin allows for user calls.
## Create a Model API Key

1. In Duaer, open Settings › Model API Key.
2. Select Create a Model API Key.
3. Enter a Label, for example "CI pipeline", and save.
4. Copy the key now. The full value is shown only once.

## Call the Duaer model gateway with your key

Send the key as `Authorization: Bearer <key>` (`X-API-Key` or `X-DUAER-API-KEY` also work). For example, to list the models this key can call:

```
curl https://api.duaer.com/v1/models \
  -H "Authorization: Bearer $DUAER_API_KEY"
```

The gateway serves `/v1/chat/completions`, `/v1/responses`, `/v1/messages`, `/v1/images/generations`, `/v1/embeddings`, `/v1/audio/speech`, and more. Each call is charged to your credits at the model price.

The same key calls employees you hired on the [Duaer employee market](/build/employee-market.md): `POST /v1/employees/<position ID>/runs`.

## See the models you can call and your usage

Models you can call, lower on the page, lists the models an admin opened to users. If it is empty, ask an admin to allow at least one model for user calls in the model pool.

The key list shows each key's last use, calls, and credits used. Recent calls lists the latest calls.

## Rotate or revoke a Duaer Model API Key

- Rotate: revokes the key and creates a new one with the same label. The old key stops working at once, and the new key is also shown only once.
- Revoke: scripts and integrations using the key stop working at once. This cannot be undone.

## Model API Key versus account API key

The account API key under Settings › API can call every enabled model and the [Duaer public API](/api/authentication.md). A Duaer Model API Key reaches only the gateway models opened to users, so it is the one to hand to scripts or third parties.
## Questions

### How is a Duaer Model API Key different from the key under Settings › API?

A Duaer Model API Key reaches only the gateway models an admin opened to users. The account API key can call every enabled model and the Duaer public API.

### Why can't my Duaer Model API Key call a model?

An admin has not allowed that model for user calls in the Duaer model pool. Models you can call, under Settings › Model API Key, lists every model the key can use.

