Skip to main content
POST
/
v1
/
me
/
api-keys
curl -X POST "https://api.chatgrid.ai/v1/me/api-keys" \
  -H "Authorization: Bearer cgk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6" \
  -H "Content-Type: application/json" \
  -d '{"name": "CI/CD Pipeline", "scopes": ["read", "write"]}'
{
  "object": "api_key",
  "data": {
    "raw_key": "cgk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
    "id": "ee112233-4455-6677-8899-aabbccddeeff",
    "key_prefix": "cgk_live_a1b2",
    "name": "CI/CD Pipeline",
    "scopes": ["read", "write"],
    "created_at": "2026-03-15T14:00:00.000Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.chatgrid.ai/llms.txt

Use this file to discover all available pages before exploring further.

Requires the admin scope.
The raw_key field is returned only in this response. Store it securely — it cannot be retrieved again. If you lose the key, revoke it and create a new one.
curl -X POST "https://api.chatgrid.ai/v1/me/api-keys" \
  -H "Authorization: Bearer cgk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6" \
  -H "Content-Type: application/json" \
  -d '{"name": "CI/CD Pipeline", "scopes": ["read", "write"]}'
{
  "object": "api_key",
  "data": {
    "raw_key": "cgk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
    "id": "ee112233-4455-6677-8899-aabbccddeeff",
    "key_prefix": "cgk_live_a1b2",
    "name": "CI/CD Pipeline",
    "scopes": ["read", "write"],
    "created_at": "2026-03-15T14:00:00.000Z"
  }
}