Create Chat Completion
Creates a chat completion using the agent’s configured model. Supports both streaming and non-streaming responses.
Authentication
x-api-keystring
API key for authentication
OR
AuthorizationBearer
Bearer token authentication
Headers
traceparent
W3C Trace Context parent. When present, the Agent continues this trace for the request. Applies to all /api/v1 endpoints.
tracestate
Optional W3C tracestate associated with traceparent.
baggage
Optional W3C baggage. Prompt text is never copied onto spans.
Request
This endpoint expects an object.
audio
frequency_penalty
logit_bias
logprobs
top_logprobs
max_completion_tokens
max_tokens
messages
Chat messages in OpenAI format. Required when prompt is omitted.
metadata
modalities
model
n
parallel_tool_calls
prediction
presence_penalty
prompt
User text to complete. Required when messages is omitted.
reasoning_effort
verbosity
response_format
seed
service_tier
stop
store
stream
stream_options
temperature
top_p
tools
OpenAI-compatible function tool definitions. Passed through to the model as declaration-only tools (the client executes them and returns role=tool messages).
tool_choice
user
Response headers
traceresponse
W3C traceresponse for the server span (00-{trace-id}-{span-id}-{flags}). Present on all /api/v1 responses.
Response
Successful response
id
object
created
model
choices
usage
cached
Errors
422
Unprocessable Entity Error