Agent API
Issue a read token so an agent can read your account — current balance, spending/usage, and the model price list. Read-only: it can see these details but cannot spend, and is separate from your sk-engy- inference key. Authenticate with the token (rk-engy-…).
1. Issue a read token
Go to Dashboard → Account tokens, create a token, and copy it (shown once). An account has one read token at a time: regenerating it revokes the old one immediately.
2. Call the API
curl -H 'Authorization: Bearer rk-engy-…' \
https://engy.ai/api/v1/balance
Responses are { "data": …, "meta": … }; errors are { "error": { "code", "message" } }. Money is integer micro-USD (1 USD = 1,000,000), with a _usd string alongside most amounts.
3. Endpoints
-
GET /api/v1/balance— balance + available (post-holds). -
GET /api/v1/usage?days=7|30&model=…— requests + spend by day and model.daysdefaults to 30;modelis the exact id, without avendor/prefix. -
GET /api/v1/models— active models with per-1k pricing and listed context limits (the live window can differ; see pricing).
4. Machine-readable
- /api/v1/openapi.json — OpenAPI 3.1.
- /api/v1/llms.txt — terse text for agents.
Rate limit: 120 requests per minute per token; a 429 carries Retry-After. The two machine-readable files need no token.