Create a batch
Create an OpenAI-compatible batch processing job from an uploaded JSONL file.
Authentication
AuthorizationBearer
Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, OpenAI or Azure OpenAI provider credentials go in Settings -> Providers or the request body credential_override field, not in this auth field.
Headers
X-Data-Respan-Params
Base64-encoded JSON object of Respan request parameters. Legacy X-Data-Keywordsai-Params is still accepted.
Request
This endpoint expects an object.
input_file_id
Uploaded JSONL file ID.
endpoint
Endpoint each JSONL request targets.
Allowed values:
completion_window
Allowed values:
metadata
Custom metadata for tracking.
customer_identifier
End-user identifier for logging.
custom_identifier
Custom identifier for querying.
thread_identifier
Conversation thread identifier.
environment
Environment tag.
Response
Created batch.
id
Batch ID.
status
object
endpoint
input_file_id
output_file_id
Output file ID, available when the batch completes.
error_file_id
Error file ID, when provider errors are available.
completion_window
created_at
Unix timestamp.
in_progress_at
expires_at
finalizing_at
completed_at
failed_at
expired_at
cancelling_at
cancelled_at
request_counts
metadata
errors
Provider error details, when available.
Errors
400
Bad Request Error
401
Unauthorized Error