Create chat completion
Creates a chat completion using the specified model via the AI Gateway. Supports both synchronous and streaming (SSE) responses. Set stream: true in the request body to receive server-sent events. The request is proxied to the organization’s configured AI provider (Bedrock, Azure, Gemini, etc.).
Documentation Index
Fetch the complete documentation index at: https://developer.kodexa.ai/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
API key for authentication. Create one from the Kodexa platform UI under Settings > Access Tokens.
Path Parameters
Organization UUID. The authenticated user must be a member of this organization.
Body
Request body for creating a chat completion. Compatible with the OpenAI Chat Completions API.
A list of messages comprising the conversation.
ID of the model to use (e.g., 'gpt-4', 'claude-3-sonnet').
Maximum number of tokens to generate.
Number of completions to generate.
Sequences where the API will stop generating.
If true, partial message deltas are sent as server-sent events (SSE).
Sampling temperature between 0 and 2.
Nucleus sampling parameter.
Response
Chat completion response. When stream: true, the response is a stream of server-sent events with Content-Type: text/event-stream.
Response from the chat completion endpoint. Compatible with the OpenAI Chat Completions API response format.
