Your credit balance and ledger
GET
/credits
const url = 'https://api.global.stillbox.example/v1/credits';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://api.global.stillbox.example/v1/credits \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The balance, the current rates, and the last 200 ledger entries
Media typeapplication/json
object
balance_usd
required
number format: double
granted_usd
required
Every credit added, given or bought.
number format: double
purchased_usd
The credits bought by card.
number format: double
limited
required
Out of free hours and credits.
boolean
rates
required
Provisional prices for usage beyond the free hours.
object
memory_gb_hour_usd
required
number format: double
cpu_hour_usd
required
number format: double
entries
required
Array<object>
object
id
required
integer format: int64
amount_usd
required
Positive for credits added, negative for usage.
number format: double
kind
required
string
hour
For usage, the hour charged.
string format: date-time
note
required
string
created_at
required
string format: date-time
Example
{ "entries": [ { "kind": "grant" } ]}The API key is missing or invalid
Media typeapplication/json
object
code
required
string
message
required
string
Example
{ "code": "not_found"}