Billing & Credits
Every Quantized license has a credit balance. Successful API calls consume credits based on the model, how much you send and receive (for example token counts), and the rates that apply to your license.
Credit system
| Unit | Meaning |
|---|---|
| Micro-credit | Smallest unit reported in the API (credits_used, credits_remaining, license fields). |
| Credit | 1 credit = 1,000,000 micro-credits (useful when reading large balances). |
Use the Models endpoint to see per-model cost rates (prompt, completion per million tokens) for planning usage.
Example: usage in a response
After a request completes, the usage object includes how many micro-credits were spent and what is left on your license:
{
"usage": {
"prompt_tokens": 25,
"completion_tokens": 50,
"total_tokens": 75,
"credits_used": 3200,
"credits_remaining": 996800
}
}
| Field | Description |
|---|---|
credits_used |
Micro-credits consumed by this request |
credits_remaining |
Micro-credits remaining on your license (null if unlimited) |
Embedding endpoints (POST /v1/embeddings) return prompt_tokens and total_tokens only — completion_tokens is not present because the response is a vector, not generated text. total_tokens equals prompt_tokens for these calls.
Checking your balance
Use the License endpoint to check your current balance without consuming credits:
curl https://api.quantized.us/v1/license \
-H "Authorization: Bearer sk-quantized-YOUR-KEY"
Insufficient balance
When your balance is exhausted, requests return 402 Payment Required:
{
"error": {
"message": "Insufficient credits"
}
}
Contact your institution administrator to top up your license.