Get credit balance - cloro

Documentation Index

Fetch the complete documentation index at: /docs/llms.txt

Use this file to discover all available pages before exploring further.

Skip to main content

Assistant

Responses are generated using AI and may contain mistakes.

Get credit balance

cURL

curl --request GET \
  --url https://api.cloro.dev/v1/credits \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.cloro.dev/v1/credits"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.cloro.dev/v1/credits', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [\
  CURLOPT_URL => "https://api.cloro.dev/v1/credits",\
  CURLOPT_RETURNTRANSFER => true,\
  CURLOPT_ENCODING => "",\
  CURLOPT_MAXREDIRS => 10,\
  CURLOPT_TIMEOUT => 30,\
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\
  CURLOPT_CUSTOMREQUEST => "GET",\
  CURLOPT_HTTPHEADER => [\
    "Authorization: Bearer <token>"\
  ],\
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
    "fmt"
    "net/http"
    "io"
)

func main() {

url := "https://api.cloro.dev/v1/credits"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.cloro.dev/v1/credits")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.cloro.dev/v1/credits")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body

200

401

429

500

{
  "remaining": 48210,
  "perCycle": 1562500,
  "cycleResetsAt": "2026-08-10T17:35:27.000Z"
}
{
  "success": false,
  "error": {
    "code": "MISSING_API_KEY",
    "message": "Missing or invalid API key",
    "timestamp": "2025-01-15T12:00:00.000Z"
  }
}
{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "API key rate limit exceeded",
    "timestamp": "2025-01-15T12:00:00.000Z"
  }
}
{
  "success": false,
  "error": {
    "code": "INTERNAL_SERVER_ERROR",
    "message": "Maximum retries exceeded",
    "timestamp": "2025-01-15T12:00:00.000Z"
  }
}

GET

/

v1

/

credits

Try it

Get credit balance

cURL

curl --request GET \
  --url https://api.cloro.dev/v1/credits \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.cloro.dev/v1/credits"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.cloro.dev/v1/credits', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
    "fmt"
    "net/http"
    "io"
)

func main() {

url := "https://api.cloro.dev/v1/credits"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.cloro.dev/v1/credits")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.cloro.dev/v1/credits")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body

200

401

429

500

{
  "remaining": 48210,
  "perCycle": 1562500,
  "cycleResetsAt": "2026-08-10T17:35:27.000Z"
}
{
  "success": false,
  "error": {
    "code": "MISSING_API_KEY",
    "message": "Missing or invalid API key",
    "timestamp": "2025-01-15T12:00:00.000Z"
  }
}
{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "API key rate limit exceeded",
    "timestamp": "2025-01-15T12:00:00.000Z"
  }
}
{
  "success": false,
  "error": {
    "code": "INTERNAL_SERVER_ERROR",
    "message": "Maximum retries exceeded",
    "timestamp": "2025-01-15T12:00:00.000Z"
  }
}

