Account
Get Credit Balance
Return the caller's qBraid and AWS credit balances. The organization is taken from the API key, which is bound to a single organization.
Authorizations
X-API-KEYstringheaderrequiredAuthenticate requests using an API key linked to your qBraid account. Obtain your key by registering or logging in at account.qbraid.com.
Response
200Success.
successbooleanrequireddataobjectrequired400Organization context required.
401Authentication required.
404User is not a member of this organization.
curl --request GET \
--url https://api-v2.qbraid.com/api/v1/billing/credits/balance \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api-v2.qbraid.com/api/v1/billing/credits/balance"
headers = {
"X-API-KEY": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.json())const url = "https://api-v2.qbraid.com/api/v1/billing/credits/balance";
const options = {
method: "GET",
headers: {"X-API-KEY":"<api-key>"},
};
const response = await fetch(url, options);
console.log(await response.json());{
"success": true,
"data": {
"qbraidCredits": 123,
"awsCredits": 123,
"autoRecharge": "enabled",
"organizationId": "<string>",
"userId": "<string>"
}
}{
"success": false,
"message": "<string>",
"error": {
"message": "<string>",
"code": "<string>"
}
}{
"success": false,
"message": "<string>",
"error": {
"message": "<string>",
"code": "<string>"
}
}{
"success": false,
"message": "<string>",
"error": {
"message": "<string>",
"code": "<string>"
}
}GET
Get credit balance
Get credit balance
Response
Fill in the request and press Send to see the live response.Was this page helpful?
Thanks for your feedback.

