cURL
curl --request POST \ --url https://gomodel.example.com/v1/batches \ --header 'Authorization: <api-key>' \ --header 'Content-Type: application/json' \ --data ' { "completion_window": "<string>", "endpoint": "<string>", "input_file_id": "<string>", "metadata": {}, "requests": [ { "body": {}, "custom_id": "<string>", "method": "<string>", "url": "<string>" } ] } '
{ "cancelled_at": 123, "cancelling_at": 123, "completed_at": 123, "completion_window": "<string>", "created_at": 123, "endpoint": "<string>", "failed_at": 123, "id": "<string>", "in_progress_at": 123, "input_file_id": "<string>", "metadata": {}, "object": "<string>", "provider": "<string>", "provider_batch_id": "<string>", "request_counts": { "completed": 123, "failed": 123, "total": 123 }, "results": [ { "custom_id": "<string>", "error": { "message": "<string>", "type": "<string>" }, "index": 123, "model": "<string>", "provider": "<string>", "response": "<unknown>", "status_code": 123, "url": "<string>" } ], "status": "<string>", "usage": { "input_cost": 123, "input_tokens": 123, "output_cost": 123, "output_tokens": 123, "total_cost": 123, "total_tokens": 123 } }
Batch request
Show child attributes
OK
Gateway extension: optional usage/result snapshots persisted by the gateway.
Was this page helpful?