Setup & Authentication
Getting started with the Edgee Console API - create tokens and authenticate requests
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
Base URL
All Console API requests use the following base URL:
https://api.edgee.app
Create a personal API token
- Open your account menu in the console.
- Open Account settings → Personal API Tokens (
/~/account/tokens). - Create a token, give it a descriptive name, and store its value securely.
- Use this token for management requests to
https://api.edgee.app.
Do not use an organization API Keys value here: those keys authenticate LLM requests to the Gateway API. A personal token acts with your account's access to organizations; do not give it to a coding agent as its Gateway key.
To find an organization ID for the examples below, call GET /v1/organizations with your personal token and select the organization you intend to manage.
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
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
- Explore Export Cost Data to get usage and cost information
- Learn how to Manage Gateway API Keys for your Gateway requests
- Set up BYOK to manage custom provider keys