Metadata-Version: 2.4
Name: axemere-gateway-openai
Version: 0.1.5
Summary: Axemere AI Gateway OpenAI SDK wrapper — drop-in OpenAI/AzureOpenAI subclasses
License: MIT
Requires-Python: >=3.10
Requires-Dist: axemere-gateway>=0.1.0
Requires-Dist: openai>=1.0.0
Description-Content-Type: text/markdown

# axemere-gateway-openai

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](../../LICENSE)

Drop-in replacement for the OpenAI Python SDK that routes every request through the [Axemere AI Gateway](https://axemere.ai).

Change one import — all existing OpenAI code works unchanged. The gateway adds cost controls, policy enforcement, and an append-only audit ledger to every call.

## Install

```bash
pip install axemere-gateway-openai
```

## Usage

```python
# Before
from openai import OpenAI

# After — one line change
from axemere.gateway.openai import OpenAI

client = OpenAI()  # reads AXEMERE_GATEWAY_URL + AXEMERE_GATEWAY_TOKEN
response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)
```

Streaming, async (`AsyncOpenAI`), and Azure OpenAI (`AzureOpenAI`, `AsyncAzureOpenAI`) are all supported.

## Configuration

| Env var | Description |
|---------|-------------|
| `AXEMERE_GATEWAY_URL` | Gateway base URL, e.g. `http://localhost:7080` |
| `AXEMERE_GATEWAY_TOKEN` | Bearer token issued by the gateway |

## Links

- [Axemere AI Gateway](https://axemere.ai)
- [Documentation](https://axemere.ai/docs)
- [GitHub](https://github.com/Axemere-LLC/axemere-python)

## License

MIT
