API Units
Read the remaining API Units for the workspace of the current API key. This request is read-only and does not deduct API Units.
balance is the remaining API Units for the workspace (see Billing). It uses the same unit as cost_usage on a task result. It is not the website Credits balance. Website Credits cannot be used for API calls.
Get the balance
GET https://wayinvideo-api.wayin.ai/api/v2/units
This endpoint has no request body.
Response
{
"data": {
"balance": 150.5
}
}
| Field | Type | Description |
|---|---|---|
balance | number | Remaining API Units. Same unit as cost_usage. 0 when the workspace has no API Units. |
Example Request
curl -X GET 'https://wayinvideo-api.wayin.ai/api/v2/units' \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-wayinvideo-api-version: v2"