Get startedAPI referenceGoing to productionExplore models

API reference

Messages

Use the Anthropic Messages contract with existing Anthropic SDKs. PicoX accepts x-api-key authentication and converts the request to the routed provider protocol when necessary.

POST/v1/messages

Request parameters

modelstring · required

Public model ID from /v1/models.

messagesarray · required

Alternating user and assistant turns.

max_tokensinteger · optional

Maximum output tokens, capped at the model’s output limit. When omitted, PicoX uses your account default, then the model limit, then 4096.

systemstring | array · optional

System prompt, as text or content blocks.

temperaturenumber · optional

Sampling temperature. Higher values produce more varied output.

top_pnumber · optional

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

top_kinteger · optional

Samples only from the K most likely tokens.

stop_sequencesarray · optional

Custom sequences that end generation.

streamboolean · optional

Returns Server-Sent Events when set to true.

toolsarray · optional

Tool definitions with a name, description, and input_schema.

tool_choiceobject · optional

Controls tool use: auto, any, a specific tool, or none.

thinkingobject · optional

Extended thinking settings for compatible models.

Create a message
curl "$PICO_BASE_URL/v1/messages" \
  -H "X-API-Key: $PICO_API_KEY" \
  -H "Anthropic-Version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "pico-chat-1",
    "max_tokens": 512,
    "system": "Answer as a senior engineer.",
    "messages": [{"role": "user", "content": "When should I use a queue?"}]
  }'
Copied