Batches
Purpose
This section documents the Batches endpoints and common usage patterns.
Key concepts
- Inputs and outputs
- Model and parameter compatibility
- Streaming (when supported)
Minimal example
bash
# POST /v1/batches
curl https://api.fastapi.ai/v1/batches \
-H "Authorization: Bearer $FAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input_file_id":"file-abc123","endpoint":"/v1/chat/completions","completion_window":"24h"}'Common pitfalls
- Ensure your Authorization header is set for every request.
- Use the correct Content-Type for the endpoint.
- For streaming, handle SSE events and error events.
