Create chat completions
Generates chat completions from messages.
Authorizations
Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.
Headers
Body
The messages to generate chat completions for.
1 - 300 elementsAn upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.
The language model to use. Model availability varies by CDF project and cluster. If not specified, the project's default model is used. Valid values are the id values returned by GET /ai/openai/models.
"azure/gpt-4.1"
The format that the model must output.
If true, the response is streamed back incrementally using server-sent events.
Sampling temperature. Higher values produce more random output, lower values produce more deterministic output. Models that do not support temperature will ignore this field.
Controls which tool the model calls, if any. none disables tool calls, auto lets the model decide, required forces a tool call. Use the object form to force a specific function.
A list of tools the model can use.
1 - 128 elementsResponse
Successful Response
The list of generated completion choices.
Unix timestamp of when the completion was created.
A unique identifier for the chat completion.
The model used to generate the response.
Token usage statistics for the request.
The object type. Always chat.completion.
"chat.completion"