Add Message to Thread with Optional Attachments
Add a user message to an existing thread with optional file attachments. Accepts both JSON (application/json) and form-data (multipart/form-data) payloads. Use JSON for text-only messages; use form-data when uploading file attachments. Can send text only, attachments only, or both. Documents must be indexed before further messages are allowed. To choose a model, set llm_provider and model_name. If omitted, defaults are llm_provider=openai and model_name=gpt-4o. When stream=true, the SSE feed emits content_streaming answer deltas and may also emit reasoning_streaming events when the selected provider exposes native live reasoning deltas; those events are live-only and are not persisted. Set thinking to a flat object such as {"effort": "high"} or {"budget_tokens": 8192} to request reasoning on supported models/providers. Use {} to enable provider defaults. Memory defaults to 'off'. Set memory='Auto' for workspace-scoped memory search and automatic memory operations, or memory='Readonly' for search-only. Supported attachment types: .pdf, .doc(x), .ppt(x), .xls(x), .txt, .csv, .md, .json(l), .xml, .py, .js, .ts, .jsx, .tsx, .html, .css, .cpp, .c, .h, .java, .go, .rs, .rb, .php, .sql, .png, .jpg, .jpeg, .webp, .gif, .bmp, .tiff, .tif, .mp3, .wav, .m4a, .ogg, .flac, .aac (audio), .mp4, .mov, .avi, .mkv, .mpeg, .mpg, .webm (video). Audio/video files are sent inline to models that natively accept them. See the Model Library page in the dashboard (model-library page) for a current list of supported models and providers.
Path parameters
Headers
Request body
Example request
{
"thinking": {},
"openrouter": {
"sort": "price"
}
}Response
Successful Response
Changes
No recorded changes to this endpoint across all 1 revision of this API.