Docs / Credits
Get credits
GET /v1/credits
Returns the customer's credits. Only a customer's key may. A job holds the most it may cost from the balance until it completes, then gives back
what it did not cost.
Responses
200 The customer's balance, and what this key may still spend. 401 Send a valid API key as Authorization: Bearer <key>. 403 The key is not a customer's. 500 Something went wrong on our side.
200 returns Credits . Every error is a Problem , whose detail says what went wrong.
$ curl https://api.sequencylabs.com/v1/credits \
-H "Authorization: Bearer $SEQUENCY_API_KEY"
import os
import httpx
response = httpx.get(
"https://api.sequencylabs.com/v1/credits" ,
headers={ "Authorization" : f"Bearer {os.environ['SEQUENCY_API_KEY']}" },
)
response.raise_for_status()
data = response.json()
const response = await fetch( "https://api.sequencylabs.com/v1/credits" , {
headers : {
Authorization : `Bearer ${process.env.SEQUENCY_API_KEY}` ,
},
});
const data = await response.json();
{
"balance" : 5000.0 ,
"key_limit" : null ,
"key_spent" : 10.0
}