> ## Documentation Index
> Fetch the complete documentation index at: https://apixo.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LLM Streaming

> Streaming options for Claude, OpenAI, and Gemini compatible APIs

APIXO keeps the streaming protocol of the compatible API you call. Use the same streaming switch and parser your existing Claude, OpenAI, or Gemini client already expects.

## Streaming switches

| Compatible API       | How to enable streaming                                   |
| -------------------- | --------------------------------------------------------- |
| Claude API           | Add `"stream": true` to the request body                  |
| OpenAI Responses API | Add `"stream": true` to the request body                  |
| Gemini API           | Use the stream endpoint, such as `:streamGenerateContent` |

## Claude streaming

```bash theme={null}
curl -N -X POST "https://llm.apixo.ai/v1/messages" \
  -H "x-api-key: $APIXO_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "stream": true,
    "max_tokens": 256,
    "messages": [{"role": "user", "content": "Write a short release note."}]
  }'
```

## OpenAI Responses streaming

```bash theme={null}
curl -N -X POST "https://llm.apixo.ai/v1/responses" \
  -H "Authorization: Bearer $APIXO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.4",
    "stream": true,
    "input": "Write a short release note."
  }'
```

## Gemini streaming

```bash theme={null}
curl -N -X POST "https://llm.apixo.ai/v1beta/models/gemini-3.1-pro-preview:streamGenerateContent" \
  -H "x-goog-api-key: $APIXO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [{"text": "Write a short release note."}]
      }
    ]
  }'
```

## Troubleshooting

* Test non-streaming first if a third-party app fails to read streamed events.
* Confirm the app supports the same provider streaming format.
* Confirm your API key is available as `APIXO_API_KEY`.
* Retry transient `429`, `502`, and `504` errors with backoff.

See [Errors and Retry](/docs/llm/errors-retry) for retry guidance.
