Skip to main content
POST https://api.poixe.com/v1/chat/completions
This is OpenAI’s original and most widely used chat protocol. It currently has the best compatibility, and almost every provider and SDK supports it. However, its capabilities are relatively limited. Many new features of OpenAI’s newer models are offered in the Responses protocol instead. If you only need lightweight chat and basic streaming output, this protocol is sufficient.

Authentication and request headers

Every API request must include your API key in the HTTP headers.
string
required
Bearer token. The format is Bearer YOUR_API_KEY.
string
required
Must be set to application/json.

Request parameters

The following are the core parameters most commonly used when building a chat request.
string
required
The name of the model to use. For example: gpt-4o, gpt-4o-mini.
object[]
required
The list of conversation messages.
boolean
default:"false"
Whether to stream the output. When enabled, the server sends tokens incrementally via SSE (Server-Sent Events).
number
default:"1"
Sampling temperature (0 to 2). Lower values (such as 0.2) make the output more focused and deterministic; higher values (such as 0.8) make it more creative and random.
number
default:"1"
Nucleus sampling. In general, adjust either this or temperature, not both.
integer
The maximum number of tokens the model can generate (including reasoning tokens). Recommended as a replacement for the deprecated max_tokens.
integer
default:"1"
How many candidate replies (choices) to return. Keep this at 1 to reduce cost.
number
default:"0"
Presence penalty (-2 to 2): encourages the model to introduce new topics (less repetition).
number
default:"0"
Frequency penalty (-2 to 2): reduces the likelihood of repeating the same words or sentences.
object[]
The list of tools (function calling).
string | object
Tool-calling strategy: none / auto / required, or force a specific tool.
object
Output format control.

Response structure

The endpoint returns an object containing the generated result and usage statistics.
string
The unique identifier of this request.
string
The object type, usually chat.completion.
integer
Creation time (Unix timestamp in seconds).
string
The name of the model that actually processed the request.
object[]
The list of generated results (usually just one).
object
Token usage statistics (if returned).

Official docs: Create chat completion

View OpenAI’s official parameter descriptions and examples.