Domains & Authentication
Check Balance
Query remaining credits for your auth code. The following two paths are equivalent — use either one:/api/v1/credits or /v1/credits.
Curl
| Field | Description |
|---|---|
balance | Remaining available credits |
amount | Total credits received |
Check Credit Usage Records
Addinclude_usage=true to the balance endpoint to return detailed credit usage records. Use pageSize to control page size, and pass the returned nextId to fetch the next page.
Curl
| Field | Description |
|---|---|
usage.pageSize | Page size returned by this request |
usage.nextId | Cursor for the next page. Empty means there are no more records |
usage.list[].model | Model or service used |
usage.list[].price | Credits charged for this record |
usage.list[].tokens | Total token count |
usage.list[].input_tokens | Input token count |
usage.list[].output_tokens | Output token count |
usage.list[].cache_hit_tokens | Cache hit token count |
usage.list[].cache_creation_tokens | Cache creation token count |
usage.list[].create_time | Charge time as a Unix millisecond timestamp |
OpenAI Format (Chat Completions)
Streaming Response
Non-Streaming Response
Claude Format (Anthropic Messages)
Streaming Response
Non-Streaming Response
OpenAI Responses API
Streaming Response
Non-Streaming Response
Gemini Format (Gemini Native)
Non-Streaming Response
Curl
Streaming Response
Curl
Gemini Nano Banana 2/Pro
Non-Streaming Response
Curl
Streaming Response
Curl