Credits API
This API allows you to retrieve the total number of credits available on your account, including credits linked to your subscription and additional credits.Authentication (required)
Since the migration to the App Router, authentication is required for this endpoint:- Header
x-api-key: Your API key (generated in the Developer Space) - Request body
user_id: The user identifier associated with this API key
Retrieve your credits
POST /api/account/credit
Request Parameters
The unique user identifier (UUID) that you can retrieve from your Developer Space
Response
The total number of credits available on your account
The number of credits from your subscription
The number of additional credits purchased separately
Request Example
Response Example
Error Codes
| Code | Description |
|---|---|
| 400 | Invalid parameters (e.g. missing or invalid user_id) |
| 401 | Missing or invalid API key (header x-api-key required) |
| 503 | Service temporarily unavailable |
