Console API
Manage Gateway API Keys
Create, list, update, and delete AI Gateway API keys
POST
Manage your AI Gateway API keys programmatically. Gateway API keys are used to authenticate requests to the Edgee AI Gateway API (Documentation Index
Fetch the complete documentation index at: https://www.edgee.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
https://api.edgee.ai) for making LLM requests.
Request Body
A descriptive name for this API key (e.g., “Production Backend”, “Development Client”)
The type of API key. Options:
api (for Gateway requests) or coding_agent (for coding assistants)Required if
type is coding_agent. Specifies which coding assistant this key is for.Options: claude_code, opencode, codexOptional list of model restrictions. If specified, this key can only access these models. Leave empty for no restrictions.Example:
["anthropic/claude-opus-4-6", "openai/gpt-5.2"]Optional monthly usage limit in USD. If specified, this key will stop working after reaching this cost threshold.
Optional expiration time in days from creation. After this period, the key will stop working.
Optional email address associated with this key (for organization/billing tracking).
Response
The object type (always “ai_gateway_api_key”)
Unique identifier for this API key
The organization this key belongs to
The name of this API key
The type of API key (“api” or “coding_agent”)
The coding assistant this key is for (if type is “coding_agent”)
List of model restrictions (if any)
Monthly usage limit in USD (if set)
Whether this key is currently active
Whether debug mode is enabled for this key
ISO 8601 timestamp when the key was created
ISO 8601 timestamp when the key will expire (if set)
ISO 8601 timestamp of the last usage (if ever used)
The actual API key (only shown once at creation or when using the reveal endpoint)
Examples
Tips
- API Keys vs Console Tokens: Gateway API keys are used to authenticate requests to the Gateway API (
api.edgee.ai), while Console tokens authenticate requests to the Console API (api.edgee.app) - Model Restrictions: Use the
modelsfield to restrict which models a key can access, useful for controlling access and managing costs - Usage Limits: Set
max_usageto automatically disable a key after spending a certain amount - Expiration: Use
expires_in_daysto automatically revoke keys after a set period for security rotation - Key Visibility: Once created, the key is only shown once. Use the reveal endpoint if you need to see it again, but the key must already exist
Next Steps
- Learn how to authenticate to the Gateway API
- Explore Chat Completions to make LLM requests
- Set up alerts to monitor costs associated with your API keys