Skip to main content
The base URL is 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.
Passwords, session credentials and identity documents never appear in the response.

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.
This endpoint returns the CSV body directly; it does not return a download link. The response is Content-Type: text/csv; charset=utf-8, written row by row as a stream, with a UTF-8 BOM at the start so Excel reads it correctly. Redirect the response body to a file — no second request is needed.
Available columns include 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

These endpoints manage API keys used to call models, not Admin Keys. An Admin Key can never create, edit or revoke any Admin Key, including itself.

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.
An 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.
Save key right away. Only its hash is stored, so no endpoint can return the plaintext afterwards — that applies to Admin Keys and signed-in users alike.

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.