API keys
Manage your API keys from the console or over the API. Every endpoint is served at https://api.eclogue.ai.
Portal API (key management)
Requires a Supabase JWT token, obtained after signing in to the console.
| Method | Path | Description |
|---|---|---|
GET | /portal/keys | List all of your keys |
POST | /portal/keys | Create a new key |
PATCH | /portal/keys/:id | Update a key (name, model allowlist) |
DELETE | /portal/keys/:id | Revoke a key |
Create a key
curl -X POST https://api.eclogue.ai/portal/keys \
-H "Authorization: Bearer YOUR_JWT" \
-H "Content-Type: application/json" \
-d '{"name": "my-app", "allowed_models": ["deepseek-chat"]}' {
"data": {
"id": "uuid-xxx",
"raw_key": "gw-my-app-abc123...",
"name": "my-app",
"allowed_models": ["deepseek-chat"]
}
} raw_key is returned only once, at creation. Store it securely.
Key properties
| Field | Type | Description |
|---|---|---|
name | string | Human-readable label |
allowed_models | string[] | Model allowlist (empty array = all models allowed) |
spending_limit | number | Spending cap (USD) |
limit_reset | string | "daily", "weekly", "monthly" or "never" |
expires_at | string | Expiry time in ISO 8601 format |
is_active | boolean | Enable or disable the key |
Inspect a key
Use the API key itself to check its balance and usage — no JWT required:
curl https://api.eclogue.ai/v1/auth/key \
-H "Authorization: Bearer gw-your-key" {
"data": {
"label": "gw-my-app-...",
"limit": 100.0,
"usage": 25.5,
"limit_remaining": 74.5,
"limit_reset": "monthly"
}
}