How Billing Works
Each inference task you run costs credits from the balance attached to your API key. The cost rules are simple:
- You're charged only for successful tasks. When a task reaches
success, itscostis deducted from your balance. - Failures and cancellations are free. Tasks that end in
failedorcanceleddon't cost anything. - Pricing is per model. Each model sets its own price per inference, so expensive models cost more per call.
Checking your balance
To see the current balance for the user or organization that owns your API key, call the balance endpoint, GET /api-key/balance. The response includes your available balance, any free credits, accrued debt, and earnings from models you've published. These balance fields come back as decimal strings, so read them as strings and convert to your language's decimal type for arithmetic. See the API Reference for more details.
curl https://api.aiozai.network/api/v1/api-key/balance \
-H "x-api-key: $AIOZ_AI_API_KEY"To check your balance and handle insufficient-balance failures in code, see Working with Tasks.
Quoting a price before you run
Cost-quoting (looking up what a model charges per inference before you submit a task) is covered in the Working with Models guide.
Where to learn more
This page covers only the API-side mechanics of inference billing. Storage uploads are billed separately and also require a positive balance (see Working with Storage). For storage pricing, pricing tiers, top-up flows, invoices, and other account-level payment topics, see the platform's payments documentation.