Step 1: Create your API key
Open the dashboard, connect your wallet, and sign the sign-in message. Choose AI credits to earn credit on future splits, then create an API key.
Copy the full key when it appears. It starts with api_ and is shown only once. If you lose it, revoke it and create another. All keys for a wallet spend from the same credit balance.
You can create a key before you have credit, and the dashboard tells you when your balance is $0. Paid requests need enough available credit to cover their reservation. Right after creating a key, test my key makes one tiny gpt-4.1-nano call with it, a fraction of a cent of your credit, so you can confirm it works before wiring up a client. Existing credits remain usable after you sell tokens or switch future rewards to SOL.
Step 2: Connect your client
In a tool that supports a custom OpenAI-compatible endpoint, set its base URL and API key to these values. The key comes from this site, not from an OpenAI account.
https://coldboot.pro/v1api_…Your full keyFor OpenAI-compatible clients, keep /v1 at the end of the base URL and use your dashboard API key for every endpoint. For chat, use a client’s Chat Completions mode. Image requests use /images/generations instead. Assistants, embeddings, audio transcription and general file uploads are not implemented by this gateway.
On the account payment rail, POST /messages accepts Anthropic-native requests with a qualified anthropic/model ID and max_tokens; POST /responses accepts OpenAI-native requests with a qualified openai/model ID and max_output_tokens. Both return the native synchronous or streaming response. For Messages only, an Anthropic SDK may send your dashboard key as x-api-key when Authorization is absent; Bearer authentication also works. Choose a currently priced, allowed model and an explicit small output cap; an omitted cap defaults to 8,192 tokens or the model’s lower maximum.
The full native endpoints are https://coldboot.pro/v1/messages and https://coldboot.pro/v1/responses. SDK URL joining differs: Anthropic SDKs append /v1/messages, so use https://coldboot.pro as their base, while the OpenAI examples use https://coldboot.pro/v1. Native exchanges are stateless: send the context you need each time. Responses use store: false; background execution, previous_response_id, conversation, stored prompt references and hosted tools are unsupported. Function tools are executed by your caller. Messages use anthropic-version: 2023-06-01; beta headers and context_management are unsupported. Native Gemini is unavailable on this rail; use its Chat Completions models. Native calls reserve conservatively, including image inputs, and settle from the account usage ledger. A pending or zero cost header before settlement does not mean the call was free.
Keep the key in a local environment variable or a server secret. Do not put it in public browser code or a shared repository.
Connect your agent with MCP
Use https://coldboot.pro/v1/mcp in a host that supports Streamable HTTP with a manually configured Bearer token. Put your dashboard key in the host’s private Authorization setting. The server exposes model discovery, balance, bounded chat and media calls, owned job polling and registered gateway tools.
For desktop hosts, install the package in your project and add the stdio configuration below. Launch the host from that project, or use the absolute path to the installed command. Set HOLDAPI_API_KEY in its private launcher environment. On Windows, a host may need node with the absolute path to node_modules/@holdapi/client/dist/cli.js.
npm install --allow-remote=all https://coldboot.pro/downloads/holdapi-client-0.2.0.tgz
Set HOLDAPI_API_KEY privately, or use HOLDAPI_API_KEY_FILE with an absolute path to a small owner-only key file. Configure exactly one source. The file must belong to your Windows user or Unix user and exclude access by other users.
Optionally set HOLDAPI_INPUT_DIR for source images. Local edits accept input_path and mask_path relative to that folder, with an 8 MiB combined image limit and a separate 12 MiB edit-body limit. Files outside the folder are refused. Set HOLDAPI_OUTPUT_DIR to save completed images, speech, music or video with a plain filename such as hero.png, voice.mp3 or clip.mp4. Pending jobs can be saved through poll_job after completion. Existing files are never overwritten. Remote MCP does not expose file paths.
Set HOLDAPI_SESSION_CAP_USD to a positive decimal such as 1.00 to cap cumulative reservations in one local launcher process. The guard tracks concurrent calls, pending holds and settled costs. Unknown charges stop new paid calls; tracked jobs remain pollable. Restarting the launcher starts a new budget, so this is not a persistent wallet limit. Without this setting, only per-call limits apply.
Typed tools describe search, Exa, read-only Solana RPC and prediction-market inputs. Image quality is supported on verified OpenAI account-rail models. The upstream does not expose background or output_format; those requests are refused before generation, so transparent brand marks remain unavailable through this route.
Paid MCP tools require maxCreditMicroUsd as a positive decimal string. Per-call and local session budgets limit reservations; verified provider usage can exceed reserved amounts. MCP batches and OAuth sign-in are unsupported. Hosts that require OAuth should use the local stdio launcher.
Use the TypeScript or Python client
These clients provide named gateway methods, owned-job polling and exact billing values. TypeScript requires Node.js 20.3 or newer; Python requires 3.10 or newer and has no third-party runtime dependencies. Both read your dashboard key from private configuration and never automatically retry paid requests.
// npm install --allow-remote=all https://coldboot.pro/downloads/holdapi-client-0.2.0.tgz
import { HoldApiClient } from '@holdapi/client';
const client = new HoldApiClient({ apiKey: process.env.HOLDAPI_API_KEY!, baseURL: "https://coldboot.pro/v1" });
const result = await client.models();
console.log(result.data);
// Paid calls accept { maxCreditMicroUsd: 100_000n } as their options.
// Inspect result.billing; pending charges are null, not zero.For a paid call, pass a positive integer reservation ceiling: maxCreditMicroUsd as a TypeScript bigint, or max_credit_micro_usd as a Python integer. The gateway rejects a reservation above that ceiling before dispatch. Keep pending charges separate from final billing. The JSON helpers refuse stream: true before sending; use a streaming HTTP transport for SSE.
Step 3: Choose a model
Copy a full model ID from the catalog. IDs use the form provider/model. A display name such as “GPT” or “Claude” is not a model ID.
Browse and copy a model ID
models · read from /v1/models
openai/gpt-6-astraopenai · chat, reasoning, coding, visionopenai/gpt-6.1-solopenai · chat, reasoning, coding, visionopenai/gpt-6-solopenai · chat, reasoning, coding, visionopenai/gpt-6-lunaopenai · chat, reasoning, coding, visionopenai/gpt-5.6-solopenai · chat, reasoning, coding, visionopenai/gpt-5.6-terraopenai · chat, reasoning, coding, visionopenai/gpt-5.6-lunaopenai · chat, coding, visionopenai/gpt-5.6-sol-proopenai · chat, reasoning, coding, visionopenai/gpt-5.6-terra-proopenai · chat, reasoning, coding, visionopenai/gpt-5.6-luna-proopenai · chat, reasoning, coding, visionopenai/gpt-5.5openai · chat, reasoning, coding, visionopenai/gpt-5.5-proopenai · chat, reasoning, coding, visionopenai/chat-latestopenai · chat, visionopenai/gpt-5.4openai · chat, reasoning, coding, visionopenai/gpt-5.4-proopenai · chat, reasoning, coding, visionopenai/gpt-5.1openai · chat, reasoning, coding, visionopenai/gpt-5.2openai · chat, reasoning, coding, visionopenai/gpt-5.4-miniopenai · chat, coding, visionopenai/gpt-5-miniopenai · chat, codingopenai/gpt-5.4-nanoopenai · chatopenai/gpt-5.2-proopenai · chat, reasoning, coding, visionopenai/gpt-5.3-codexopenai · coding, reasoning, chatopenai/gpt-4.1openai · chat, coding, visionopenai/gpt-4.1-miniopenai · chat, codingopenai/gpt-4.1-nanoopenai · chatopenai/gpt-4oopenai · chat, coding, visionopenai/gpt-4o-miniopenai · chat, codingopenai/o1openai · chat, reasoning, codingopenai/o3openai · chat, reasoning, codingopenai/o3-miniopenai · chat, reasoning, codingopenai/o4-miniopenai · reasoning, codingopenai/gpt-image-1openai · imageEstimate: 1024x1024: $0.021/image · 1536x1024: $0.042/image · 1024x1536: $0.042/imageopenai/gpt-image-2openai · imageEstimate: 1024x1024: $0.063/image · 1536x1024: $0.126/image · 1024x1536: $0.126/imageopenai/gpt-image-2.5-flareopenai · imageEstimate: 1024x1024: $0.294/image · 1536x1024: $0.588/image · 1024x1536: $0.588/imageopenai/gpt-image-2.5-sunburstopenai · imageEstimate: 1024x1024: $0.294/image · 1536x1024: $0.588/image · 1024x1536: $0.588/imageanthropic/claude-haiku-4.5anthropic · chat, coding, visionanthropic/claude-sonnet-5.5anthropic · chat, coding, reasoning, visionanthropic/claude-sonnet-5anthropic · chat, coding, reasoning, visionanthropic/claude-sonnet-4.6anthropic · chat, coding, reasoning, visionanthropic/claude-sonnet-4.5anthropic · chat, coding, reasoning, visionanthropic/claude-opus-4.5anthropic · chat, coding, reasoning, visionanthropic/claude-opus-4.7anthropic · chat, coding, reasoning, visionanthropic/claude-fable-5.1anthropic · chat, coding, reasoning, visionanthropic/claude-fable-5anthropic · chat, coding, reasoning, visionanthropic/claude-opus-4.8anthropic · chat, coding, reasoning, visionanthropic/claude-opus-5anthropic · chat, coding, reasoning, visionanthropic/claude-opus-5.5anthropic · chat, coding, reasoning, visiongoogle/gemini-4-argongoogle · chat, reasoning, coding, visiongoogle/gemini-3.1-progoogle · chat, reasoning, coding, visiongoogle/gemini-3-flash-previewgoogle · chat, reasoning, coding, visiongoogle/gemini-3.8-flashgoogle · chat, reasoning, coding, visiongoogle/gemini-3.6-flashgoogle · chat, reasoning, coding, visiongoogle/gemini-3.5-flashgoogle · chat, reasoning, coding, visiongoogle/gemini-2.5-progoogle · chat, reasoning, coding, visiongoogle/gemini-2.5-flashgoogle · chat, coding, visiongoogle/gemini-3.5-flash-litegoogle · chat, reasoninggoogle/gemini-3.1-flash-litegoogle · chat, reasoninggoogle/gemini-2.5-flash-litegoogle · chatgoogle/nano-bananagoogle · imageEstimate: 1024x1024: $0.0525/imagegoogle/nano-banana-2google · imageEstimate: 1024x1024: $0.0945/imagegoogle/nano-banana-progoogle · imageEstimate: 1024x1024: $0.105/image · 2048x2048: $0.105/image · 4096x4096: $0.1575/imagedeepseek/deepseek-v4-flash-vision-expdeepseek · chat, reasoning, visiondeepseek/deepseek-v4-prodeepseek · chat, reasoning, codingdeepseek/deepseek-v4.1-flashdeepseek · chat, reasoning, coding, visiondeepseek/deepseek-chatdeepseek · chat, coding, visiondeepseek/deepseek-reasonerdeepseek · chat, reasoning, coding, visionmoonshot/kimi-k3moonshot · chat, reasoning, coding, visionzai/glm-5.3zai · chat, reasoning, codingzai/glm-5.3-flashzai · chat, reasoning, coding, visionzai/glm-5.2zai · chat, reasoning, codingzai/glm-5.1zai · chat, reasoning, codingzai/glm-5zai · chat, reasoning, codingzai/glm-5-turbozai · chat, reasoningzai/cogview-4zai · imageEstimate: 512x512: $0.01575/image · 768x768: $0.01575/image · 1024x1024: $0.01575/image · 768x1344: $0.01575/image · 1344x768: $0.01575/image · 1440x1440: $0.021/imagexai/grok-4.3xai · reasoning, coding, vision, chatxai/grok-build-0.1xai · coding, chatxai/grok-4.7xai · reasoning, coding, vision, chat, searchxai/grok-4.6xai · reasoning, coding, vision, chat, searchxai/grok-4.5xai · reasoning, coding, vision, chat, searchxai/grok-imagine-imagexai · imageEstimate: 1024x1024: $0.021/imagexai/grok-imagine-image-2.0xai · imageEstimate: 1024x1024: $0.042/imagexai/grok-imagine-image-proxai · imageEstimate: 1024x1024: $0.0525/imagexai/grok-imagine-videoxai · videoPublished rate: $0.0525/secondxai/grok-imagine-video-1.5xai · videoPublished rate: $0.084/secondminimax/minimax-m2.7minimax · chat, reasoning, codingminimax/minimax-m3minimax · chat, reasoning, codingminimax/music-2.5+minimax · musicPublished rate: $0.1575/trackqwen/qwen3.8-maxqwen · chat, reasoning, codingqwen/qwen3.7-maxqwen · chat, reasoning, codingqwen/qwen3.7-plusqwen · chat, reasoning, codingqwen/qwen3.7-flashqwen · chat, reasoning, codingqwen/qwen3.8-flashqwen · chat, reasoning, coding, visiontencent/hy4-previewtencent · chat, reasoning, codingxiaomi/mimo-v2.5xiaomi · chat, reasoning, visionxiaomi/mimo-v2.5-proxiaomi · chat, reasoningnvidia/nemotron-3-nano-omni-30b-a3b-reasoningnvidia · chat, reasoning, visionnvidia/nemotron-3.5-lightningnvidia · chat, reasoningnvidia/llama-3.2-11b-visionnvidia · chat, visionnvidia/nemotron-3-ultra-550bnvidia · chat, reasoningpoolside/laguna-xs-2.1nvidia · chat, codingnvidia/muse-glimmer-30bnvidia · chat, reasoning, codingcohere/north-mini-codecohere · chat, codingpoolside/laguna-s-2.1poolside · chat, codingmistral/mistral-large-4mistral · chat, reasoning, coding, visionbytedance/seedream-5-probytedance · imageEstimate: 1024x1024: $0.04725/image · 1280x720: $0.04725/image · 2048x1024: $0.04725/image · 2048x2048: $0.0945/image · 2304x1728: $0.0945/image · 1728x2304: $0.0945/image · 2848x1600: $0.0945/image · 1600x2848: $0.0945/imagebytedance/seedance-1.5-probytedance · videoPublished rate: $0.0735/secondbytedance/seedance-2.0-fastbytedance · videoPublished rate: $0.17325/secondbytedance/seedance-2.0-minibytedance · videoPublished rate: $0.083685/secondbytedance/seedance-2.0bytedance · videoPublished rate: $0.23835/secondbytedance/seedance-2.5bytedance · videoPublished rate: $0.33075/secondbytedance/seed-audio-1.0bytedance · speech, ttsPublished rate: $0.003/second · output bound: 120sazure/sora-2azure · videoPublished rate: $0.105/secondelevenlabs/flash-v2.5elevenlabs · speech, ttsPublished rate: $0.0525/1,000 input characterselevenlabs/turbo-v2.5elevenlabs · speech, ttsPublished rate: $0.0525/1,000 input characterselevenlabs/multilingual-v2elevenlabs · speech, ttsPublished rate: $0.105/1,000 input characterselevenlabs/v3elevenlabs · speech, ttsPublished rate: $0.105/1,000 input characterselevenlabs/sound-effectselevenlabs · sound_effectPublished rate: $0.0525/generation
Use the same ID in your client’s model setting or the request’s model field. Choose a chat model for the chat example below, an image model for image generation, or a video model for the video section.
Step 4: Make your first request
On macOS, Linux, or a Bash shell, run the Settings snippet first. Replace api_your_dashboard_key with your full key and provider/model with a chat model ID from the catalog. Then copy the cURL, Python, or JavaScript example.
export OPENAI_BASE_URL="https://coldboot.pro/v1" export OPENAI_API_KEY="api_your_dashboard_key" export API_MODEL="provider/model"
The examples limit output to 256 tokens and turn off SDK retries. A smaller output limit can lower the reservation. If the model does not accept a parameter, use its supported equivalent.
On Windows PowerShell, set values with $env:OPENAI_API_KEY = 'your full key', and set OPENAI_BASE_URL and API_MODEL the same way. Then use the Python or JavaScript example.
Image generation
Choose a catalog row with type: "image". Its image reservation estimates are in pricing.usd_per_image and pricing.sizes, labeled pricing.is_estimate. Actual-token billing or an upstream quote determines the final charge. Image models use the image endpoint and are excluded from this site’s chat picker.
This example requests one 1024x1024 image. Set OPENAI_API_KEY to your full dashboard key first. Check that the model and size are listed in the current catalog before sending it; this is a paid request, not a free preview.
curl "https://coldboot.pro/v1/images/generations" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
--data '{"model":"openai/gpt-image-2","prompt":"a small robot tending a garden","size":"1024x1024","n":1}'The default generation request waits for an image URL in data[0].url. The catalog estimate is separate from the final provider charge. No image request is sent by reading or copying this example.
POST /images/edits accepts JSON with image as a base64 data URI or an array of data URIs, plus the model, prompt, size and count. It also accepts multipart files as image or repeated image[] fields. The file example edits one local PNG; it uses the provider’s image2image route, subject to the supported model and input limits.
On a rail supporting recoverable image jobs, add async: true in JSON or Prefer: respond-async to request a 202 response with a gateway id and poll_url. Poll /images/generations/{id} with a key for the same wallet. A pending response or reservation is not a final charge; the gateway settles the completed provider result. Unsupported async rails return an error before submission.
Video generation
Video takes two requests, because a clip takes one to three minutes to render. The first starts the job and reserves its cost. It answers 202 with a job id and a poll_url. The second polls that job: 202 while it renders, then 200 with the clip URL in data[0].url.
curl "https://coldboot.pro/v1/videos/generations" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
--data @- <<EOF
{"model":"bytedance/seedance-1.5-pro","prompt":"a robot dog skating down a quiet street, slow dolly","duration_seconds":5,"resolution":"720p"}
EOFVideo models are priced per second, not per token. The reservation covers the duration and resolution you ask for; duration_seconds and resolution default to the model’s own, and each model has a maximum duration. Read both from /models, where a video row carries type: "video" and pricing.usd_per_second.
Credits are charged on the poll that finds the job completed, and the reservation is released in full if the job fails. Polling costs nothing and is safe to repeat: a finished job returns the same clip URL and the same charge however many times you poll it.
Name a clip length as duration_seconds, in whole seconds. A field the gateway cannot price a video by is refused with a 400 naming it, rather than passed on where it could cost more than was reserved. If the provider quotes more than the reservation, the job is abandoned, the reservation is released, and the response is a 502 with both figures.
Only the key’s own wallet can poll a job. A job id from another wallet returns 404. Keep the id: without it, the reservation stays held until it is reconciled against the provider’s ledger.
Audio and tools
Read GET /tools before choosing a tool. Each registered route lists its method, endpoint, pricing policy, ownership requirement and readiness for the active payment rail. validated_per_request means the gateway still checks that request’s price before submitting it. unavailable_on_this_rail means it cannot run here. Discovery is not a promise that every provider capability is enabled: configured model and method allowlists still apply.
Speech, sound effects and music use their own endpoints, never the chat picker. The model catalog identifies speech, sound_effect and music rows. Their published rates may use characters, seconds, generations or tracks; read pricing.basis. A missing rate cannot be treated as free. A validated reservation is separate from the final provider charge.
curl "https://coldboot.pro/v1/tools" \ -H "Authorization: Bearer $OPENAI_API_KEY"
Speech returns JSON containing an audio URL, even when response_format is mp3. It does not return a raw MP3 body. Music can return a finished JSON response or 202 with an id and gateway poll_url. Poll the gateway with the same wallet’s key: pending jobs return 202, completed jobs return 200 with audio URLs. Repeated completed polls use the cached result without another charge.
The music duration is a hint, not a guaranteed clip length or spending cap: this provider can produce a full track. The gateway validates the reservation and spending limit before submission. A pending job keeps its reservation until its final charge is reconciled.
The registry also includes quoted phone reads at POST /phone/lookup and /phone/lookup/fraud, accepting {"phoneNumber":"+14155552671"} in E.164 format. Registered free feeds include GET /crypto, /fx and /commodity list, price and history paths, plus /usstock/list and /stocks/{market}/list. Check discovery, allowed query parameters and readiness before calling them.
Tool job, sandbox, portrait and enrollment IDs belong to the wallet that created them. Use gateway-returned IDs for later calls; an upstream ID or another wallet’s resource does not authorize access. Wallet resource listings are scoped to the authenticated wallet. Sandboxes can accrue lifetime charges, so inspect their pricing policy and explicitly terminate them when done.
Solana data
The same key reads Solana. POST /data/solana/rpc takes one standard JSON-RPC request and forwards it to a read-only node. It answers the usual account, token, block and transaction methods, the DAS asset reads (getAsset, getAssetsByOwner, searchAssets, getTokenAccounts, getAssetProof), getPriorityFeeEstimate, getTransactionsForAddress, and the paginated getProgramAccountsV2 and getTokenAccountsByOwnerV2. The methods and their parameters are the ones Helius defines.
curl "https://coldboot.pro/v1/data/solana/rpc" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","id":1,"method":"getAsset","params":{"id":"So11111111111111111111111111111111111111112"}}'These reads spend no credits: the answer carries x-api-cost-micro-usd: 0. The key still needs a wallet with a credit balance above zero, as a free model does. GET /data/feeds/{path} serves free crypto, FX and commodity price feeds the same way, with list, price/SYMBOL and history/SYMBOL under crypto, fx or commodity.
Reads only. A method that submits, signs or simulates a transaction is refused with a 400 rpc_method_not_allowed before anything is sent, and so is any method not on the allowlist, including getTransfersByAddress and the batch forms. Send one JSON-RPC request per call; a batch array is refused with a 400 invalid_json.
Limits: a per-key rate on top of your wallet’s rate, and one ceiling shared by every key; the current figures are in GET /data under limits. When the gateway as a whole reaches the shared ceiling you get a 429 data_capacity_exceeded with a retry-after header, even though your own key is under its limit.
GET /data lists every data endpoint the gateway knows and marks the ones this deployment answers with served: true. Check each row rather than assuming a priced endpoint is available. The separate GET /tools registry describes tool routes such as multi-chain RPC, search and prediction markets; tool readiness and pricing are checked on the active rail. An unavailable data endpoint answers 503 data_endpoint_unavailable without a charge.
API reference
Append these paths to the base URL. Use Authorization: Bearer api_… with your full key. Messages also accepts x-api-key when Authorization is absent. POST bodies use Content-Type: application/json, except multipart image edits, where your client sets the boundary.
POST/mcp
Authenticated Streamable HTTP MCP. Discover models and tools, invoke bounded requests and poll owned jobs. Bearer dashboard keys, stateless requests, no OAuth or batch calls.
POST/chat/completions
Send a model ID and a messages array. Add stream: true for streaming. Optional parameters depend on the selected model.
POST/messages
Account rail only: stateless Anthropic-native messages, sync or streaming. Use a qualified anthropic/model ID and max_tokens. The gateway uses anthropic-version 2023-06-01; beta headers are unsupported.
POST/responses
Account rail only: stateless OpenAI-native responses, sync or streaming. Use a qualified openai/model ID and max_output_tokens. Storage, background jobs, stored references and hosted tools are unsupported.
POST/images/generations
Generate images with a supported image model and a prompt. Size and image count depend on that model.
POST/images/edits
Edit a source image with JSON inline image data or multipart image files. This aliases the provider image2image route. Model and size support are validated before submission.
GET/images/generations/{id}
Poll an async image job with a key for its creating wallet. Pending jobs answer 202; completed results are cached. Use the gateway-returned opaque id.
POST/videos/generations
Start a video job with a video model and a prompt. Answers 202 with a job id and a poll_url. Optional duration_seconds and resolution depend on that model.
GET/videos/generations/{id}
Poll a video job. 202 while it runs, 200 with the clip URL when it is done. Polling is free, and only a key for the wallet that started the job can poll it.
GET/models
List the model IDs available through the gateway. Use the full id value in your requests. Each row has a type: chat models are priced per million tokens, image estimates per image and size, video rates per second, and audio rates by pricing.basis. Missing rates are unavailable, not zero.
POST/data/solana/rpc
One Solana JSON-RPC read: the standard account, token, block and transaction methods, the DAS asset methods, getPriorityFeeEstimate and getTransactionsForAddress. Read-only allowlist, one request per call, no credits spent.
GET/data/feeds/{path}
Free price feeds: crypto, fx or commodity list, or price and history by symbol, such as crypto/price/BTC-USD. No credits spent.
GET/data
List every data endpoint the gateway knows, with served: true on the ones this deployment answers.
GET/tools
Discover registered tool routes, methods, pricing policy, ownership requirements and readiness for this payment rail. Paid pricing is validated per request.
GET/balance
Read your wallet credit balance. credits_usd is the dollar balance; credits_micro_usd is the integer amount in millionths of a dollar.
curl "$OPENAI_BASE_URL/balance" \ -H "Authorization: Bearer $OPENAI_API_KEY"
How credits are spent
Before a request runs: the gateway reserves its estimated or quoted cost. Your available balance must cover the reservation, and the request must fit the per-call spending limit.
After the cost is known: usage-based billing settles the reservation to the provider’s reported cost and releases the difference. Quoted, prepaid requests are charged at the signed quote instead. Model pricing and the payment method affect the final cost.
Streaming responses and interrupted requests can leave a reservation pending until the provider’s cost is reconciled. A confirmed uncharged request releases its hold; a timeout alone does not confirm that a request was free.
If the final charge exceeds the reservation and your available balance, the unpaid amount is recorded. Future credit rewards first repay that amount before increasing your spendable balance. SOL rewards are not used to repay it.
Response headers include x-api-cost-micro-usd, x-api-reserved-micro-usd, and x-api-credits-remaining-micro-usd. For your current balance after a stream completes, read /balance or the dashboard.
One dollar equals 1,000,000 micro-USD. Creating another key does not create another balance or bypass the wallet’s limits.
Troubleshooting
Errors use an OpenAI-style JSON body with an error object. Read its code and message to distinguish errors with the same HTTP status.
- 400
Invalid request or model
Check the JSON body and use a full provider/model ID from the catalog. Choose the route for the model type.
- 401
Invalid API key
Use a complete, unrevoked api_ key from your dashboard. Send it as Authorization: Bearer followed by the key.
- 402
Insufficient credits
The balance must cover the reservation before a request starts. Check /balance, reduce max_tokens or the image count, or wait for more credits.
- 402
Request exceeds the spending limit
quote_over_limit means the estimate or quote is above the per-call ceiling. Reduce the requested output or image count; more balance alone does not lift this limit.
- 429
Too many requests
Slow down or reduce concurrent requests. Rate and concurrency limits are shared across your wallet’s keys.
- 400
RPC method not allowed
rpc_method_not_allowed means the method is not on the read-only allowlist of /data/solana/rpc. Nothing that submits, signs or simulates a transaction is forwarded. A JSON-RPC batch array is refused separately, as invalid_json: send one request per call.
- 429
Data endpoints at capacity
data_capacity_exceeded means the gateway as a whole is at the rate its data upstream allows, not that your key is over its limit. Wait for the retry-after header.
- 503
Data endpoint not served here
data_endpoint_unavailable means a priced data endpoint on a deployment that cannot pay for it. Nothing was charged. GET /data shows which endpoints are served.
- 502 / 503
Upstream service unavailable
Check your balance before retrying an uncertain request. A missing answer does not prove that the provider did not bill it.
If an answer is lost after a request is paid, retrying can create a second paid request. Check your balance and avoid blindly retrying an uncertain result.