Skip to navigation

List API keys

Returns the keys of every project in the account, oldest first. Secrets are never returned. Use last4 and name to tell keys apart. Revoked and expired keys are included unless you filter them out.

Each key carries its usage in its current period (requests_used, tokens_used, requests_remaining, tokens_remaining, last_used_at) and the key that minted it (parent_key_id). A parent’s counters include the use of every key minted from it, so do not add a parent and its children together.

Scope: 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

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.

include_revokedbooleanOptionalDefaults to true

Set to false to leave out revoked keys.

include_expiredbooleanOptionalDefaults to true

Set to false to leave out keys whose expires_at has passed.

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 keys.
datalist of objects
The keys on this page, oldest first.
objectenumOptional

Always list, as on OpenAI and Stripe.

Allowed values:
has_morebooleanOptional

True when another page follows. Then next_cursor is set.

next_cursorstring or nullOptional

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

Errors

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