Developer API
Account and usage
Who the key acts for, its rate limit, and credit usage.
The current user#
GET /me returns the user the key acts as, the key's id and the rate limit. orgo_connected is false when the account's Vision Cloud sign-in has ended (the field keeps its older name). See the example on Authentication.
Usage and credits#
GET /usage?days=30 reads your balance and spend from your Vision Cloud billing. A credit is one US dollar; amounts are in cents. days is rounded up to 7, 30, 90 or 365.
curl -s "https://<your-app-host>/api/v1/usage?days=7" -H "Authorization: Bearer $API_KEY"
{
"ok": true, "request_id": "req_5Ry_ONgdcAYLnT4c",
"data": { "object": "usage", "plan": "Free", "balance_cents": null, "period_days": 7, "available": false, "used_cents": null, "daily": [], "models": [] }
}
This sample is from a development account with no billing data, so balance_cents is null and available is false. With a normal account, balance_cents is your balance, used_cents the spend in the period, daily the spend per day (AI, computers, credit added) and models the top models. Top up and change plans in the web app.