All requests below will use this key. Your API key is sent directly to api.cueapi.ai and never stored by the docs site.

POST/v1/auth/keys

Create API Key

Mint a new named API key. Plaintext is returned once and never retrievable again.

Creates a new API key on the authenticated account with the given label. The full plaintext is returned in the response once — store it immediately. Only the hash, prefix, and label persist on the server.

Rate limited to 10 keys per user per hour.

Warning

The plaintext in the api_key field is the only time you'll see it. If lost, revoke the key via DELETE /v1/auth/keys/{id} and mint a new one.

Request

bash
curl -X POST https://api.cueapi.ai/v1/auth/keys \
  -H "Authorization: Bearer cue_sk_YOUR_CURRENT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"label": "claude-desktop"}'

Response

json
{
  "id": "6e8fc3a0-7a12-4f8a-b8b6-9c5e1d2a3b4c",
  "api_key": "cue_sk_a3f9b2c8d1e5f4a7b6c3d2e1f0a9b8c7",
  "prefix": "cue_sk_a3f9",
  "label": "claude-desktop",
  "created_at": "2026-04-18T05:12:04Z"
}

Request body

FieldTypeRequiredNotes
labelstring (1-100 chars)yesHuman-readable name. Unique per-user isn't enforced — you can have two keys labeled ci-server if you want

Response fields

FieldTypeNotes
idUUIDUse this in PATCH / DELETE endpoints
api_keystringFull plaintext — store immediately
prefixstringFirst characters of the plaintext for later identification
labelstringEchoed from request
created_atISO 8601

Common labels

Not enforced, but conventional:

  • default — reserved for the auto-created key at registration
  • claude-desktop, claude-code, cursor, zed — per-MCP-host
  • ci-server, github-actions — automation contexts
  • local-dev-{yourname} — developer machines
  • mcp:{client}:{connection-id} — used by POST /v1/auth/mcp-exchange for remote MCP OAuth flows

Errors

StatusCodeCause
422validation_errorMissing or empty label
429rate_limitedMore than 10 creations in the trailing hour
POST/v1/auth/keys
Try it
Request Body
Enter your API key above to send requests
How do I know if my agent ran successfully?
Ctrl+K