Get startedAPI referenceGoing to productionExplore models

Capabilities

Streaming

Set stream: true to receive Server-Sent Events. PicoX emits the event contract of the endpoint your client called, even when the provider uses a different native protocol.

Chat Completionsdata: chunks

Ends with data: [DONE].

ResponsesNamed response events

Includes response.output_text.delta and response.completed.

MessagesNamed message events

Includes content block deltas and message_stop.

Stream with the OpenAI SDK
stream = client.chat.completions.create(
    model="pico-chat-1",
    messages=[{"role": "user", "content": "Write a short launch update."}],
    stream=True,
)

for event in stream:
    if not event.choices:
        continue
    delta = event.choices[0].delta.content
    if delta:
        print(delta, end="", flush=True)

Handle stream boundaries

An HTTP chunk is not necessarily a complete SSE event. Buffer partial data until an event boundary, handle empty choices in usage events, and surface in-stream errors even after HTTP 200.

Copied