錯誤並重試

透過錯誤代碼和請求 ID 進行診斷。

API Store Hub technical reference diagram for errors
Architecture diagram for errors with API Store Hub Base URLs (https://apistorehub.com and https://apistorehub.com/v1).

讀取error.type:不夠餘額,剩餘Credit不足; api_key_monthly_limit 是達到每月限制的key; Outstanding_undercharge 是需要從上一回合檢查的赤字。對於密鑰配額,請查看儀表板→密鑰;購買額外積分不會自動增加此限制。

餘額錯誤可能包括 required_vnd 和 available_vnd;關鍵限制錯誤可能包括limit_vnd和spent_vnd。將這些欄位與請求 ID 一起儲存以進行測試,不要將 API 金鑰傳送給支援人員。

该 API 密钥不允许使用所选型号。在 Dashboard → Keys 中查看钥匙型号范围或选择授权型号。

主體超出 {mb} MB 或輸入超出型號/供應商特定限制。閱讀通知、減少上下文、照片或檔案;小於網關限制的body仍然可以獲得413。

HTTP 429 可能是由本機接收、佇列已滿或供應商限制所引起的。讀取錯誤內容和Retry-After;不要解釋為無限制的 RPM/TPM。

尊重之後重試;使用有抖動的指數退避,限制重試次數和總重試時間。影片任務建立完成後,先找ID,避免重複要求。

保存x-request-id和錯誤時間進行比較;一些舊路由回傳 x-api-request-id。不要在錯誤報告中發送 API 金鑰或敏感資料。

curl https://apistorehub.com/v1/models \
  -H "Authorization: Bearer sk-ash-your_key"

HTTP Status Codes & Troubleshooting

HTTPMeaningResolution
400Bad RequestValidate JSON payload, model ID, and request fields.
401UnauthorizedVerify API key and Authorization or x-api-key header.
402Payment RequiredInsufficient ST balance — top up credits in Dashboard.
403ForbiddenKey lacks permission for this model or is paused.
404Not FoundCheck base URL path (/v1 vs root) and active model ID.
413Payload Too LargeReduce prompt size or media payload.
429Too Many RequestsRate limit exceeded — apply exponential backoff and retry.
500 / 502 / 503 / 504Upstream / Gateway ErrorTransient upstream error — retry with backoff and keep x-request-id.