List credit changes
GET
/v1/credits/ledger
const url = 'https://deeperesearch.com/v1/credits/ledger?limit=50';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://deeperesearch.com/v1/credits/ledger?limit=50' \ --header 'Authorization: Bearer <token>'Top-ups, holds for running research, final charges and released holds, newest first.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”limit
integer
How many entries. Default 50.
Responses
Section titled “Responses”Ledger entries
Media typeapplication/json
object
object
required
string
data
required
Example
{ "object": "list", "data": [ { "kind": "top_up" } ]}Missing or invalid API key (unauthorized)
Media typeapplication/json
object
error
required
object
code
required
Stable, machine-readable error code. See Errors in the docs.
string
message
required
What went wrong, written for people
string
Example generated
{ "error": { "code": "example", "message": "example" }}Rate limit, spending limit or quota reached (rate_limited, limit_reached, quota_exceeded). See Retry-After.
Media typeapplication/json
object
error
required
object
code
required
Stable, machine-readable error code. See Errors in the docs.
string
message
required
What went wrong, written for people
string
Example generated
{ "error": { "code": "example", "message": "example" }}