Given a list of messages, returns a model-generated reply. Set stream: true
to receive server-sent events. Fully OpenAI-compatible — the OpenAI Python and
Node SDKs work unmodified against this endpoint.
Your PrimaLabs API key, sent as Authorization: Bearer <key>.
Body
application/json
model
string
required
A model ID from the published catalog.
Example:
"primalabs-ai/DeepSeek-V4.1-Flash-1017"
messages
object[]
required
The conversation so far.
Show child attributes
stream
boolean
default:false
Stream partial deltas as server-sent events.
max_tokens
integer
Maximum tokens to generate, reasoning tokens included. A model's limit is
max_output_tokens in List models.
reasoning_effort
enum<string>
How much the model thinks before it answers; none turns thinking off.
Thinking is on by default. Each model accepts only some of these values and
returns 400 for the rest: see reasoning_effort_accepted in
List models and
Effort levels.
Available options:
none,
minimal,
low,
medium,
high,
xhigh,
max
tools
object[]
Functions the model may call. Supported on every model in the catalog.
Show child attributes
tool_choice
enum<string>object
auto (the default when tools is set), none, required, or
{"type": "function", "function": {"name": "..."}} to force one function.
Available options:
auto,
none,
required
response_format
object
{"type": "json_schema", "json_schema": {"name": "...", "schema": {...}}} returns
JSON that matches the schema, on models where supports_response_schema is
true in List models.
Show child attributes
cache_salt
string
Keeps this request's cached prompt prefixes apart from requests with a
different salt, within your account. See
Prompt caching.