{
"error": {
"message": "max_tokens must be a positive integer.",
"type": "invalid_request_error",
"param": "max_tokens",
"code": "invalid_request"
}
}
| Status | code | What to do |
|---|---|---|
400 | invalid_request, invalid_json, unsupported_parameter, unsupported_content | Fix the request body, or the field named in param when it is set |
400 | context_length_exceeded | Shorten the messages or lower max_tokens |
401 | invalid_api_key, api_key_revoked, api_key_expired | Check the key in the Authorization header |
403 | insufficient_scope, key_owner_inactive, ip_not_allowed, browser_not_allowed | Use a key that can call the models, from your server |
404 | model_not_found | Use echo |
402 | insufficient_credits | Add credit at labs.slashy.com/keys |
413 | request_too_large | Keep the body under 2 MiB |
415 | unsupported_media_type | Send Content-Type: application/json |
422 | reference_unreadable | A reference link needs a sign-in, timed out, or has no writing on it: paste its text instead |
429 | rate_limited, too_many_concurrent_requests | Wait for Retry-After seconds |
502 | upstream_error | Retry |
503 | model_unavailable, credit_unavailable | Retry shortly |
503 | references_unavailable | Reference links can’t be read right now: paste their text, or retry later |