---
title: "[BETA] Update AI API Key"
method: PATCH
path: "/ai/api-key/{id}"
tags: ["ai-api-key"]
---

# \[BETA\] Update AI API Key

`PATCH /ai/api-key/{id}`

## Request

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

Update AI API key name and/or scope

## Path parameters

- `id` string, uuid, required

## Request body

- UpdateAiApiKeyRequest: Request to update an AI API key (at least one property required)
  - `name` string: Human-readable name for the AI API key
  - `scope` string: Key scope: 'public' for all deployments, or a specific deployment UUID

## Response `200`

OK

- UpdateAiApiKeyResponse: Update AI API key response
  - `updated-at` string, date-time, required: Last update timestamp
  - `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
  - `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/:id/patch.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)
