[OVHcloud](https://www.ovhcloud.com) is a leading European cloud provider operating over 450,000 servers within 40 data centers across 4 continents. [OVHcloud AI Endpoints](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/) offers access to various models with sovereignty, data privacy and GDPR compliance.

OVHcloud AI Endpoints provides OpenAI-compatible API access to a wide range of language models. This allows easy integration with the Strands Agents SDK using the OpenAI compatibility layer.

## Installation

The Strands Agents SDK provides access to OVHcloud AI Endpoints models through the OpenAI compatibility layer, configured as an optional dependency:

```bash
pip install 'strands-agents[openai]'
```

## Usage

After installing the `openai` package, you can import and initialize the OpenAI-compatible provider for OVHcloud AI Endpoints:

```python
from strands import Agent
from strands.models.openai import OpenAIModel

model = OpenAIModel(
    client_args={
        "api_key": "",  # Optional: empty string or omit for free tier with rate limit
        "base_url": "https://oai.endpoints.kepler.ai.cloud.ovh.net/v1",
    },
    model_id="Meta-Llama-3_3-70B-Instruct",  # See catalog for available models
    params={
        "max_tokens": 5000,
        "temperature": 0.1
    }
)

agent = Agent(model=model)
agent("What is 2+2?")
```

### Using with an API Key

If you have an API key, you can use it to access higher rate limits and additional features:

```python
model = OpenAIModel(
    client_args={
        "api_key": "<OVHCLOUD_API_KEY>",  # Your OVHcloud AI Endpoints API key
        "base_url": "https://oai.endpoints.kepler.ai.cloud.ovh.net/v1",
    },
    model_id="Meta-Llama-3_3-70B-Instruct",
    params={
        "max_tokens": 5000,
        "temperature": 0.1
    }
)
```

## Configuration

### Client Configuration

The `client_args` configure the underlying OpenAI-compatible client:

-   `api_key`: Your OVHcloud AI Endpoints API key (optional).
    -   **Free tier**: Use an empty string `""` or omit the parameter entirely to access the API with rate limits.
    -   **With API key**: Generate one via [OVHcloud Manager](https://ovh.com/manager) > **Public Cloud** > **AI & Machine Learning** > **AI Endpoints** > **API keys**.
-   `base_url`: `https://oai.endpoints.kepler.ai.cloud.ovh.net/v1`

### Model Configuration

| Parameter | Description | Example | Options |
| --- | --- | --- | --- |
| `model_id` | Model name | `Meta-Llama-3_3-70B-Instruct` | See [OVHcloud AI Endpoints Catalog](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/catalog/) |
| `params` | Model-specific parameters | `{"max_tokens": 5000, "temperature": 0.7}` | Standard OpenAI-compatible parameters |

## Troubleshooting

### `ModuleNotFoundError: No module named 'openai'`

You must install the `openai` dependency to use this provider:

```bash
pip install 'strands-agents[openai]'
```

### Unexpected model behavior?

Ensure you’re using a model ID from the [OVHcloud AI Endpoints Catalog](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/catalog/), and your `base_url` is set to `https://oai.endpoints.kepler.ai.cloud.ovh.net/v1`.

### Rate limit errors

If you encounter rate limit errors, consider:

-   Using an API key for higher rate limits
-   Reviewing the [OVHcloud AI Endpoints documentation](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/) for rate limit details

## References

-   [OVHcloud AI Endpoints](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/)
-   [OVHcloud AI Endpoints Catalog](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/catalog/)
-   [OVHcloud Manager](https://ovh.com/manager)