Skip to main content
POST

Authorizations

Authorization
string
header
required

All APIs require Bearer Token authentication

Add to request header:

Authorization: Bearer YOUR_API_KEY

Body

application/json
model
string
required

Model name, e.g. gpt-5.4, deepseek-chat, etc.

Example:

"gpt-5.4"

messages
object[]
required

List of messages in the conversation

stream
boolean
default:false

Whether to stream the response

temperature
number

Sampling temperature (0-2)

Required range: 0 <= x <= 2
max_tokens
integer

Maximum number of tokens to generate

top_p
number

Nucleus sampling parameter (0-1)

Required range: 0 <= x <= 1
frequency_penalty
number

Penalize new tokens based on their frequency in the text so far (-2 to 2)

Required range: -2 <= x <= 2
presence_penalty
number

Penalize new tokens based on whether they appear in the text so far (-2 to 2)

Required range: -2 <= x <= 2
tools
object[]

A list of tools the model may call

tool_choice

Controls which tool is called by the model

Available options:
none,
auto,
required
response_format
object

An object specifying the format that the model must output

stop

Up to 4 sequences where the API will stop generating further tokens

n
integer

How many chat completion choices to generate for each input message

Response

Chat completion response

id
string

Unique completion ID

Example:

"chatcmpl-abc123"

object
enum<string>

Object type

Available options:
chat.completion
created
integer

Creation timestamp

Example:

1757165031

model
string

Model used

choices
object[]
usage
object