> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apistable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Credits & billing

> Buy credits in USD. See exactly how each result is charged.

> API preview: generation providers are not connected. An authenticated request can return 503 without creating a task or charging credits.

## Purchased, reserved, available

Payment orders record USD and the number of credits issued. Model consumption is recorded in Credits. Purchased credits are not API usage. Your available balance is the ledger balance minus outstanding reservations.

Pricing shown during preview is illustrative. The production exchange rate, payment channel, and active channel prices must be published before paid execution is enabled.

[View pricing](https://apistable.com/pricing)
[Open billing](https://apistable.com/console/billing)

## Read your balance

GET /v1/balance requires usage:read. It returns balance\_credits, reserved\_credits, and available\_credits. A new account may correctly return zero. The endpoint never creates trial credits or runs a payment.

```bash theme={null}
{
  "balance_credits": 0,
  "reserved_credits": 0,
  "available_credits": 0
}
```

## Four results, one clear total

| Result | Charge | Released |
| - | - | - |
| Low-cost success | 20 Credits | 40 Credits |
| Low-cost success | 20 Credits | 40 Credits |
| Official success | 60 Credits | 0 Credits |
| Both attempts failed | 0 Credits | 60 Credits |
| Total / 240 initially reserved | 100 Credits | 140 Credits |

> Example only. Failed attempts are platform costs; they are not added to the user’s bill. Each result item has at most one final consumption entry.

## Prices are locked at acceptance

* Each channel has its own parameter-based price, including rounding, minimum units, and applicable surcharges.
* Official success uses the disclosed official rate; low-cost success uses the low-cost rate. A later price edit cannot increase an accepted request’s cap.
* Unknown items retain only their own reservation. Known successful and failed siblings can settle or release independently.
* LLM stream interruption and native music bundles use their own published metering rules, not the image/video rule by assumption.


## OpenAPI

````yaml openapi.json GET /v1/balance
openapi: 3.1.0
info:
  title: APIstable API preview
  version: 0.1.0-preview
  description: >-
    Current implemented HTTP surface. / 当前已实现的 HTTP 接口。 Models and quote prices
    are illustrative. Real providers and paid generation are not connected. POST
    /v1/tasks and /v1/chat/completions return 503 provider_not_configured after
    authentication and applicable validation; no credits are reserved or
    charged. Live 202 acceptance, provider callbacks, SSE, idempotent task
    creation, and full model capability adapters remain future integration work.
    Website login sessions are separate from application API keys.
servers:
  - url: https://apistable.com
    description: APIstable API
security: []
tags:
  - name: Models
  - name: Quotes
  - name: Tasks
  - name: Credits
  - name: LLM
paths:
  /v1/balance:
    get:
      tags:
        - Credits
      summary: Read credit balance / 查询积分余额
      description: >-
        Requires usage:read. Reads the real account balance; never issues trial
        credits or executes a payment.
      operationId: getBalance
      responses:
        '200':
          description: Account credit balance
          content:
            application/json:
              schema:
                type: object
                required:
                  - balance_credits
                  - reserved_credits
                  - available_credits
                properties:
                  balance_credits:
                    type: number
                    minimum: 0
                    description: Credits, not USD. / 积分，非美元。
                  reserved_credits:
                    type: number
                    minimum: 0
                    description: Credits, not USD. / 积分，非美元。
                  available_credits:
                    type: number
                    minimum: 0
                    description: Credits, not USD. / 积分，非美元。
        '401':
          description: invalid_api_key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: insufficient_scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: not_found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: service_unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: APIstable API key
      description: >-
        API key beginning as_. Keep on the server. Scope permissions are checked
        separately.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.