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 (
https://edgee.io) 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, claude_desktop, opencode, codex, codex_desktop, cursor, copilot, crush, codebuddy, pi, kimi, kiloOptional 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 usage limit in USD for the period set by
max_usage_period. If specified, this key stops working after reaching this cost threshold.The window
max_usage applies to. Options: daily, monthly, all_time. See Usage limits & budgets.Optional expiration time in days from creation. After this period, the key will stop working.
Per-key token compression settings. Accepts an object with the
tool_result_trimming, tool_surface_reduction, and output_brevity booleans. A bare true is
accepted as a legacy shorthand for tool_result_trimming only.Ordered list of models to try when the requested model’s provider fails. See Retry, Fallback & Reroute.
Ordered list of models to serve instead of the requested model. When set, the requested model is never contacted. See Reroute.
When true, the key may only use BYOK provider keys. Requests for models with no matching BYOK credentials are rejected.
Settings resolve organization > squad > key. A value set at a higher scope overrides what you
set here — see how settings resolve.
Response
Examples
Tips
- API Keys vs Console Tokens: Gateway API keys are used to authenticate requests to the Gateway API (
edgee.io), 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_usagewith amax_usage_periodto cap spend per day, per month, or for the key’s lifetime - 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