Skip to navigation

List recent model calls with tokens and cost

Returns one record per model call, newest first: the provider and model that answered, why Meadow routed it there, tokens by class, the cost, how long it took and the ids you need to find the same call at the vendor.

id is the x-request-id Meadow returned for the call. provider_request_id is the vendor’s own request id. A record of kind abandoned_attempt is an attempt at a provider that may have billed you although another provider, or nobody, answered: its tokens and cost are unknown. It shares its id with the call it belongs to.

from is included and to is excluded. Left out, the range is the 24 hours that end now. A key with the admin scope sees the whole account, any other key its own calls only. No request or response content is recorded.

Scope: any. Whole-account records need admin.

Authentication

AuthorizationBearer

A Meadow API key, sent as Authorization: Bearer mdw_.... The header x-api-key: mdw_... is accepted in its place.

Query parameters

fromstringOptional

Start of the range, included. A UTC date or an RFC 3339 time. Defaults to 24 hours before to.

tostringOptional
End of the range, excluded. A UTC date or an RFC 3339 time. Defaults to now.
limitintegerOptional<=200Defaults to 50
Page size, from 1 to 200. A value outside that range returns 400.
cursorstringOptional

The next_cursor of the previous page. Leave out for the first page. A value Meadow did not issue returns 400.

project_idstringOptional
List only this project's calls.
key_idstringOptional

List only this key’s calls. A key without the admin scope may pass only its own id.

providerstringOptional
List only calls this provider handled.
modelstringOptional
List only calls for this model, by the id Meadow sent to the provider.
statusenumOptional

List only served calls (a 2xx answer) or only failed ones (any other answer).

Allowed values:
fell_backbooleanOptional

true lists only calls an earlier provider failed before this one answered, false only the others.

request_idstringOptional<=128 characters

Lists only the records of one request, by its x-request-id: the call record and an abandoned_attempt record for each vendor attempt Meadow gave up on after sending. The date range still applies.

Response headers

x-request-idstringOptional

Meadow’s id for this request, req_ and 24 hex characters. Every response carries it, including errors, streams and unknown routes. Every error in the Error schema repeats it as request_id. Quote it when you report a problem.

Response

One page of model call records.
objectenum

Always list, as on OpenAI and Stripe.

Allowed values:
has_moreboolean

True when another page follows. Then next_cursor is set.

datalist of objects
The records on this page, newest first.
next_cursorstring or null

Pass as cursor to get the next page. null on the last page.

Errors

400
Bad Request Error
401
Unauthorized Error
429
Too Many Requests Error
500
Internal Server Error