v1

latestOpenAPI 3.0.02026-07-26100118773.0 KB

Generate chat completions in OpenAI format

Processes a conversation and returns an AI-generated response in OpenAI-compatible format. Consumes 5 credits per request.

post/ai/openai/chat/completions

Request body

allow_clarification_queryboolean

Whether the AI can ask for clarification when the query is ambiguous

generate_related_questionsinteger

Adds AI generated related questions to use as follow up questions

inline_citationsboolean

Adds inline citation document references in the payload metadata

response_formatstring

Text format for the response. Values accepted are 'markdown' and 'plaintext'.

streamboolean

Stream the response through the API

verbositystring

Controls the length and detail level of the AI-generated response. Values accepted are 'succinct', 'balanced', and 'verbose'.

Response

Default response

createdinteger required

Unix timestamp when the completion was created

idstring required

Unique identifier for the completion request

modelstring required

Model used for the completion

objectstring required

Type of object returned, always 'chat.completion'

Example response

{
  "choices": [
    {
      "message": {
        "role": "assistant"
      }
    }
  ]
}