Batch Processing
FastRouter API Key. Get yours at https://fastrouter.ai
Format: Authorization: Bearer YOUR_API_KEY
JSONL file containing batch requests. Each line must be a valid JSON object with custom_id, provider, method, url, and body fields.
File purpose (always 'batch' for batch processing)
batchPossible values: File uploaded successfully - use file_id in next step
Unique file identifier - use this in batch creation
file-abcdef12345Same as file_id
Original filename
sample.jsonlNumber of requests in the file
4Storage URL for the uploaded file
fileFile size in bytes
Unix timestamp
batchBad Request - Invalid file format or content
Invalid Credentials - Your API key is invalid, disabled, or your OAuth session has expired. Check your credentials.
Payload Too Large - File exceeds size limit
Rate Limited - You have exceeded your request limits (TPM/RPM). Slow down or increase your limits.
Internal Server Error
FastRouter API Key. Get yours at https://fastrouter.ai
Format: Authorization: Bearer YOUR_API_KEY
The file_id returned from the file upload step. Must be a valid JSONL file with batch requests.
file-abcdef12345API endpoint to process. Must match the request types in your JSONL file.
/v1/chat/completionsPossible values: Time window for batch completion. Currently only '24h' is supported.
24hPossible values: Optional metadata object for tracking or organization purposes
Batch created successfully - save batch_id for status checks
Unique batch identifier - use this to check status
fr_batch-abc123Same as batch_id
fr_batch-abc123batch/v1/chat/completionsCurrent batch status
Unix timestamp
Input file ID
24hBad Request - Invalid file ID or parameters
Invalid Credentials - Your API key is invalid, disabled, or your OAuth session has expired. Check your credentials.
Not Found - File ID not found
Rate Limited - You have exceeded your request limits (TPM/RPM). Slow down or increase your limits.
Internal Server Error
FastRouter API Key. Get yours at https://fastrouter.ai
Format: Authorization: Bearer YOUR_API_KEY
Batch ID returned from batch creation
fr_batch-abc123Batch status and details
Batch ID
fr_batch-abc123batch/v1/chat/completionsModel used (if applicable)
Error information if batch failed
Input file ID
24hCurrent batch status
Output file ID - use this with /files/{file_id}/content to download results (available when completed)
Error file ID if some requests failed
Batch creation timestamp
When batch started processing
Expiration timestamp
When batch entered finalizing state
Completion timestamp (null if not completed)
Failure timestamp (null if not failed)
Token usage and cost information
Custom metadata if provided
Bad Request - Invalid batch ID
Invalid Credentials - Your API key is invalid, disabled, or your OAuth session has expired. Check your credentials.
Not Found - Batch ID not found
Rate Limited - You have exceeded your request limits (TPM/RPM). Slow down or increase your limits.
Internal Server Error
FastRouter API Key. Get yours at https://fastrouter.ai
Format: Authorization: Bearer YOUR_API_KEY
Output file ID from batch status response (e.g., batch-output-fr_batch-abc123abc123.jsonl)
batch-output-fr_batch-abc123abc123.jsonlBatch results file in JSONL format. Each line contains a response for one request.
JSONL content with one result per line. Each line is a JSON object with custom_id, error (null if successful), and response object containing body and status_code.
Bad Request - Invalid file ID format
Invalid Credentials - Your API key is invalid, disabled, or your OAuth session has expired. Check your credentials.
Not Found - File not found, not ready, or expired
Rate Limited - You have exceeded your request limits (TPM/RPM). Slow down or increase your limits.
Internal Server Error
Last updated
