Credit balance, what running runs hold, and top-up options
GET
/v1/billing
const url = 'https://api.supposing.app/v1/billing';const options = {method: 'GET'};
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.supposing.app/v1/billingResponses
Section titled “Responses”Successful Response
Media typeapplication/json
Billing
object
enabled
required
Enabled
False when this server has no payment provider; billed runs are then off.
boolean
balance_usd
required
Balance Usd
Credit available for new runs (holds of running runs are taken out).
number
held_usd
required
Held Usd
Credit held by queued and running runs and not yet spent.
number
topup_options_usd
required
Topup Options Usd
Array<integer>
min_topup_usd
required
Min Topup Usd
integer
max_topup_usd
required
Max Topup Usd
integer
free_grant_usd
required
Free Grant Usd
Welcome credit every new workspace gets.
number
topup_url
required
Topup Url
The web page where people add credit.
string
Example generated
{ "enabled": true, "balance_usd": 1, "held_usd": 1, "topup_options_usd": [ 1 ], "min_topup_usd": 1, "max_topup_usd": 1, "free_grant_usd": 1, "topup_url": "example"}Client error. Branch on code; show message and hint.
Media typeapplication/json
Error
The body of every non-2xx response.
object
code
required
Code
Stable machine-readable code, e.g. dataset_not_found.
string
message
required
Message
string
details
Details
Per-field problems, for invalid_request.
Any of:
Array<object>
ErrorDetailobject
field
required
Field
Dotted path to the field, e.g. ranking.rubric.
string
message
required
Message
string
null
Example generated
{ "code": "example", "message": "example", "hint": "example", "details": [ { "field": "example", "message": "example" } ]}Server error.
Media typeapplication/json
Error
The body of every non-2xx response.
object
code
required
Code
Stable machine-readable code, e.g. dataset_not_found.
string
message
required
Message
string
details
Details
Per-field problems, for invalid_request.
Any of:
Array<object>
ErrorDetailobject
field
required
Field
Dotted path to the field, e.g. ranking.rubric.
string
message
required
Message
string
null
Example generated
{ "code": "example", "message": "example", "hint": "example", "details": [ { "field": "example", "message": "example" } ]}