Skip to content

Error Codes ​

Batch API error responses use the OpenAI shape {"error": {"message", "type", "param", "code"}}. For the format description, see API Overview · Response Format. The codes are summarized below by code.

Permissions

Files and batches are isolated strictly by API Key. Accessing a resource that does not belong to the current API Key always returns 404 (file_not_found / batch_not_found), including for other API Keys under the same account or the same enterprise. 403 is never returned, and the API never reveals whether the resource exists. See API Overview · Data Visibility.

Error Code List ​

HTTPcodeDescriptionCommon endpoints
400invalid_requestInvalid request body/parameters, or a business parameter errorCreate
400invalid_batchFile structure violates Batch constraints (multiple models, multiple endpoints, missing/duplicate/oversized custom_id, method not POST, url inconsistent with endpoint, completion_window not 24h, metadata exceeding limits, etc.)Create
400invalid_purposepurpose is not batchUpload, Create
400invalid_jsonlThe file is not valid JSONL, or a single row exceeds 8 MBUpload, Create
400empty_fileThe file contains no valid rowsUpload, Create
400too_many_rowsThe number of valid rows exceeds the limitUpload, Create
400file_too_largeThe file size in bytes exceeds the limitUpload
400missing_fileThe file form parameter is missingUpload
400missing_input_file_idinput_file_id is missingCreate
400missing_endpointendpoint is missingCreate
400invalid_limitlimit is not a positive integerList
400invalid_afterThe after cursor is invalid or points to an object that does not existList
400batch_not_cancellableThe batch has already finished or is generating results, so it cannot be cancelledCancel
402insufficient_quotaThe balance is insufficient to pay for this batchCreate
403no_batch_groupBatch is not enabled for the current API Key; contact the platform to enable itAll
403no_batch_channelThe current configuration does not support Batch; contact the platform to confirmUpload, Create
403model_access_deniedNo permission to access the models in the fileCreate
403permission_deniedNo permission to perform this operationCreate
404file_not_foundThe file does not exist, does not belong to the current API Key, or has expiredFiles API, Create
404batch_not_foundThe batch does not exist or does not belong to the current API KeyBatches API
409file_in_useThe file is still used by an unfinished batch, or the batch results have not finished processingDelete file
413file_too_largeThe uploaded content exceeds the size limitUpload
429batch_limit_exceededThe Batch submission limit of the current API Key is exceeded; wait for existing batches to finish or reduce the submission volumeCreate
429rate_limit_check_failedModel request rate limit triggeredAll
500internal_errorInternal service errorAll
503object_storage_unconfiguredThe Batch service is temporarily unavailableUpload, Create
503batch_create_budget_exceededBatch creation timed out; retry later or use a smaller fileCreate
503service_unavailableThe service is temporarily unavailable; retry laterCreate