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

# KiosAPI API Base URL: Configure Your SDK Endpoints

> The KiosAPI base URL is https://kiosapi.com/v1/. Learn how to configure it in the OpenAI Python SDK, OpenAI Node.js SDK, and Anthropic SDK.

All requests to KiosAPI go to the base URL `https://kiosapi.com/v1/`. Depending on the endpoint format you're using, you append the appropriate path to this base. Configure this URL in your SDK once and all subsequent requests will route through KiosAPI.

## Endpoint URLs

| Endpoint                | Full URL                                                    |
| ----------------------- | ----------------------------------------------------------- |
| OpenAI chat completions | `https://kiosapi.com/v1/chat/completions`                   |
| OpenAI responses        | `https://kiosapi.com/v1/responses`                          |
| Claude native           | `https://kiosapi.com/v1/messages`                           |
| Gemini native           | `https://kiosapi.com/v1beta/models/{model}:generateContent` |

<Tip>
  The **Dashboard > Console** page always shows the current authoritative API base URL. If the address ever changes, the dashboard reflects the update first — check there before debugging connectivity issues.
</Tip>

## Configuring Your SDK

Set the base URL once when you initialize the client. The examples below show how to do this in the most common SDKs.

<Tabs>
  <Tab title="Python (OpenAI SDK)">
    ```python theme={null}
    from openai import OpenAI

    client = OpenAI(
        base_url="https://kiosapi.com/v1/",
        api_key="sk-kilo-xxxxxxxxxxxx"
    )

    response = client.chat.completions.create(
        model="gpt-4o",
        messages=[{"role": "user", "content": "Hello!"}]
    )
    ```
  </Tab>

  <Tab title="Node.js (OpenAI SDK)">
    ```javascript theme={null}
    import OpenAI from "openai";

    const client = new OpenAI({
      baseURL: "https://kiosapi.com/v1/",
      apiKey: "sk-kilo-xxxxxxxxxxxx",
    });

    const response = await client.chat.completions.create({
      model: "gpt-4o",
      messages: [{ role: "user", content: "Hello!" }],
    });
    ```
  </Tab>

  <Tab title="Python (Anthropic SDK)">
    ```python theme={null}
    import anthropic

    client = anthropic.Anthropic(
        base_url="https://kiosapi.com/v1/",
        api_key="sk-kilo-xxxxxxxxxxxx"
    )

    message = client.messages.create(
        model="claude-sonnet-4-20250514",
        max_tokens=1024,
        messages=[{"role": "user", "content": "Hello!"}]
    )
    ```
  </Tab>
</Tabs>

<Warning>
  Your KiosAPI key only works with the KiosAPI base URL. Here's what works and what doesn't:

  * ✅ **KiosAPI key** → `https://kiosapi.com/v1/`
  * ❌ KiosAPI key → `https://api.openai.com/v1/` (will fail)
  * ❌ OpenAI key → `https://kiosapi.com/v1/` (will fail)

  Double-check both values in your dashboard before debugging authentication errors.
</Warning>

## Environment Variables

Avoid hardcoding the base URL or API key directly in your source code. Store them in a `.env` file and load them at runtime:

```bash theme={null}
# .env
KIOSAPI_BASE_URL=https://kiosapi.com/v1/
KIOSAPI_API_KEY=sk-kilo-xxxxxxxxxxxx
```

<Info>
  KiosAPI is designed as a drop-in replacement for OpenAI, Claude, and Gemini APIs. By setting the base URL to `kiosapi.com`, you can use any existing OpenAI-compatible SDK without changing your application logic — just swap the URL and key.
</Info>
