> ## 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.

# Use APIXO with Official SDKs

> Configure Claude, OpenAI, and Gemini compatible SDKs with APIXO

Use APIXO as a drop-in gateway by changing the SDK base URL and API key. Keep the same official request shape and switch models by changing the `model` value.

```bash theme={null}
export APIXO_API_KEY="your_apixo_api_key"
```

## Claude SDK

Use this when your app is built with the Anthropic Claude SDK or another Claude-compatible client.

```javascript theme={null}
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env.APIXO_API_KEY,
  baseURL: "https://llm.apixo.ai"
});

const message = await client.messages.create({
  model: "claude-sonnet-4-6",
  max_tokens: 256,
  messages: [{ role: "user", content: "Say hello in one sentence." }]
});

console.log(message.content);
```

| Setting     | Value                  |
| ----------- | ---------------------- |
| Base URL    | `https://llm.apixo.ai` |
| API key env | `APIXO_API_KEY`        |
| Model field | Request body `model`   |

## OpenAI SDK

Use this when your app is built with the OpenAI SDK and calls the Responses API.

```javascript theme={null}
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.APIXO_API_KEY,
  baseURL: "https://llm.apixo.ai/v1"
});

const response = await client.responses.create({
  model: "gpt-5.4",
  input: "Say hello in one sentence."
});

console.log(response.output_text);
```

| Setting     | Value                     |
| ----------- | ------------------------- |
| Base URL    | `https://llm.apixo.ai/v1` |
| API key env | `APIXO_API_KEY`           |
| Model field | Request body `model`      |

## Gemini fetch client

Use this when your app calls Gemini-compatible HTTP endpoints directly.

```javascript theme={null}
const model = "gemini-3.1-pro-preview";

const response = await fetch(
  `https://llm.apixo.ai/v1beta/models/${model}:generateContent`,
  {
    method: "POST",
    headers: {
      "x-goog-api-key": process.env.APIXO_API_KEY,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      contents: [
        {
          role: "user",
          parts: [{ text: "Summarize this API integration." }]
        }
      ]
    })
  }
);

const data = await response.json();
console.log(data);
```

| Setting        | Value                                             |
| -------------- | ------------------------------------------------- |
| Base URL       | `https://llm.apixo.ai`                            |
| API key env    | `APIXO_API_KEY`                                   |
| Model location | URL path `/v1beta/models/{model}:generateContent` |

## Switch models

You do not need a different API key to switch models. Change only the model id used by the provider-compatible API.

<CardGroup>
  <Card title="Supported models" href="/docs/llm/supported-models">
    Copy current Claude, OpenAI, and Gemini model ids.
  </Card>

  <Card title="Streaming" href="/docs/llm/streaming">
    Enable streaming with each provider's normal streaming option.
  </Card>
</CardGroup>

<CardGroup>
  <Card title="Claude API" href="/docs/models/text/claude">
    Claude-compatible endpoint and curl example.
  </Card>

  <Card title="OpenAI Responses API" href="/docs/models/text/openai-responses">
    OpenAI-compatible endpoint and curl example.
  </Card>

  <Card title="Gemini API" href="/docs/models/text/gemini">
    Gemini-compatible endpoint and curl example.
  </Card>
</CardGroup>
