Skip to content

OVHcloud AI Endpoints

OVHcloud is a leading European cloud provider operating over 450,000 servers within 40 data centers across 4 continents. OVHcloud 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.

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

Terminal window
pip install 'strands-agents[openai]'

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

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?")

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

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
}
)

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 > Public Cloud > AI & Machine Learning > AI Endpoints > API keys.
  • base_url: https://oai.endpoints.kepler.ai.cloud.ovh.net/v1
ParameterDescriptionExampleOptions
model_idModel nameMeta-Llama-3_3-70B-InstructSee OVHcloud AI Endpoints Catalog
paramsModel-specific parameters{"max_tokens": 5000, "temperature": 0.7}Standard OpenAI-compatible parameters

ModuleNotFoundError: No module named 'openai'

Section titled “ModuleNotFoundError: No module named 'openai'”

You must install the openai dependency to use this provider:

Terminal window
pip install 'strands-agents[openai]'

Ensure you’re using a model ID from the OVHcloud AI Endpoints Catalog, and your base_url is set to https://oai.endpoints.kepler.ai.cloud.ovh.net/v1.

If you encounter rate limit errors, consider: