List Request Logs

List request logs, newest first, filtered by time, key, model or status.

List request logs, newest first. The list leaves out the request and response payloads; retrieve a log to get them.

GET /v1/account/logs

Query parameters

starting_atstringoptional

Only return requests made at or after this time (RFC 3339).

ending_atstringoptional

Only return requests made before this time (RFC 3339).

api_key_idstringoptional

Only return requests made with this API key.

modelstringoptional

Only return requests to this model.

statusstringoptional

Only return requests that ended with this status.

Allowed values:successerroraborttimeout
limitintegeroptionalDefault 20

Items per page, 1 to 1000.

after_idstringoptional

Return the page after this log ID (older requests).

before_idstringoptional

Return the page before this log ID (newer requests).

Response

dataLog[]optional
has_morebooleanoptional

true when there are more logs beyond this page.

first_idstring | nulloptional

ID of the first log on this page.

last_idstring | nulloptional

ID of the last log on this page.

Exporting a day of logs

Set starting_at and ending_at to the day, limit=1000, and keep passing the previous page's last_id as after_id while has_more is true.

Errors

StatusReason
400A filter value is invalid, limit is out of range, both after_id and before_id are set, or the cursor ID doesn't exist.