---
title: "Pipecat (gateway)"
description: "Set up Pipecat with the Respan gateway."
---

Route Pipecat's underlying LLM calls through the Respan gateway to use 1000+ models from different providers. Only your `RESPAN_API_KEY` is needed. No separate provider keys are required.

Paste this into your coding agent:

```text
Help me set up the Respan gateway with the Pipecat integration.
Follow https://www.respan.ai/docs/integrations/gateway/pipecat.md
```

## Setup

<Steps>
<Step title="Install packages">

```bash
pip install "pipecat-ai[openai]"
```

</Step>

<Step title="Set environment variables">

```bash
export RESPAN_API_KEY="YOUR_RESPAN_API_KEY"
export RESPAN_BASE_URL="https://gateway.respan.ai"
export RESPAN_MODEL="gpt-5.5"
```

No `OPENAI_API_KEY` needed: the Respan gateway handles provider authentication.

</Step>

<Step title="Point Pipecat to the Respan gateway">

```python
import os

from pipecat.services.openai.llm import OpenAILLMService

llm = OpenAILLMService(
    api_key=os.environ["RESPAN_API_KEY"],
    base_url=os.getenv("RESPAN_BASE_URL", "https://gateway.respan.ai"),
    settings=OpenAILLMService.Settings(model=os.getenv("RESPAN_MODEL", "gpt-5.5")),
)
```

Then build and run your pipeline as usual.

</Step>
</Steps>

## Switch models

Change the model setting on `OpenAILLMService` to use another OpenAI model through the same gateway-backed endpoint.

```python
OpenAILLMService(
    api_key=os.environ["RESPAN_API_KEY"],
    base_url="https://gateway.respan.ai",
    settings=OpenAILLMService.Settings(model="gpt-5.5"),
)

OpenAILLMService(
    api_key=os.environ["RESPAN_API_KEY"],
    base_url="https://gateway.respan.ai",
    settings=OpenAILLMService.Settings(model="gpt-5-mini"),
)
```

<Note>
`OpenAILLMService` is Pipecat's OpenAI-compatible service. This page avoids showing Claude or Gemini inside that OpenAI-named service; use the Respan API or OpenAI SDK gateway pages for provider-neutral Claude and Gemini examples.
</Note>

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