Create Chat Completion With File
OpenAI-compatible chat completions with file upload for large contexts.
This endpoint accepts multipart/form-data to handle contexts larger than 1 MB.
The context file is automatically uploaded to S3 and processed.
Form fields:
- file: The context file (text file)
- messages: JSON string of chat messages
- model: Model name (default: captain-voyager-latest)
- stream: Enable streaming (default: true)
- temperature: Sampling temperature (default: 0.7)
Request
This endpoint expects a multipart form containing a file.
file
Context file to upload
messages
JSON-encoded list of chat messages
model
stream
temperature
max_tokens
tools
JSON-encoded list of tool definitions
tool_choice
Tool choice strategy
Response
Successful Response