Credits available to this project
const url = 'https://zkao.io/api/v1/projects/example/billing/balance';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://zkao.io/api/v1/projects/example/billing/balance \ --header 'Authorization: Bearer <token>'Requires scope: read. The organization’s shared prepaid balance, available to this project and to the organization’s other projects. All amounts are in credits.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Responses
Section titled “ Responses ”OK
object
The organization whose shared balance this is.
object
URL segment of the organization (/orgs/<slug>), unique across zkao.
The organization’s total prepaid credit balance, shared by all of its projects.
Balance minus credits reserved by the organization’s in-flight scans.
Credits held by the organization’s queued/running scans.
Examplegenerated
{ "organization": { "id": "example", "slug": "example", "name": "example" }, "balanceCredits": 1, "availableCredits": 1, "reservedCredits": 1}Missing, malformed, expired, or revoked token
object
object
Budget_below_minimum only: the least the launch could have reserved, in credits. A diff scan’s first scan of a repository also builds its overview, so its minimum is higher.
Example
{ "error": { "code": "unauthorized" }}The token lacks the required scope
object
object
Budget_below_minimum only: the least the launch could have reserved, in credits. A diff scan’s first scan of a repository also builds its overview, so its minimum is higher.
Example
{ "error": { "code": "unauthorized" }}Resource not in this token’s project or repo allowlist
object
object
Budget_below_minimum only: the least the launch could have reserved, in credits. A diff scan’s first scan of a repository also builds its overview, so its minimum is higher.
Example
{ "error": { "code": "unauthorized" }}