Skip to content

Get Credit Balance

GET
/v1/credits
curl --request GET \
--url https://example.com/v1/credits \
--header 'X-API-Key: <X-API-Key>'

Get your current credit balance.

Returns the total available credits that can be used for finetune jobs. Credits are consumed when running finetune jobs based on instance hourly rates.

Next to the total, the split the dashboard’s billing page shows: starter credits, prepaid bundles and each voucher, left and granted. The split is the account members’ to read; it is null when it cannot be read.

Credit balance retrieved successfully

Media type application/json
CreditBalanceResponse

Response containing user’s credit balance.

object
balance
required

Total available credits

integer
grant_balance

Starter credits left; null when the split is unreadable

integer | null
grant_original_balance

Starter credits granted

integer | null
bundle_balance

Prepaid credits left

integer | null
bundle_original_balance

Prepaid credits bought

integer | null
bundle_last_top_up

When prepaid credits were last bought, ISO 8601

string | null
vouchers

Redeemed vouchers with credits left, soonest to expire first

Array<object>
nullable
CreditVoucher

One redeemed voucher that still has credits.

object
label

The voucher’s label, if it has one

string | null
balance
required

Credits left on it

integer
original_balance
required

Credits it granted

integer
expires_at

When it expires, ISO 8601

string | null
Example generated
{
"balance": 1,
"grant_balance": 1,
"grant_original_balance": 1,
"bundle_balance": 1,
"bundle_original_balance": 1,
"bundle_last_top_up": "example",
"vouchers": [
{
"label": "example",
"balance": 1,
"original_balance": 1,
"expires_at": "example"
}
]
}

Invalid or missing API key

Media type application/json
ErrorResponse

Standard error response.

object
detail
required

Error message describing what went wrong

string
Example generated
{
"detail": "example"
}