Skip to main content
POST
Create chat completion

Authorizations

Authorization
string
header
required

Project customer key. Requires the permission for the requested endpoint.

Headers

X-Limitless-Session-ID
string

Optional cache-affinity hint, isolated to this organization and project.

Required string length: 1 - 512

Body

application/json

Model-dependent request fields. Read the compatibility guide for supported combinations and limits.

model
string
required
Required string length: 1 - 200
messages
object[]
required
Minimum array length: 1
policy_ids
string[]

Published Limitless policy IDs. These add to automatically attached policies.

Maximum array length: 1000
Required string length: 1 - 120
stream
boolean
default:false
max_tokens
integer | null

Positive output bound; limited by the model’s configured maximum. Chat/Responses default to 1,024 when omitted. Send exactly one output-bound field. DeepSeek maximum 524,288 within the shared 1,048,576-token context; reasoning and answer share this bound.

Required range: 1 <= x <= 999990
max_completion_tokens
integer | null

Positive output bound; limited by the model’s configured maximum. Chat/Responses default to 1,024 when omitted. Send exactly one output-bound field. DeepSeek maximum 524,288 within the shared 1,048,576-token context; reasoning and answer share this bound.

Required range: 1 <= x <= 999990
temperature
number | null

DeepSeek defaults to 1.0, following the 1017 model card; explicit supported values override it.

top_p
number | null

DeepSeek defaults to 1.0, following the 1017 model card; explicit supported values override it.

frequency_penalty
number | null
Required range: -2 <= x <= 2
presence_penalty
number | null
Required range: -2 <= x <= 2
logit_bias
object | null
n
integer | null

General gateway bound 1–128; selected model must support multiple completions. DeepSeek permits only 1.

Required range: 1 <= x <= 128
seed
integer | null
stop
stream_options
object | null
thinking
boolean | null

Legacy model-specific field. Prefer reasoning_effort.

reasoning
object | null

Model-specific reasoning options. See the reasoning guide.

reasoning_effort
enum<string> | null

Model-specific reasoning effort. DeepSeek Flash: none, low, high, max (default high). GLM 5.3: low, high, max (default max). See the reasoning guide.

Available options:
none,
minimal,
low,
medium,
high,
xhigh,
max,
ultracode
include_reasoning
boolean | null
safety_identifier
string | null
Maximum string length: 64
user
string | null
Maximum string length: 512
structuredOutputs
boolean
tools
object[] | null

Chat: function tools. Responses: functions and supported web_search aliases. Messages: custom functions, web_search_2025_03_05 and web_fetch_2025_03_05. See the tools guide. Both models support function tools.

tool_choice
Available options:
none,
auto,
required
parallel_tool_calls
boolean | null
functions
object[] | null
function_call
Available options:
none,
auto
response_format
object

Structured output supported by both models.

modalities
string[] | null
verbosity
enum<string> | null
Available options:
low,
medium,
high
audio
object | null
prediction
object | null
metadata
object | null
store
boolean
default:false

Responses are stateless; true is rejected.

service_tier
string | null
prompt_cache_key
string

Optional stable cache-affinity key, isolated to this organization and project.

Maximum string length: 512
prompt_cache_retention
enum<string> | null
Available options:
in_memory,
24h
logprobs
boolean | null
top_logprobs
integer | null
prompt_logprobs
integer | null
web_search_options
object | null
cache_salt
string | null
chat_template_kwargs
object

Legacy template option. Use the documented reasoning_effort field for current models.

Response

Successful response.

id
string
required
created
integer
required
model
string
required
choices
object[]
required
object
string
default:chat.completion
Allowed value: "chat.completion"
usage
object | null
system_fingerprint
string | null
service_tier
string | null
prompt_logprobs
(object | null)[] | null