allmodels.ioDocs
API ReferenceAccount

List API-key activity

Lists individual requests made with the authenticating API key, newest first. Activity is asynchronously persisted. Treat pagination cursors as opaque.

GET/account/activity

Lists individual requests made with the authenticating API key, newest first. Activity is asynchronously persisted. Treat pagination cursors as opaque.

Authorization

BearerAuth
AuthorizationBearer <token>

Tenant key supplied as the Authorization Bearer token.

In: header

Query Parameters

from?string

Inclusive RFC 3339 start time. Defaults to 30 days before to.

Formatdate-time
to?string

Inclusive RFC 3339 end time. Defaults to the current time. The range may not exceed 90 days.

Formatdate-time
provider?string
Length1 <= length <= 200
model?string
Length1 <= length <= 200
capability?string

Value in

  • "tts"
  • "stt"
status?string

Value in

  • "completed"
  • "failed"
limit?string

Number of records to return, from 1 to 100. Defaults to 50.

Match^([1-9]|[1-9]\d|100)$
cursor?string

Opaque cursor returned as next_cursor by the previous page.

Length1 <= length <= 512

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

Client
Language
const response = await fetch("https://api.allmodels.io/account/activity?limit=50", {  headers: { Authorization: `Bearer ${process.env.ALLMODELS_API_KEY}` }});if (!response.ok) throw new Error(`AllModels request failed: ${response.status}`);console.log(await response.json());
{  "items": [    {      "id": "string",      "started_at": "2019-08-24T14:15:22Z",      "finished_at": "2019-08-24T14:15:22Z",      "latency_ms": 0,      "provider": "string",      "model": "string",      "capability": "tts",      "status": "completed",      "usage_unit": "characters",      "usage_amount": 0,      "credits": 1250000,      "cost_usd": 1.25    }  ],  "next_cursor": "string"}
{  "error": "invalid_request"}
{  "error": "invalid_request"}
{  "error": "invalid_request"}
{  "error": "invalid_request"}
{  "error": "invalid_request"}