Errors
Every error code that the API and your result files can show.
API answers
The answer has the OpenAI error format: an error object with message, type, param and code.
| Code | Status | Meaning |
|---|---|---|
invalid_api_key | 401 | The key is missing, wrong or revoked. Send it as a Bearer token. |
account_suspended | 403 | The account is suspended. |
rate_limit_exceeded | 429 | The key sent too many requests. Wait and try again. |
invalid_request | 400 | The request is not valid. The param field names the part that is wrong. |
invalid_purpose | 400 | A file upload has a purpose other than batch. |
file_too_large | 400 | The file is larger than the file size limit. |
file_not_found | 404 | No file of your account has this ID. |
file_purged | 410 | The file was purged. You cannot download it or start a batch from it. |
file_in_use | 400 | A batch still uses the file, so you cannot delete it. |
invalid_input_file | 400 | The input file of a batch must have the purpose batch. |
insufficient_balance | 402 | Your balance is below the estimated cost of the batch. Add credit and create the batch again. |
batch_not_found | 404 | No batch of your account has this ID. |
batch_not_cancellable | 400 | Only a batch that is in progress can be cancelled. |
Lines the batch refuses
A batch with a bad line gets the status failed. Its errors field lists up to 10 problems, each with a code, a message and the line number. It uses no GPU time and costs nothing.
| Code | Meaning |
|---|---|
invalid_json | The line is not valid JSON, or not a JSON object. |
invalid_line | A field is missing or wrong: custom_id, method, body or max_tokens. The line and param fields say which. |
duplicate_custom_id | An earlier line already uses this custom_id. |
invalid_url | The url is not /v1/chat/completions. |
invalid_model | The model is not one that Hyfer serves. |
mixed_models | The lines of the file use more than one model. |
too_many_lines | The file has more lines than the limit. |
empty_file | The input file has no lines. |
Lines in the result files
A request that was accepted can still fail. Its line is in the error file, and in the output file there is no line for it. The codes invalid_json and invalid_request can also show here.
| Code | Meaning |
|---|---|
unknown_parameter | The body has a parameter that the engine does not take. |
engine_error | The engine did not answer after three tries. |
batch_cancelled | You cancelled the batch before this line ran. |
batch_expired | The batch expired before this line ran. |
chunk_failed | The part of the file with this line failed, so the line did not run. |