Get Remaining Credits
This page is generated from the upstream official OpenAPI documentation. Endpoints, parameters and examples match the official docs; brand and API domain are replaced with ModelFold.
Endpoint
GET /chat/credit
Full URL: https://ai.modelfold.online/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
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
code | integer | 是 | 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). 可选值:200 / 401 / 404 / 429 / 455 / 500。 示例:200。 |
msg | string | 是 | Error message when code != 200 示例:success。 |
data | number | 是 | Remaining credits (may have decimals) 示例:100.5。 |
json
{
"code": 200,
"msg": "success",
"data": 100.5
}500 — Server error.
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
code | integer | 是 | 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 | 是 | Response message, error description when failed |
data | object | 是 | — |
json
{
"code": 500,
"msg": "Server Error - An unexpected error occurred while processing the request",
"data": null
}