Suanlimao

API

Errors

Errors follow the OpenAI shape: { error: { message, type, code } }.

HTTPcodeMeaning
400invalid_request_errorThe request is invalid. Please check and try again.
400context_length_exceededThe input exceeds this model's maximum context length.
401invalid_api_keyThe API key is invalid or has been disabled.
402insufficient_quotaInsufficient balance. Please top up to continue.
402daily_limit_exceededThe daily spending limit for this account has been reached.
403permission_deniedYou do not have permission to perform this action.
404model_not_foundThe model does not exist or you do not have access to it.
429rate_limit_exceededToo many requests. Please slow down and try again.
429key_budget_exceededThis API key has reached its monthly budget.
502upstream_errorThe model provider returned an error. Please try again later.
503service_unavailableThe service is temporarily unavailable. Please try again later.
504upstream_timeoutThe model provider timed out. Please try again later.
500internal_errorSomething went wrong on our side. Please try again later.

Retry 429 and 5xx with exponential backoff; 429 responses include Retry-After and x-ratelimit-* headers.