# Create Api Key

Source: https://agenta.ai/docs/reference/api/create-api-key

`POST /keys`

Base URL: `https://us.cloud.agenta.ai/api` (US cloud), `https://eu.cloud.agenta.ai/api` (EU cloud) or `$AGENTA_HOST/api` (self-hosted). Authentication: `Authorization: ApiKey YOUR_API_KEY`.

Creates a personal API key: it acts as the user, with the user's role.

Args:
    request (Request): The request object containing the user ID in the request state.

Returns:
    str: The created API key.

## Response schemas

### 200: Successful Response

- string
