curl -X POST "https://api.edgee.app/v1/organizations/{orgId}/api_keys" \
-H "Authorization: Bearer <your_console_api_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Production Backend",
"type": "api",
"models": ["anthropic/claude-opus-4-6", "openai/gpt-5.2"],
"max_usage": 1000,
"expires_in_days": 90
}'
{
"object": "ai_gateway_api_key",
"id": "key_abc123xyz",
"organization_id": "org_12345",
"name": "Production Backend",
"type": "api",
"models": ["anthropic/claude-opus-4-6", "openai/gpt-5.2"],
"max_usage": 1000,
"active": true,
"debug_mode": false,
"created_at": "2026-04-08T10:00:00Z",
"expires_at": "2026-07-07T10:00:00Z",
"last_used_at": "2026-04-08T12:30:00Z",
"key": "ek_live_abc123xyz..."
}
Create, list, update, and delete AI Gateway API keys
curl -X POST "https://api.edgee.app/v1/organizations/{orgId}/api_keys" \
-H "Authorization: Bearer <your_console_api_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Production Backend",
"type": "api",
"models": ["anthropic/claude-opus-4-6", "openai/gpt-5.2"],
"max_usage": 1000,
"expires_in_days": 90
}'
{
"object": "ai_gateway_api_key",
"id": "key_abc123xyz",
"organization_id": "org_12345",
"name": "Production Backend",
"type": "api",
"models": ["anthropic/claude-opus-4-6", "openai/gpt-5.2"],
"max_usage": 1000,
"active": true,
"debug_mode": false,
"created_at": "2026-04-08T10:00:00Z",
"expires_at": "2026-07-07T10:00:00Z",
"last_used_at": "2026-04-08T12:30:00Z",
"key": "ek_live_abc123xyz..."
}
https://api.edgee.ai) for making LLM requests.
api.edgee.ai), not the Console API tokens. Do not confuse these two systems.api (for Gateway requests) or coding_agent (for coding assistants)type is coding_agent. Specifies which coding assistant this key is for.Options: claude_code, opencode, codex["anthropic/claude-opus-4-6", "openai/gpt-5.2"]curl -X POST "https://api.edgee.app/v1/organizations/{orgId}/api_keys" \
-H "Authorization: Bearer <your_console_api_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Production Backend",
"type": "api",
"models": ["anthropic/claude-opus-4-6", "openai/gpt-5.2"],
"max_usage": 1000,
"expires_in_days": 90
}'
{
"object": "ai_gateway_api_key",
"id": "key_abc123xyz",
"organization_id": "org_12345",
"name": "Production Backend",
"type": "api",
"models": ["anthropic/claude-opus-4-6", "openai/gpt-5.2"],
"max_usage": 1000,
"active": true,
"debug_mode": false,
"created_at": "2026-04-08T10:00:00Z",
"expires_at": "2026-07-07T10:00:00Z",
"last_used_at": "2026-04-08T12:30:00Z",
"key": "ek_live_abc123xyz..."
}
api.edgee.ai), while Console tokens authenticate requests to the Console API (api.edgee.app)models field to restrict which models a key can access, useful for controlling access and managing costsmax_usage to automatically disable a key after spending a certain amountexpires_in_days to automatically revoke keys after a set period for security rotationWas this page helpful?