Create Chat Completion (OpenAI Chat Completions API Compatible)
OpenAI Chat Completions API compatible endpoint. Creates a research job using the last user message and returns the result in OpenAI chat completion format. Supports both streaming and non-streaming responses.
Files (Caesar Extension)
This endpoint supports file attachments using a Caesar extension to the Chat Completions message format. To include files in your research:
- Upload files first via
POST /research/filesusing multipart/form-data - Reference the returned UUID in a message content part of type
file
Files are referenced using file.fileData, which must contain a Caesar file UUID
(not raw bytes, base64, or a URL). The server loads the stored file by that ID and
extracts usable text for the research.
Example content part:
Note: The legacy /compat/completions endpoint does not accept files.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
Model identifier (accepted for compatibility).
Maximum number of tokens to generate (accepted for compatibility).
Sampling temperature (accepted for compatibility).
Nucleus sampling parameter (accepted for compatibility).
Sequences where the API will stop generating (accepted for compatibility).
Random seed for deterministic sampling (accepted for compatibility).
Response
Chat completion response (or SSE stream if stream=true).