Create a new AI completion. You can find the supported models using List all AI models.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Ordered chat messages that make up the conversation history. Always include the user’s latest turn; prepend prior turns when you want additional context.
1Use this in the API call to specify the model to use for the completion request. Is generally the model ID from the LLM provider (e.g., "gpt-4o", "o1").
Sampling temperature. Higher values make responses more adventurous; lower values keep them conservative.
Nucleus sampling parameter. Use this instead of temperature when you want to strictly cap how much of the probability mass is considered.
Unique ID of the agent to use for the completion request. Used to load the agent's full configuration (system prompt, knowledge sources, etc.). NB: Agent must already be created in the database and available for the space.
UUID of the Voice to use for the completion request. NB: Voice must already be created in the database and available for the space.
ID of the Task to use for the completion request. Used to tie the completion back to a workflow step or scheduled job. NB: Task must already be created in the database and available for the space.
Provide an object of capabilities to enable the LLM perform specific tasks better (e.g., web search, internal KB, canvas, etc.).
Array of asset IDs (files, snippets, etc.) that should be injected into the completion request as supporting context.
Array of Briefing document IDs to include so the model receives the same background summary the user saw.
Array of Content document IDs to include in the RAG context. Used to pass relevant document IDs so their content is included as additional background information for the completion request.
Array of Folder IDs to include in the RAG context. When provided, the LLM will use assets/documents within these folders as additional background information for the completion request.
When true the API sends partial chunks as the model generates them (ideal for typing indicators). Set to false to receive a single response payload.
Internal reference to the last assistant message in the thread. Include this when you need the completion to “continue” an earlier answer.
Conversation UUID tying multiple completions together. Provide it to append to an existing thread; leave empty to start fresh.
Successful completion response (see OpenAI Completions Object)