Read your organization’s current credit balance and billing cycle without opening the dashboard. This endpoint is not billable: calling it charges 0 credits, so you can poll it freely. On an async-only workload this saves you a billable sync /v1/monitor/* request made only to read the X-Credits-Remaining header. Poll it to alert your team before you run out, and to pause task submission when the balance is too low to cover the next batch.

Navigate to header: Example usage Example usage

Navigate to header: Read your current balance Read your current balance

cURL

Response

curl -X GET "https://api.cloro.dev/v1/credits" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "remaining": 48210,
  "perCycle": 1562500,
  "cycleResetsAt": "2026-08-10T17:35:27.000Z"
}

Navigate to header: Low-balance alerts and a submission breaker Low-balance alerts and a submission breaker

Node.js

Python

import axios from 'axios';

const API_KEY = process.env.API_KEY;
const CREDITS_URL = 'https://api.cloro.dev/v1/credits';
const COST_PER_BATCH = 5000;

async function getCredits() {
  const { data } = await axios.get(CREDITS_URL, {
    headers: { Authorization: `Bearer ${API_KEY}` },
  });
  return data;
}

const { remaining, cycleResetsAt } = await getCredits();

if (remaining < 10_000) {
  const resetInfo = cycleResetsAt ? `resets ${cycleResetsAt}` : 'no active billing cycle';
  console.warn(`Low credit balance: ${remaining} remaining (${resetInfo})`);
}

if (remaining < COST_PER_BATCH) {
  console.log('Insufficient credits — pausing submission until the cycle resets or you top up');
} else {
  await submitNextBatch();
}
import os
import requests

API_KEY = os.environ['API_KEY']
CREDITS_URL = 'https://api.cloro.dev/v1/credits'
COST_PER_BATCH = 5000

def get_credits():
    response = requests.get(
        CREDITS_URL,
        headers={'Authorization': f'Bearer {API_KEY}'}
    )
    response.raise_for_status()
    return response.json()

credits = get_credits()
remaining = credits['remaining']
cycle_resets_at = credits['cycleResetsAt']

if remaining < 10_000:
    reset_info = f'resets {cycle_resets_at}' if cycle_resets_at else 'no active billing cycle'
    print(f'Low credit balance: {remaining} remaining ({reset_info})')

if remaining < COST_PER_BATCH:
    print('Insufficient credits — pausing submission until the cycle resets or you top up')
else:
    submit_next_batch()

Every task is checked against your live balance when it’s charged, so this read is a guardrail rather than a ledger. remaining counts completed charges only — it does not net out work you have already queued, so subtract your own outstanding creditsToCharge before sizing the next batch. To attribute exact cost per task, use the creditsCharged field on the task status response instead.

Authorizations

Navigate to header: Authorization

Authorization

string

header

required

cloro API key as a bearer token. One key grants every endpoint in this spec; per-key scopes are not available, so a client cannot request a narrower permission. Keys are created and revoked in the dashboard.

Response

200

application/json

Current credit balance and billing cycle.

Navigate to header: remaining

remaining

integer

required

Credits currently remaining for your organization.

Example:

48210

Navigate to header: perCycle

perCycle

integer | null

required

Credits granted per billing cycle. Null for free-tier organizations with no active subscription.

Example:

1562500

Navigate to header: cycleResetsAt

cycleResetsAt

string | null

required

When the current billing cycle ends and credits reset. Null for free-tier organizations with no active subscription.

Example:

"2026-08-10T17:35:27.000Z"

Was this page helpful?

YesNo

{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"cloro","colors":{"primary":"#60A5FA","light":"#93C5FD","dark":"#3B82F6"},"logo":{"light":"https://mintcdn.com/cloro/31REGvIJOWq8\_kV2/logo/light.svg?fit=max\\u0026auto=format\\u0026n=31REGvIJOWq8\_kV2\\u0026q=85\\u0026s=9649c139f2768786bbd491a86c1a9dd9","dark":"https://mintcdn.com/cloro/31REGvIJOWq8\_kV2/logo/dark.svg?fit=max\\u0026auto=format\\u0026n=31REGvIJOWq8\_kV2\\u0026q=85\\u0026s=8b254a805d19d5a08a152025628fc518","href":"https://cloro.dev/"},"favicon":"https://mintcdn.com/cloro/JJLSAXWoRDaE6XhQ/favicon.ico?fit=max\\u0026auto=format\\u0026n=JJLSAXWoRDaE6XhQ\\u0026q=85\\u0026s=fb070a58a43d3a399505f112fcb2cf5b","api":{"playground":{"proxy":false}},"navbar":{"primary":{"type":"button","label":"Dashboard","href":"https://dashboard.cloro.dev/"}},"footer":{"socials":{"github":"https://github.com/cloro-dev","website":"https://cloro.dev/"}},"seo":{"metatags":{"canonical":"https://cloro.dev/docs"}},"integrations":{"posthog":{"apiKey":"phc\_O2d3bu6YrOXrcUYH9E1Dx6zc4kkW8eez5qXOFbBWii3","apiHost":"https://reverseproxy.cloro.dev"}},"banner":{"content":"The AI Assistant is here to help — ask it anything instead of browsing through the pages.","dismissible":true},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cloro","hasAudioNarration":false,"actualSubdomain":"cloro","customDomains":["cloro.dev"],"gitSource":{"type":"github","owner":"cloro-dev","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"}},"buildId":"6afee69d0b27e3d5820b1225","clientVersion":"0.0.4227","searchFilterCounts":[{"language":"default","tag":"API Reference","count":76},{"language":"default","tag":"Google","count":37},{"language":"default","tag":"Documentation","count":23},{"language":"default","tag":"Guides","count":12},{"language":"default","tag":"Google AI Mode","count":10},{"language":"default","tag":"ChatGPT","count":10},{"language":"default","tag":"Integrations","count":9},{"language":"default","tag":"AI Overview","count":7},{"language":"default","tag":"Async tasks","count":5},{"language":"default","tag":"Gemini","count":5}]},"assistantConfig":{"deflection":{"enabled":true,"email":"support@cloro.dev"}},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]} {"page":{"pagePath":"api-reference/endpoint/get-credits","slug":"/api-reference/endpoint/get-credits","pageMetadata":{"title":"Get credit balance","description":"Read your organization's credit balance and billing cycle programmatically, so async-only workloads can alert or pause before the balance runs out.","openapi":"api-reference/openapi.json GET /v1/credits","href":"/api-reference/endpoint/get-credits"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Read your organization’s credit balance and billing cycle programmatically, so async-only workloads can alert or pause before the balance runs out.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Note}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Read your organization’s current credit balance and billing cycle without opening the dashboard. This endpoint is not billable: calling it charges 0 credits, so you can poll it freely. On an async-only workload this saves you a billable sync `,_jsx(_components.code,{children:`/v1/monitor/*`}),` request made only to read the `,_jsx(_components.code,{children:`X-Credits-Remaining`}),` header. Poll it to alert your team before you run out, and to pause task submission when the balance is too low to cover the next batch.`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-usage`,children:`Example usage`}),`\n`,_jsx(Heading,{level:`3`,id:`read-your-current-balance`,children:`Read your current balance`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` GET`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.cloro.dev/v1/credits\\"\`}),\_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_API_KEY\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Response`,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"remaining\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`48210`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"perCycle\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1562500`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cycleResetsAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-08-10T17:35:27.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`low-balance-alerts-and-a-submission-breaker`,children:`Low-balance alerts and a submission breaker`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`25`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`25`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` axios`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'axios'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` CREDITS_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.cloro.dev/v1/credits'\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`;\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#569CD6\`},children:\`const\`}),\_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` COST_PER_BATCH`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 5000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getCredits`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` axios`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`CREDITS_URL`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Bearer \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`remaining`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`cycleResetsAt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getCredits`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`remaining`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 10_000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` resetInfo`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` cycleResetsAt`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `resets \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`cycleResetsAt`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'no active billing cycle'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`warn`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`Low credit balance: \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`remaining`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` remaining (`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`resetInfo`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\")`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`remaining`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` COST_PER_BATCH`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Insufficient credits — pausing submission until the cycle resets or you top up'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` submitNextBatch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`27`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`27`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`CREDITS_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.cloro.dev/v1/credits'\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`COST\_PER\_BATCH\`}),\_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 5000`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` get_credits`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.get(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` CREDITS_URL`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Bearer `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.raise_for_status()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`credits`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` get_credits()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`remaining `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` credits`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'remaining'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`cycle_resets_at `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` credits`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'cycleResetsAt'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` remaining `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 10_000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` reset_info `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'resets `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`cycle_resets_at`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` cycle_resets_at `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'no active billing cycle'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Low credit balance: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`remaining`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` remaining (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`reset_info`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` remaining `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` COST_PER_BATCH`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Insufficient credits — pausing submission until the cycle resets or you top up'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` submit_next_batch()`})}),`\n`]})})})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Every task is checked against your live balance when it’s charged, so this read is a guardrail rather than a ledger. `,_jsx(_components.code,{children:`remaining`}),` counts completed charges only — it does not net out work you have already queued, so subtract your own outstanding `,_jsx(_components.code,{children:`creditsToCharge`}),` before sizing the next batch. To attribute exact cost per task, use the `,_jsx(_components.code,{children:`creditsCharged`}),` field on the `,_jsx(_components.a,{href:`/api-reference/endpoint/get-task-status`,children:`task status`}),` response instead.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get credit balance","description":"Read your organization's credit balance and billing cycle programmatically, so async-only workloads can alert or pause before the balance runs out.","openapi":"api-reference/openapi.json GET /v1/credits","href":"/api-reference/endpoint/get-credits"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Example usage","slug":"example-usage","depth":2,"children":[{"title":"Read your current balance","slug":"read-your-current-balance","depth":3,"children":[]},{"title":"Low-balance alerts and a submission breaker","slug":"low-balance-alerts-and-a-submission-breaker","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Get credit balance","description":"Read your organization's credit balance and billing cycle programmatically, so async-only workloads can alert or pause before the balance runs out.","operationId":"getCredits","security":["a214a35e-1013-48fd-8c51-ef02aee4a45c"],"responses":{"200":"e58ec3f1-77e8-425d-a554-01a32b2f6466","401":"f90b97bb-a377-4449-86a2-67f5bf911801","429":"08f75aa9-efc8-4f83-825d-b438a3568185","500":"89eeb61c-d58e-4079-951e-48cfc021f1d8"},"method":"get","type":"path","servers":["6c961360-d524-4a5c-b9bc-4fd78048e760"],"path":"/v1/credits","baseUrlOptions":["https://api.cloro.dev"\],"title":"Get credit balance","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated","disableProxy":true},"dependencies":{"parameters":{},"responses":{"e58ec3f1-77e8-425d-a554-01a32b2f6466":{"description":"Current credit balance and billing cycle.","content":{"application/json":{"schema":{"type":"object","required":["remaining","perCycle","cycleResetsAt"],"properties":{"remaining":{"type":"integer","description":"Credits currently remaining for your organization.","example":48210,"isRequired":true,"uniqueKey":"remaining","typeLabel":"integer"},"perCycle":{"oneOf":[{"type":"integer","description":"Credits granted per billing cycle. Null for free-tier organizations with no active subscription.","example":1562500,"isRequired":true,"uniqueKey":"perCycle.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Credits granted per billing cycle. Null for free-tier organizations with no active subscription.","example":1562500,"isRequired":true,"uniqueKey":"perCycle.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"perCycle","typeLabel":"integer | null"},"cycleResetsAt":{"oneOf":[{"type":"string","format":"date-time","description":"When the current billing cycle ends and credits reset. Null for free-tier organizations with no active subscription.","example":"2026-08-10T17:35:27.000Z","isRequired":true,"uniqueKey":"cycleResetsAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the current billing cycle ends and credits reset. Null for free-tier organizations with no active subscription.","example":"2026-08-10T17:35:27.000Z","isRequired":true,"uniqueKey":"cycleResetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"cycleResetsAt","typeLabel":"string\u003cdate-time> | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"remaining":48210,"perCycle":1562500,"cycleResetsAt":"2026-08-10T17:35:27.000Z"}}},"exampleType":"generated"}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer","example":997}},"X-Request-ID":{"description":"Unique ID for this request. Support uses it to find your request.","schema":{"type":"string","format":"uuid","example":"b0864943-5d45-4796-bc64-f052661256f0"}},"X-Latency-Ms":{"description":"Milliseconds the API spent on the request, from arrival to the start of the response. Excludes network transit.","schema":{"type":"integer","example":3420}}},"exampleType":"generated"},"f90b97bb-a377-4449-86a2-67f5bf911801":{"description":"Unauthorized - Authentication error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string","enum":["MISSING_API_KEY","INVALID_API_KEY_FORMAT","INVALID_OR_EXPIRED_API_KEY"],"example":"MISSING_API_KEY","uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","example":"Missing or invalid API key","uniqueKey":"error.message","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","example":"2025-01-15T12:00:00.000Z","uniqueKey":"error.timestamp","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":{"code":"MISSING_API_KEY","message":"Missing or invalid API key","timestamp":"2025-01-15T12:00:00.000Z"}}}},"exampleType":"generated"}},"exampleType":"generated"},"08f75aa9-efc8-4f83-825d-b438a3568185":{"description":"Too Many Requests - API key rate limit exceeded","headers":{"X-RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer","example":1000}},"X-RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer","example":997}},"X-Request-ID":{"description":"Unique ID for this request. Support uses it to find your request.","schema":{"type":"string","format":"uuid","example":"b0864943-5d45-4796-bc64-f052661256f0"}},"X-Latency-Ms":{"description":"Milliseconds the API spent on the request, from arrival to the start of the response. Excludes network transit.","schema":{"type":"integer","example":3420}}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string","example":"RATE_LIMIT_EXCEEDED","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"API key rate limit exceeded","uniqueKey":"error.message","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","example":"2025-01-15T12:00:00.000Z","uniqueKey":"error.timestamp","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":{"code":"RATE_LIMIT_EXCEEDED","message":"API key rate limit exceeded","timestamp":"2025-01-15T12:00:00.000Z"}}}},"exampleType":"generated"}},"exampleType":"generated"},"89eeb61c-d58e-4079-951e-48cfc021f1d8":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string","example":"INTERNAL_SERVER_ERROR","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"For example `Maximum retries exceeded` when every attempt failed, or `Internal server error` for an unexpected failure.","example":"Maximum retries exceeded","uniqueKey":"error.message","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","example":"2025-01-15T12:00:00.000Z","uniqueKey":"error.timestamp","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":{"code":"INTERNAL_SERVER_ERROR","message":"Maximum retries exceeded","timestamp":"2025-01-15T12:00:00.000Z"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"a214a35e-1013-48fd-8c51-ef02aee4a45c":{"bearerAuth":{"type":"http","scheme":"bearer","description":"cloro API key as a bearer token. One key grants every endpoint in this spec; per-key scopes are not available, so a client cannot request a narrower permission. Keys are created and revoked in the [dashboard](https://dashboard.cloro.dev/api-keys).","scopes":\[\],"schemeName":"bearerAuth"}}},"servers":{"6c961360-d524-4a5c-b9bc-4fd78048e760":{"url":"https://api.cloro.dev","description":"Production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"cloro API key as a bearer token. One key grants every endpoint in this spec; per-key scopes are not available, so a client cannot request a narrower permission. Keys are created and revoked in the [dashboard](https://dashboard.cloro.dev/api-keys).","scopes":\[\],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"cloro API key as a bearer token. One key grants every endpoint in this spec; per-key scopes are not available, so a client cannot request a narrower permission. Keys are created and revoked in the [dashboard](https://dashboard.cloro.dev/api-keys).","format":"bearer","typeLabel":"string\\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}\],"title":"bearerAuth"}\]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"cloro","siteName":"cloro","title":"Get credit balance - cloro","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-07T17:58:38.900Z","originalFileLocation":"api-reference/endpoint/get-credits.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Read your organization\u0026#x27;s credit balance and billing cycle programmatically, so async-only workloads can alert or pause before the balance runs out.\">\u003cmeta data-mint-head name=\"application-name\" content=\"cloro\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get credit balance - cloro\">\u003cmeta data-mint-head property=\"og:description\" content=\"Read your organization\u0026#x27;s credit balance and billing cycle programmatically, so async-only workloads can alert or pause before the balance runs out.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"cloro\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://cloro.dev/docs/api-reference/endpoint/get-credits\\">\\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cloro.mintlify.site/docs/\_mintlify/api/og/v2?division=Utilities\\u0026amp;title=Get+credit+balance\\u0026amp;description=Read+your+organization%27s+credit+balance+and+billing+cycle+programmatically%2C+so+async-only+workloads+can+alert+or+pause+before+the+balance+runs+out.\\u0026amp;theme=3dd67aad49c38e49a018244e\\u0026amp;signature=f1da79af5a50b1c42831a8080471dccfb15d75726170874defb60aaba9f5cd72\\">\\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Get credit balance - cloro\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Read your organization\u0026#x27;s credit balance and billing cycle programmatically, so async-only workloads can alert or pause before the balance runs out.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cloro.mintlify.site/docs/\_mintlify/api/og/v2?division=Utilities\\u0026amp;title=Get+credit+balance\\u0026amp;description=Read+your+organization%27s+credit+balance+and+billing+cycle+programmatically%2C+so+async-only+workloads+can+alert+or+pause+before+the+balance+runs+out.\\u0026amp;theme=3dd67aad49c38e49a018244e\\u0026amp;signature=f1da79af5a50b1c42831a8080471dccfb15d75726170874defb60aaba9f5cd72\\">\\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"cloro\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#60A5FA\">\u003clink data-mint-head rel=\"canonical\" href=\"https://cloro.dev/docs/api-reference/endpoint/get-credits\\">\\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/endpoint/get-credits.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\\",\\"@graph\\":\[{\\"@type\\":\\"Organization\\",\\"@id\\":\\"https://cloro.dev/#organization\\",\\"name\\":\\"cloro\\",\\"url\\":\\"https://cloro.dev\\",\\"logo\\":{\\"@type\\":\\"ImageObject\\",\\"url\\":\\"https://mintcdn.com/cloro/31REGvIJOWq8\_kV2/logo/light.svg?fit=max\\u0026auto=format\\u0026n=31REGvIJOWq8\_kV2\\u0026q=85\\u0026s=9649c139f2768786bbd491a86c1a9dd9\\"}},{\\"@type\\":\\"WebSite\\",\\"@id\\":\\"https://cloro.dev/docs#website\\",\\"name\\":\\"cloro\\",\\"url\\":\\"https://cloro.dev/docs\\",\\"publisher\\":{\\"@id\\":\\"https://cloro.dev/#organization\\"}},{\\"@type\\":\\"WebPage\\",\\"@id\\":\\"https://cloro.dev/docs/api-reference/endpoint/get-credits#webpage\\",\\"url\\":\\"https://cloro.dev/docs/api-reference/endpoint/get-credits\\",\\"name\\":\\"Get credit balance\",\"description\":\"Read your organization's credit balance and billing cycle programmatically, so async-only workloads can alert or pause before the balance runs out.\",\"dateModified\":\"2026-10-07T17:58:38.900Z\",\"isPartOf\":{\"@id\":\"https://cloro.dev/docs#website\\"},\\"breadcrumb\\":{\\"@id\\":\\"https://cloro.dev/docs/api-reference/endpoint/get-credits#breadcrumb\\"}},{\\"@type\\":\\"BreadcrumbList\\",\\"@id\\":\\"https://cloro.dev/docs/api-reference/endpoint/get-credits#breadcrumb\\",\\"itemListElement\\":\[{\\"@type\\":\\"ListItem\\",\\"position\\":1,\\"name\\":\\"Utilities\\",\\"item\\":\\"https://cloro.dev/docs/api-reference/endpoint/countries\\"},{\\"@type\\":\\"ListItem\\",\\"position\\":2,\\"name\\":\\"Get credit balance\",\"item\":\"https://cloro.dev/docs/api-reference/endpoint/get-credits\\"}\]},{\\"@type\\":\[\\"TechArticle\\",\\"APIReference\\"\],\\"@id\\":\\"https://cloro.dev/docs/api-reference/endpoint/get-credits#apireference\\",\\"headline\\":\\"Get credit balance\",\"name\":\"Get credit balance\",\"description\":\"Read your organization's credit balance and billing cycle programmatically, so async-only workloads can alert or pause before the balance runs out.\",\"url\":\"https://cloro.dev/docs/api-reference/endpoint/get-credits\\",\\"mainEntityOfPage\\":{\\"@id\\":\\"https://cloro.dev/docs/api-reference/endpoint/get-credits#webpage\\"},\\"dateModified\\":\\"2026-10-07T17:58:38.900Z\\",\\"publisher\\":{\\"@id\\":\\"https://cloro.dev/#organization\\"},\\"isPartOf\\":{\\"@id\\":\\"https://cloro.dev/docs#website\\"}}\]}\\u003c/script>\\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\\",\\"@type\\":\\"WebSite\\",\\"name\\":\\"cloro\\",\\"publisher\\":{\\"@type\\":\\"Organization\\",\\"name\\":\\"cloro\\"},\\"provider\\":{\\"@type\\":\\"Organization\\",\\"name\\":\\"Mintlify\\",\\"url\\":\\"https://mintlify.com\\"}}\\u003c/script>","agentPointerHref":"/docs/api-reference/endpoint/get-credits.md","siteName":"cloro","nav":{"global":null,"tabs":\[{"tab":"Documentation","icon":"book-open","pages":\[{"title":"Documentation","href":""}\]},{"tab":"API Reference","icon":"code","groups":[{"group":"Overview","pages":[{"title":"API reference","href":"/api-reference/introduction"}]},{"group":"ChatGPT","pages":[{"title":"Extract ChatGPT","openapi":"api-reference/openapi.json POST /v1/monitor/chatgpt","href":"/api-reference/endpoint/monitor-chatgpt"},{"title":"ChatGPT sources schema","sidebarTitle":"Sources","href":"/api-reference/endpoint/chatgpt/sources"},{"title":"ChatGPT shopping cards schema","sidebarTitle":"Shopping cards","tag":"Unavailable","href":"/api-reference/endpoint/chatgpt/shopping-cards"},{"title":"ChatGPT inline products schema","sidebarTitle":"Inline products","href":"/api-reference/endpoint/chatgpt/inline-products"},{"title":"ChatGPT product details schema","sidebarTitle":"Product details","href":"/api-reference/endpoint/chatgpt/product-details"},{"title":"ChatGPT entities schema","sidebarTitle":"Entities","href":"/api-reference/endpoint/chatgpt/entities"},{"title":"ChatGPT map entries schema","sidebarTitle":"Map entries","href":"/api-reference/endpoint/chatgpt/map"},{"title":"ChatGPT citation pills schema","sidebarTitle":"Citation pills","href":"/api-reference/endpoint/chatgpt/citation-pills"},{"title":"ChatGPT follow-up form schema","sidebarTitle":"Follow-up form","href":"/api-reference/endpoint/chatgpt/follow-up-form"},{"title":"ChatGPT sponsored ads schema","sidebarTitle":"Ads","href":"/api-reference/endpoint/chatgpt/ads"}]},{"group":"Google","pages":[{"title":"Extract Google Search","openapi":"api-reference/openapi.json POST /v1/monitor/google","href":"/api-reference/endpoint/monitor-google"},{"title":"Resolve a Google redirect link","sidebarTitle":"Redirect links","openapi":"api-reference/openapi.json POST /v1/monitor/google/goto","href":"/api-reference/endpoint/google/resolve-goto"},{"title":"Google organic search results schema","sidebarTitle":"Organic results","href":"/api-reference/endpoint/google/organic-results"},{"title":"Google Search sponsored ads schema","sidebarTitle":"Sponsored ads","href":"/api-reference/endpoint/google/sponsored-ads"},{"title":"Google Search shopping cards schema","sidebarTitle":"Shopping cards","href":"/api-reference/endpoint/google/shopping-cards"},{"title":"Get a Google shopping card product","sidebarTitle":"Shopping card product","openapi":"api-reference/openapi.json POST /v1/monitor/google/product","href":"/api-reference/endpoint/google/product"},{"title":"Google Search product results schema","sidebarTitle":"Product results","href":"/api-reference/endpoint/google/product-results"},{"title":"Google People Also Ask schema","sidebarTitle":"People Also Ask","href":"/api-reference/endpoint/google/people-also-ask"},{"title":"Google People Are Saying schema","sidebarTitle":"People Are Saying","href":"/api-reference/endpoint/google/people-are-saying"},{"title":"Google Recipes schema","sidebarTitle":"Recipes","href":"/api-reference/endpoint/google/recipes"},{"title":"Google Local Pack schema","sidebarTitle":"Local Pack","href":"/api-reference/endpoint/google/local-pack"},{"title":"Google Sports results schema","sidebarTitle":"Sports results","href":"/api-reference/endpoint/google/sports-results"},{"title":"Google Related websites schema","sidebarTitle":"Related websites","href":"/api-reference/endpoint/google/related-websites"},{"title":"Google Images schema","sidebarTitle":"Images","href":"/api-reference/endpoint/google/inline-images"},{"title":"Google Videos schema","sidebarTitle":"Videos","href":"/api-reference/endpoint/google/videos"},{"title":"Google Short videos schema","sidebarTitle":"Short videos","href":"/api-reference/endpoint/google/short-videos"},{"title":"Google Weather schema","sidebarTitle":"Weather","href":"/api-reference/endpoint/google/weather"},{"title":"Google Latest posts schema","sidebarTitle":"Latest posts","href":"/api-reference/endpoint/google/latest-posts"},{"title":"Google Finance quote schema","sidebarTitle":"Finance quote","href":"/api-reference/endpoint/google/finance-quote"},{"title":"Google Events schema","sidebarTitle":"Events","href":"/api-reference/endpoint/google/events"},{"title":"Google Discussions and forums schema","sidebarTitle":"Discussions and forums","href":"/api-reference/endpoint/google/discussions-and-forums"},{"title":"Google Things to know schema","sidebarTitle":"Things to know","href":"/api-reference/endpoint/google/things-to-know"},{"title":"Google transit results schema","sidebarTitle":"Transit results","href":"/api-reference/endpoint/google/transit-results"},{"title":"Google Flights schema","sidebarTitle":"Flights","href":"/api-reference/endpoint/google/flights"},{"title":"Google hotel results schema","sidebarTitle":"Hotel results","href":"/api-reference/endpoint/google/hotel-results"},{"title":"Google stores schema","sidebarTitle":"Stores","href":"/api-reference/endpoint/google/stores"},{"title":"Google comparison shopping sites schema","sidebarTitle":"Comparison shopping sites","href":"/api-reference/endpoint/google/comparison-shopping-sites"},{"title":"Google top sights schema","sidebarTitle":"Top sights","href":"/api-reference/endpoint/google/top-sights"},{"title":"Google related searches schema","sidebarTitle":"Related searches","href":"/api-reference/endpoint/google/related-searches"},{"group":"AI Overview","root":{"title":"Google AI Overview schema","sidebarTitle":"AI Overview","href":"/api-reference/endpoint/google/ai-overview"},"pages":[{"title":"Google AI Overview sources schema","sidebarTitle":"Sources","href":"/api-reference/endpoint/google/ai-overview/sources"},{"title":"Google AI Overview citation pills schema","sidebarTitle":"Citation pills","href":"/api-reference/endpoint/google/ai-overview/citation-pills"},{"title":"Google AI Overview related links schema","sidebarTitle":"Related links","href":"/api-reference/endpoint/google/ai-overview/related-links"},{"title":"Google AI Overview places and map schema","sidebarTitle":"Places and map","href":"/api-reference/endpoint/google/ai-overview/places-and-map"},{"title":"Google AI Overview inline products schema","sidebarTitle":"Inline products","href":"/api-reference/endpoint/google/ai-overview/inline-products"},{"title":"Google AI Overview videos schema","sidebarTitle":"Videos","href":"/api-reference/endpoint/google/ai-overview/videos"},{"title":"Google AI Overview ads schema","sidebarTitle":"Ads","href":"/api-reference/endpoint/google/ai-overview/ads"}]},{"title":"Google Knowledge Graph schema","sidebarTitle":"Knowledge Graph","href":"/api-reference/endpoint/google/knowledge-graph"}]},{"group":"Google AI Mode","pages":[{"title":"Extract Google AI Mode","openapi":"api-reference/openapi.json POST /v1/monitor/aimode","href":"/api-reference/endpoint/monitor-aimode"},{"title":"Google AI Mode sources schema","sidebarTitle":"Sources","href":"/api-reference/endpoint/aimode/sources"},{"title":"Google AI Mode citation pills schema","sidebarTitle":"Citation pills","href":"/api-reference/endpoint/aimode/citation-pills"},{"title":"Google AI Mode places schema","sidebarTitle":"Places","href":"/api-reference/endpoint/aimode/places"},{"title":"Google AI Mode shopping cards schema","sidebarTitle":"Shopping cards","href":"/api-reference/endpoint/aimode/shopping-cards"},{"title":"Google AI Mode product results schema","sidebarTitle":"Product results","href":"/api-reference/endpoint/aimode/product-results"},{"title":"Google AI Mode ads schema","sidebarTitle":"Ads","href":"/api-reference/endpoint/aimode/ads"},{"title":"Google AI Mode inline products schema","sidebarTitle":"Inline products","href":"/api-reference/endpoint/aimode/inline-products"},{"title":"Google AI Mode videos schema","sidebarTitle":"Videos","href":"/api-reference/endpoint/aimode/videos"},{"title":"Google AI Mode map schema","sidebarTitle":"Map","href":"/api-reference/endpoint/aimode/map"}]},{"group":"Bing AI Mode","pages":[{"title":"Extract Bing AI Mode","openapi":"api-reference/openapi.json POST /v1/monitor/bing/aimode","href":"/api-reference/endpoint/monitor-bing-aimode"},{"title":"Bing AI Mode sources schema","sidebarTitle":"Sources","href":"/api-reference/endpoint/bing-aimode/sources"},{"title":"Bing AI Mode citation pills schema","sidebarTitle":"Citation pills","href":"/api-reference/endpoint/bing-aimode/citation-pills"}]},{"group":"Gemini","pages":[{"title":"Extract Google Gemini","openapi":"api-reference/openapi.json POST /v1/monitor/gemini","href":"/api-reference/endpoint/monitor-gemini"},{"title":"Google Gemini sources schema","sidebarTitle":"Sources","href":"/api-reference/endpoint/gemini/sources"},{"title":"Google Gemini citation pills schema","sidebarTitle":"Citation pills","href":"/api-reference/endpoint/gemini/citation-pills"},{"title":"Google Gemini places schema","sidebarTitle":"Places","href":"/api-reference/endpoint/gemini/places"},{"title":"Google Gemini shopping cards schema","sidebarTitle":"Shopping cards","href":"/api-reference/endpoint/gemini/shopping-cards"}]},{"group":"Google News","pages":[{"title":"Extract Google News","openapi":"api-reference/openapi.json POST /v1/monitor/google/news","href":"/api-reference/endpoint/monitor-google-news"},{"title":"Google News articles schema","sidebarTitle":"News articles","href":"/api-reference/endpoint/google-news/news-articles"}]},{"group":"Async tasks","pages":[{"title":"Create async task","openapi":"api-reference/openapi.json POST /v1/async/task","href":"/api-reference/endpoint/create-async-task"},{"title":"Get task status","openapi":"api-reference/openapi.json GET /v1/async/task/{taskId}","href":"/api-reference/endpoint/get-task-status"},{"title":"Create batch tasks","openapi":"api-reference/openapi.json POST /v1/async/task/batch","href":"/api-reference/endpoint/create-batch-tasks"},{"title":"Get async status","openapi":"api-reference/openapi.json GET /v1/async/status","href":"/api-reference/endpoint/get-async-status"},{"title":"Clear queue","openapi":"api-reference/openapi.json DELETE /v1/async/queue","href":"/api-reference/endpoint/clear-async-queue"}]},{"group":"Utilities","pages":[{"title":"List of countries","openapi":"api-reference/openapi.json GET /v1/countries","href":"/api-reference/endpoint/countries"},{"title":"List of states","openapi":"api-reference/openapi.json GET /v1/states","description":"Returns a list of US states supported for state-level geo-targeting. Only US is currently supported — other country values return an empty array.","href":"/api-reference/endpoint/states"},{"title":"Get credit balance","openapi":"api-reference/openapi.json GET /v1/credits","href":"/api-reference/endpoint/get-credits"}]}]},{"tab":"Changelog","icon":"newspaper","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Get credit balance - cloro","deploymentId":"dpl_2MqcLy8smQrrovUehgcZEsoo1tJX","buildId":"dpl_2MqcLy8smQrrovUehgcZEsoo1tJX","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DyP0AOE1.js","snippetPresets-CuYPAUIG.js","utils-ez5j6NBT.js","style-to-object-BY3JEAdk.js","utils-DG4aeUOF.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-DFhcMUrP.js","conditional-requirements-CFM0id0Q.js","cloneDeep-ByDTqllG.js","_Uint8Array-CJ2WjX_H.js","isObject-FP1Yky1u.js","ApiExamples-fyn9sMD9.js","usePlaygroundInputsStore-Bf0N_Y6L.js","shallow-CnU26VTn.js","isEqual-OWIKZzop.js","CodeSnippets-CZ9-M31v.js","CodeSnippet-CCk6UVRR.js","getApiPlaygroundDisplay-BUw5JwZB.js","Page-CInwEL5w.js","DynamicMarkdown-CU5QIokU.js","SectionHeading-BoT1NwPU.js","icon-MsvNhD56.js","MethodPill-CC7p0-fp.js","getPastedJson-BOWYR2ND.js","DuplicateIcon-DOWJyC1b.js","createIcon-BsNyCaLY.js","axios-CsQoIw0U.js","Markdown-L0uigQE0.js","AssistantPageLink-Cur5OU4v.js","dist-CLdzWocy.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}