Skip to main content

What is the Console API?

The Edgee Console API is a management API that allows you to programmatically interact with your Edgee organization. It enables you to:
  • Export usage and cost data for billing and analysis
  • Configure custom provider keys (BYOK) for your organization
  • Manage your organization’s settings programmatically
Important: Console API vs Gateway APIDo not confuse the Console API with the AI Gateway API:
  • Console API (https://api.edgee.app) - For managing your organization, exporting data, and configuring provider keys
  • AI Gateway API (https://api.edgee.ai) - For making LLM requests (chat completions, messages, token counting)
The Console API uses tokens created in the Console settings, while the AI Gateway API uses API keys created in the API Keys section. They are separate systems with different purposes.

Base URL

All Console API requests use the following base URL:
https://api.edgee.app

Creating API Tokens

To use the Console API, you need to create an API token from your organization’s settings.
1

Navigate to API Keys

Log in to the Edgee Console and go to the API Keys section in your account settings.
2

Click Create API Key

Click the Create API Key button to generate a new token.
3

Name Your Token

Give your API key a descriptive name (e.g., “Production”, “Development”, “Integration”) to identify its purpose.
4

Copy and Secure Your Token

Copy the token immediately and store it securely. The token will only be displayed once and cannot be retrieved later.

Authenticating Requests

The Edgee Console API uses bearer token authentication. Include your API token in the Authorization header with the Bearer scheme:
Authorization: Bearer <your_api_token>

Examples

Basic Request:
curl "https://api.edgee.app/v1/organizations/{orgId}/logs/export?period=7d&format=csv" \
  -H "Authorization: Bearer ek_live_..."
With Environment Variable:
export EDGEE_CONSOLE_API_TOKEN="ek_live_..."

curl "https://api.edgee.app/v1/organizations/{orgId}/logs/export?period=7d" \
  -H "Authorization: Bearer $EDGEE_CONSOLE_API_TOKEN"

Token Management

In the Edgee Console, you can manage all your API keys:
  • View tokens: See all created API keys and their creation dates
  • Revoke tokens: Immediately disable any token from the console
  • Rotate tokens: Create new tokens and revoke old ones for security
  • Monitor usage: Track API usage associated with each token

Security

Your API tokens carry many privileges, so be sure to keep them secure!
  • Never commit tokens to version control
  • Don’t share tokens in publicly accessible areas
  • Don’t expose them in client-side code
  • Store them in environment variables or secure credential management systems
  • Revoke tokens if you suspect they’ve been compromised
  • Create separate tokens for different environments (development, staging, production)
  • Rotate your tokens regularly as part of your security practices

Error Handling

If your token is invalid or expired, the API will return a 401 Unauthorized response:
{
  "error": "Unauthorized",
  "message": "Invalid or expired API token"
}
If your token doesn’t have permission to access a resource, you’ll receive a 403 Forbidden response:
{
  "error": "Forbidden",
  "message": "Your token does not have permission to access this resource"
}

Next Steps