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.
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 osimport requestsAPI_KEY = os.environ['API_KEY']CREDITS_URL = 'https://api.cloro.dev/v1/credits'COST_PER_BATCH = 5000def 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.
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.
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?
{"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":""},"chroma":{"liveDeploymentHistoryId":"6ae0cc2beb5b4f30de3fbb8f","collectionId":"13051ceb-df42-447c-be86-245307a6fcee","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae0cc2beb5b4f30de3fbb8f"},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"}},"buildId":"6ae0cc2beb5b4f30de3fbb8f","clientVersion":"0.0.4005","searchFilterCounts":[{"language":"default","tag":"API Reference","count":60},{"language":"default","tag":"Documentation","count":21},{"language":"default","tag":"Google","count":14},{"language":"default","tag":"Guides","count":12},{"language":"default","tag":"AI Mode","count":10},{"language":"default","tag":"ChatGPT","count":9},{"language":"default","tag":"Integrations","count":7},{"language":"default","tag":"Perplexity","count":6},{"language":"default","tag":"Async tasks","count":5},{"language":"default","tag":"Copilot","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":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","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":"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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"workos-enabled","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":["228a23b0-11a8-437d-aa3a-ef18a59764ac"],"responses":{"200":"e5c3977a-34df-42dc-9086-b4d69fa72e8a","401":"c2d5d59d-ee56-477c-9750-43abe84bed4f","429":"e07ddedc-522e-40fa-a680-45177ea3bdd9","500":"fc7e2e56-89fc-401a-b827-c9b1cbd4baf1"},"method":"get","type":"path","servers":["9774c365-d2c0-45a5-8807-0e90008e0e96"],"path":"/v1/credits","baseUrlOptions":["https://api.cloro.dev"],"title":"Get credit balance","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated","disableProxy":true},"dependencies":{"parameters":{},"responses":{"e5c3977a-34df-42dc-9086-b4d69fa72e8a":{"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"},"c2d5d59d-ee56-477c-9750-43abe84bed4f":{"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"},"e07ddedc-522e-40fa-a680-45177ea3bdd9":{"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"},"fc7e2e56-89fc-401a-b827-c9b1cbd4baf1":{"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":{"228a23b0-11a8-437d-aa3a-ef18a59764ac":{"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":{"9774c365-d2c0-45a5-8807-0e90008e0e96":{"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.app/_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=e60a6bd41fc1516842c4eacb\u0026amp;signature=675bb5a00b0702b6b6d64c55a6df7013361eef1fa95649c0ab29cf4f64e708aa\">\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.app/_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=e60a6bd41fc1516842c4eacb\u0026amp;signature=675bb5a00b0702b6b6d64c55a6df7013361eef1fa95649c0ab29cf4f64e708aa\">\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\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","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 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 related searches schema","sidebarTitle":"Related searches","href":"/api-reference/endpoint/google/related-searches"},{"title":"Google AI Overview schema","sidebarTitle":"AI Overview","href":"/api-reference/endpoint/google/ai-overview"},{"title":"Google Knowledge Graph schema","sidebarTitle":"Knowledge Graph","href":"/api-reference/endpoint/google/knowledge-graph"}]},{"group":"Perplexity","pages":[{"title":"Extract Perplexity","openapi":"api-reference/openapi.json POST /v1/monitor/perplexity","href":"/api-reference/endpoint/monitor-perplexity"},{"title":"Perplexity sources schema","sidebarTitle":"Sources","href":"/api-reference/endpoint/perplexity/sources"},{"title":"Perplexity citation pills schema","sidebarTitle":"Citation pills","href":"/api-reference/endpoint/perplexity/citation-pills"},{"title":"Perplexity shopping cards schema","sidebarTitle":"Shopping cards","href":"/api-reference/endpoint/perplexity/shopping-cards"},{"title":"Perplexity media results schema","sidebarTitle":"Media","href":"/api-reference/endpoint/perplexity/media"},{"title":"Perplexity travel and places schema","sidebarTitle":"Travel and places","href":"/api-reference/endpoint/perplexity/travel-and-places"}]},{"group":"Copilot","pages":[{"title":"Extract Microsoft Copilot","openapi":"api-reference/openapi.json POST /v1/monitor/copilot","href":"/api-reference/endpoint/monitor-copilot"},{"title":"Microsoft Copilot sources schema","sidebarTitle":"Sources","href":"/api-reference/endpoint/copilot/sources"},{"title":"Microsoft Copilot citation pills schema","sidebarTitle":"Citation pills","href":"/api-reference/endpoint/copilot/citation-pills"},{"title":"Microsoft Copilot shopping cards schema","sidebarTitle":"Shopping cards","href":"/api-reference/endpoint/copilot/shopping-cards"},{"title":"Microsoft Copilot map entries schema","sidebarTitle":"Map entries","href":"/api-reference/endpoint/copilot/map-entries"}]},{"group":"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":"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"}]}]},"title":"Get credit balance - cloro","buildId":"dpl_EARnBX9sYeZdmtDtdMETnj8cZgAL","deploymentId":"dpl_EARnBX9sYeZdmtDtdMETnj8cZgAL","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Dwo5Zw1g.js","utils-C7ri5h_X.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-NXX1NHuC.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BFzrXK_e.js","snippetPresets-DLhzf4mt.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-BlCO4kMh.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-B9z96fnb.js","shallow-AopVKJh8.js","getApiPlaygroundDisplay-bXnLOTlk.js","CodeSnippet-DmJ3qzrb.js","CodeSnippets-hcFGtmzn.js","Page-ChlUUCY4.js","getPastedJson-ps4MHraj.js","icon-L__7y7ys.js","MethodPill-CLOMdS5n.js","DuplicateIcon-m7x5FI4L.js","createIcon-BiD_Arde.js","DynamicMarkdown-a43r1ghB.js","SectionHeading-4c_bODjK.js","axios-vUo_bRtp.js","Markdown-DWTe9S87.js","clsx-Dhq8D58W.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CVox-mr5.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-yCZrC9EP.js"]}