错误与重试
通过错误和请求 ID 诊断问题。
请读取 error.type:insufficient_balance 表示剩可用额度度不足;api_key_monthly_limit 表示密钥已达到月度消费上限;outstanding_undercharge 表示先前请求尚有待对账的欠款。密钥限额请在 Dashboard → Keys 中检查;购买额度Credit账户不会自动提高该限额。
可用额度错误可能包含 required_vnd 和 available_vnd;密钥限额错误可能包含 limit_vnd 和 spent_vnd。请连同 request ID 保存这些字段以便排查,不要分享 API 密钥。
此 API 密钥无权使用所选模型。请在 Dashboard → Keys 中检查模型权限,或选择已获授权的模型。
请求体超过 {mb} MB,或输入超过模型/供应商的独立限制。请阅读错误信息并减少上下文、图片或文件;即使低于网关限制,也可能返回 413。
HTTP 429 可能来自本地接入压力、队列已满或上游限流。请阅读错误及 Retry-After;这不表示 RPM 或 TPM 无限制。
遵守 Retry-After,使用带随机抖动的指数退避,并限制次数与总时长。视频任务可能已创建时,先查询任务 ID,避免重复提交。
请保存 x-request-id 和出错时间以便核对;部分旧路由返回的是 x-api-request-id。不要在报错信息中附带 API key 或敏感数据。
curl https://api.giacatgroup.vn/v1/models \
-H "Authorization: Bearer sk-gcg-your_key"HTTP Status Codes & Troubleshooting
| HTTP | Meaning | Resolution |
|---|---|---|
400 | Bad Request | Validate JSON payload, model ID, and request fields. |
401 | Unauthorized | Verify API key and Authorization or x-api-key header. |
402 | Payment Required | Insufficient ST balance — top up credits in Dashboard. |
403 | Forbidden | Key lacks permission for this model or is paused. |
404 | Not Found | Check base URL path (/v1 vs root) and active model ID. |
413 | Payload Too Large | Reduce prompt size or media payload. |
429 | Too Many Requests | Rate limit exceeded — apply exponential backoff and retry. |
500 / 502 / 503 / 504 | Upstream / Gateway Error | Transient upstream error — retry with backoff and keep x-request-id. |