> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ariacompute.com/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /api/api-keys — create a new API key

> Create a new bfvk API key on your account. The full key value is returned only once; store it immediately in a secret manager.

Create a new `bfvk-` API key on your account. The full key value is returned exactly once in the response body. Store it immediately: subsequent list calls only return the prefix.

**Method:** `POST` **Path:** `/api/api-keys` **Auth:** Session Bearer

## Request

<ParamField body="name" type="string" required>
  Human-readable name for the key. Shown in the dashboard and in `GET /api/api-keys`.
</ParamField>

## Response

<ResponseField name="id" type="string">
  Stable key identifier.
</ResponseField>

<ResponseField name="name" type="string">
  The name you supplied.
</ResponseField>

<ResponseField name="key" type="string">
  Full API key, prefixed with `bfvk-`. Returned once.
</ResponseField>

<ResponseField name="prefix" type="string">
  First few characters of the key.
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp.
</ResponseField>

<Warning>
  The `key` field is the only place the full value ever appears. Copy it before you close the tab.
</Warning>

## Example

```bash theme={null}
curl -X POST https://ariacompute.com/api/api-keys \
  -H "Authorization: Bearer eyJhbGciOi..." \
  -H "Content-Type: application/json" \
  -d '{"name": "production"}'
```

```json theme={null}
{
  "id": "key_01H...",
  "name": "production",
  "key": "bfvk-4z9CXXXXXXXXXXXXXXX",
  "prefix": "bfvk-4z9C",
  "created_at": "2026-09-23T10:00:00Z"
}
```

## Errors

| Status | Meaning                           |
| ------ | --------------------------------- |
| `400`  | Missing `name`.                   |
| `401`  | Missing or invalid session token. |


## Related topics

- [API keys for gateway and model access](/concepts/api-keys.md)
- [Create, rotate, and revoke your API keys](/guides/manage-api-keys.md)
- [GET /api/api-keys — list your API keys](/api-reference/api-keys/list.md)
- [API authentication: session tokens and API keys](/api-reference/authentication.md)
- [DELETE /api/api-keys/{id} — revoke an API key](/api-reference/api-keys/delete.md)
