Skip to main content
POST
Chat Completions

Authorizations

Authorization
string
header
required

Enter your MeshAPI key (rsk_...) — sent as Authorization: Bearer <key>.

Body

application/json
messages
Message · object[]
required
model
string | null
template
string | null
variables
Variables · object | null
session_id
string | null
stream
boolean
default:false
temperature
number | null
Required range: 0 <= x <= 2
max_tokens
integer | null
Required range: x >= 1
top_p
number | null
Required range: 0 <= x <= 1
frequency_penalty
number | null
Required range: -2 <= x <= 2
presence_penalty
number | null
Required range: -2 <= x <= 2
stop
seed
integer | null
reasoning_effort
enum<string> | null
Available options:
high,
medium,
low,
none
tools
Tool · object[] | null
tool_choice
response_format
Response Format · object | null
transforms
string[] | null
models
string[] | null
user
string | null
Maximum string length: 256
modality
enum<string> | null
Available options:
text,
image
image
ImageOptions · object | null
async_mode
boolean
default:false
modalities
enum<string>[] | null
Available options:
text,
audio,
image
audio
AudioOutputOptions · object | null
timeout
number | null
Required range: x > 0
cache
boolean | null

Response

Completion (JSON), or an SSE stream when stream=true

id
string
required
object
string
required
created
integer
required
model
string
required
choices
Choice · object[]
required
usage
UsageInfo · object | null
system_fingerprint
string | null