Skip to main content
POST
Create a chat completion with your configured AI agent. This endpoint is fully compatible with OpenAI’s API, allowing you to use existing OpenAI SDKs and tools.

Request Body

string
required
Chat session identifier for conversation continuity
array
required
Array of message objects representing the conversation history
string
default:"gpt-4o"
Model identifier to use for completion
string
Provider name (e.g., “openai”, “anthropic”, “ollama”)
number
Sampling temperature between 0 and 2. Higher values make output more random
number
Maximum number of tokens to generate
boolean
default:"false"
Whether to stream the response

Response

boolean
Indicates if the request was successful
string
Unique identifier for the completion
array
Array of completion choices
object
Token usage information

Streaming

Set stream: true to receive Server-Sent Events (SSE) instead of a single response:

Notes

  • Your agent will automatically use configured knowledge bases, tools, and MCP servers
  • The chatId maintains conversation context and history
  • Compatible with all OpenAI client libraries and tools