Get startedAPI referenceGoing to productionExplore models

API reference

Chat Completions

Send a conversation as an ordered message list. PicoX routes the public model to its configured provider and converts the request when the upstream uses another supported protocol.

POST/v1/chat/completions

Request parameters

modelstring · required

Public model ID from /v1/models.

messagesarray · required

Conversation messages with system, user, assistant, or tool roles.

max_completion_tokensinteger · optional

Maximum output tokens; takes precedence over max_tokens. Values above the model’s output limit are capped. When omitted, your account default output limit applies.

max_tokensinteger · optional

Legacy output-token limit, used when max_completion_tokens is not set.

temperaturenumber · optional

Sampling temperature. Higher values produce more varied output.

top_pnumber · optional

Nucleus sampling: only tokens within this cumulative probability are considered.

stopstring | array · optional

One or more sequences that end generation.

seedinteger · optional

Requests repeatable sampling when the provider supports it.

frequency_penaltynumber · optional

Penalizes tokens in proportion to how often they have appeared.

presence_penaltynumber · optional

Penalizes tokens that have already appeared.

streamboolean · optional

Returns Server-Sent Events when set to true.

stream_optionsobject · optional

Streaming options. PicoX always enables include_usage so the final chunk reports token usage.

toolsarray · optional

Function definitions available to the model.

tool_choicestring | object · optional

Controls tool use: none, auto, required, or a specific function.

parallel_tool_callsboolean · optional

Allows the model to request several tool calls in one turn.

response_formatobject · optional

Requests JSON mode or output that matches a JSON schema.

reasoning_effortstring · optional

Reasoning effort for models that support configurable reasoning.

service_tierstring · optional

Provider service tier. Forwarded only when the selected channel allows it.

Native routes receive the request body with the model ID replaced. Converted routes receive only the parameters that have an equivalent in the upstream protocol. If no available route accepts a constrained parameter value, PicoX returns 400 parameter_constraint_violation.

Chat request
{
  "model": "pico-chat-1",
  "messages": [
    {"role": "system", "content": "Answer concisely."},
    {"role": "user", "content": "What is retrieval-augmented generation?"}
  ],
  "temperature": 0.2,
  "stream": false
}
Copied