> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://respan.ai/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://respan.ai/docs/_mcp/server.

# Aleph Alpha (gateway)

> Set up Aleph Alpha with the Respan gateway.

Route Aleph Alpha calls through the Respan gateway after the Aleph Alpha model you want is available in your Respan model list. Only your `RESPAN_API_KEY` is needed in the application code.

## Setup

> **Note**
>
> Use a current Aleph Alpha model ID from your Respan model list.

#### Install packages

```bash
pip install openai
```

#### Set environment variables

```bash
export RESPAN_API_KEY="YOUR_RESPAN_API_KEY"
```

No `ALEPH_ALPHA_API_KEY` is needed in this application. The Respan gateway handles provider authentication.

#### Point an OpenAI-compatible client to the Respan gateway

```python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["RESPAN_API_KEY"],
    base_url="https://api.respan.ai/api",
)

response = client.chat.completions.create(
    model="YOUR_ALEPH_ALPHA_MODEL_ID",
    messages=[{"role": "user", "content": "Say hello in three languages."}],
)
print(response.choices[0].message.content)
```

## Switch models

Change the `model` parameter to use 1000+ models from different providers through the same gateway.

```python
response = client.chat.completions.create(model="YOUR_ALEPH_ALPHA_MODEL_ID", messages=messages)
response = client.chat.completions.create(model="openai/gpt-6-sol", messages=messages)
response = client.chat.completions.create(model="anthropic/claude-opus-5-5", messages=messages)
```

See the [full model list](https://platform.respan.ai/platform/models).