DocsInference
Batch inference
Submit many chat requests together for offline scoring, data generation or backfills. Use the inference pricing tables when estimating the cost of your workload.
Submit a batch
curl -X POST https://ragnarok-ai.com/api/v1/batches \
-H "Authorization: Bearer sk-ft-…" \
-H "Content-Type: application/json" \
-d '{
"requests": [
{"custom_id": "r1", "body": {"model": "ft:a1b2c3…",
"messages": [{"role": "user", "content": "…"}], "max_tokens": 200}},
{"custom_id": "r2", "body": {…}}
]
}'
# → { "id": "batch_…", "status": "in_progress",
# "request_counts": {"total": 2, "completed": 0, "failed": 0} }Up to 500 requests per batch; each request can target a different model.
Poll and collect
curl https://ragnarok-ai.com/api/v1/batches/batch_… # status
curl https://ragnarok-ai.com/api/v1/batches/batch_…/results # per-request outputsResults carry your custom_id so order never matters. Failed requests appear with an error object; the rest of the batch completes anyway (status completed_with_errors).
The studio's Batches page drives exactly this API — one prompt per line, results expandable inline.