https://api.ephone.ai and every request carries Authorization: Bearer sk-admin-....
Apart from the two export endpoints, responses use the {"success": bool, "message": string, "data": ...} envelope.
Account
Get account profile
GET /api/user/self · scope account:read
Returns the account profile. balance is the current balance.
Call logs
Call statistics
GET /api/log/self/stat · scope logs:read
Returns spend and throughput statistics for a time range.
quota is the amount spent over the range.
Export log details
GET /api/log/self/stream-export · scope logs:read
Streams log details.
created_at, model_name, token_name, prompt_tokens, completion_tokens, cached_tokens, reasoning_tokens and quota. If you use caching, reasoning or multimodal models, export the detailed columns explicitly — the aggregate counts alone will not reconcile against what you were charged.
Usage analytics
Export usage analytics
GET /api/data/self/pivot/stream-export · scope usage:read
Aggregates usage by dimension and streams it as CSV, same as above.
Timestamps here are in milliseconds, unlike the log endpoints which use seconds. A single query spans at most about six months.
API key management
List keys
GET /api/token/ · scope keys:read
Returns a page of API keys. Key values are masked; plaintext is not retrievable through any endpoint.
expired_time of -1 means the key never expires.
Get one key
GET /api/token/{id} · scope keys:read
Returns the full configuration of one key, with the value masked.
Create a key
POST /api/token/ · scope keys:write
Creates a new API key. The plaintext appears only in this response.
Update a key
PUT /api/token/ · scope keys:write
Updates an existing key. The body must include id.
Delete a key
DELETE /api/token/{id} · scope keys:write
Deletes the key immediately.
Bulk deletion is not available to Admin Keys. Delete keys one at a time, or use the console.