Get Remaining Credits
Endpoint
GET /chat/credit
Full URL: https://modelfold.ai/v1/chat/credit
Authentication: every request must include the
Authorization: Bearer <API_KEY>header.
TIP
Get the current credit balance available in your account.
Usage Guide
- Use this interface to check your current credit balance
- Monitor usage to ensure sufficient credits to continue using services
- Plan credit replenishment based on usage patterns
Developer Notes
- All generation services require credit balance
- Service access will be restricted when credits are exhausted
- Credit consumption is based on specific services and usage volume
Response
200 — Request successful
| Parameter | Type | Required | Description |
|---|---|---|---|
code | integer | Yes | Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying). Allowed values: 200 / 401 / 404 / 429 / 455 / 500. Example: 200. |
msg | string | Yes | Error message when code != 200 Example: success. |
data | number | Yes | Remaining credits (may have decimals) Example: 100.5. |
json
{
"code": 200,
"msg": "success",
"data": 100.5
}500 — Server error.
| Parameter | Type | Required | Description |
|---|---|---|---|
code | integer | Yes | Response status code - 200: Success - Request has been processed successfully - 401: Unauthorized - Authentication credentials are missing or invalid - 402: Insufficient Credits - Account does not have enough credits to perform the operation - 404: Not Found - The requested resource or endpoint does not exist - 408: Timeout - No result has been returned for over 10 minutes. - 422: Validation Error - The request parameters failed validation checks - 429: Rate Limited - Request limit has been exceeded for this resource - 455: Service Unavailable - System is currently undergoing maintenance - 500: Server Error - An unexpected error occurred while processing the request - 501: Generation Failed - Content generation task failed - 505: Feature Disabled - The requested feature is currently disabled |
msg | string | Yes | Response message, error description when failed |
data | object | Yes | — |
json
{
"code": 500,
"msg": "Server Error - An unexpected error occurred while processing the request",
"data": null
}