---
title: "[BETA] Create AI API Key"
method: POST
path: "/ai/api-key"
tags: ["ai-api-key"]
---

# \[BETA\] Create AI API Key

`POST /ai/api-key`

## Request

- Base URL: `https://api-ch-gva-2.exoscale.com/v2`
- URL: `https://api-ch-gva-2.exoscale.com/v2/ai/api-key`
- Auth: none declared
- TypeScript: <https://skmtc.dev/exoscale/apis/exoscale-api/docs/ai/api-key/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new AI API key

## Request body

- CreateAiApiKeyRequest: Request to create a new AI API key
  - `name` string, required: Human-readable name for the AI API key
  - `scope` string, required: Key scope: 'public' for all deployments, or a specific deployment UUID

## Response `200`

OK

- CreateAiApiKeyResponse: Create AI API key response
  - `updated-at` string, date-time, required: Last update timestamp
  - `name` string, required: Human-readable name for the AI API key
  - `value` string, required: Plaintext AI API key value
  - `scope` string, required: Key scope: 'public' for all deployments, or a specific deployment UUID
  - `id` string, uuid, required: AI API key ID
  - `org-uuid` string, uuid, required: Organization UUID that owns this key
  - `created-at` string, date-time, required: Creation timestamp

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found

## Changes

- **2026-11-06** `63da6f74c845`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/exoscale/apis/exoscale-api/changes/ai/api-key/post.md)

---

[API](https://skmtc.dev/exoscale/apis/exoscale-api.md) - [All operations](https://skmtc.dev/exoscale/apis/exoscale-api/llms.txt) - [OpenAPI document](https://skmtc.dev/exoscale/apis/exoscale-api/revisions/63da6f74c845?raw)
