Usage records
Call this endpoint from your backend to issue a temporary standalone usage statement link for a sub-user, then redirect the end user to the returned url to view their balance and usage records without logging in or exposing their API key.
Request
POST https://inoneapi.ai/api/v1/org/access-links
Send requests to https://inoneapi.ai with Authorization: Bearer $ORG_ADMIN_KEY.
curl -X POST "https://inoneapi.ai/api/v1/org/access-links" \
-H "Authorization: Bearer $ORG_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "usage",
"api_key": "sk-io-...",
"locale": "en"
}'
Request parameters
| Field | Required | Description |
|---|---|---|
type | Yes | Must be usage |
api_key | Yes | Sub-user API key (sk-io-…), verified by the server to belong to this organization |
locale | No | Page language (for example en, zh, ja); defaults to the site default locale |
expires_in | No | Link TTL in seconds; default 1800 (30 minutes), range 60–86400 |
Response (HTTP 201)
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"token": "550e8400-e29b-41d4-a716-446655440000",
"type": "usage",
"url": "https://inoneapi.ai/en/statement/550e8400-e29b-41d4-a716-446655440000",
"expires_at": "2026-11-24T09:30:00.000Z"
}
Usage
- Return
urlto your frontend and redirect the end user to it (or open it in a new tab) to view their balance and usage records. - Links expire after 30 minutes by default; call this endpoint again to generate a fresh link when needed.
- Errors follow
{"error":"CODE"}: 401UNAUTHORIZEDfor an invalid admin key, 400INVALID_INPUTfor invalid parameters, and 404NOT_FOUNDif the sub-user key does not exist or belongs to another organization.