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

# Python SDK Integration

The Unbound SDK is built on top of a compatible SDK interface, allowing you to seamlessly integrate Unbound's advanced features while retaining full compatibility with existing methods. With Unbound, you can enhance your interactions with AI providers by leveraging robust monitoring, reliability, prompt management, and more features - without modifying much of your existing code.

## Usage

### Prerequisites

* **Unbound account** — Sign up at [gateway.getunbound.ai](https://gateway.getunbound.ai)
* **API Key** — Get yours at [gateway.getunbound.ai/connect](https://gateway.getunbound.ai/connect)

## Installing the SDK

```bash theme={null}
pip install unbound-gateway
```

## Making a Request to Unbound

Unbound fully adheres to a familiar SDK signature. You can instantly switch to Unbound and start using our production features right out of the box.

Just replace your existing import with `from unbound import Unbound`:

```python theme={null}
from unbound import Unbound

unbound = Unbound(
    base_url="https://api.getunbound.ai",
    api_key="UNBOUND_API_KEY",
)

chat_completion = unbound.chat.completions.create(
    messages = [{ "role": 'user', "content": 'Say this is a test' }],
    model='openai/gpt-4o'
)

print(chat_completion)
```

## Async Usage

Use `AsyncUnbound` instead of `Unbound` with `await`:

```python theme={null}
import asyncio
from unbound import AsyncUnbound

unbound = AsyncUnbound(
    base_url="https://api.getunbound.ai",
    api_key="UNBOUND_API_KEY"
)

async def main():
    chat_completion = await unbound.chat.completions.create(
        messages=[{'role': 'user', 'content': 'Say this is a test'}],
        model='openai/gpt-4o'
    )

    print(chat_completion)

asyncio.run(main())
```
