Skip to main content
POST
Generate natural language or code completions based on a list of messages. This endpoint is compatible with the OpenAI Chat Completions API.

Headers

string
required
Your Apollo AI API key. Alternatively, use Authorization: Bearer <token>.

Body Parameters

array
required
A list of messages comprising the conversation so far.
string
required
The ID of the model to use (e.g., gpt-oss-120b, llama3). See Models for a full list.
boolean
If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available.
integer
The maximum number of tokens to generate in the chat completion.
number
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
array
A list of tools the model may call. Currently, only functions are supported as a tool.

Response

string
A unique identifier for the chat completion.
array
A list of chat completion choices.
integer
The Unix timestamp (in seconds) of when the chat completion was created.
string
The model used for the chat completion.
object
Usage statistics for the completion request.