# OVHcloud AI Endpoints

[OVHcloud AI Endpoints](https://docs.ovhcloud.com/en/guides/public-cloud/ai-machine-learning/ai-endpoints-getting-started) provides managed inference endpoints for hosted models. AISIX gives applications caller keys and stable model aliases for accessing those endpoints.

## Prerequisites[​](#prerequisites "Direct link to Prerequisites")

Before starting, prepare the following:

* One AISIX setup:

  <!-- -->

  * For AISIX Enterprise or AISIX Cloud, an environment with an attached gateway and a write-scoped admin token. For AISIX Enterprise, follow the [AISIX Enterprise getting-started guide](https://docs.api7.ai/ai-gateway/getting-started/aisix-cloud-quickstart.md). To request AISIX Cloud access, [contact API7](https://api7.ai/contact).
  * For the open-source AISIX gateway, prepare either a local AISIX installation or the Docker setup from the [AISIX OSS getting-started guide](https://docs.api7.ai/ai-gateway/getting-started/gateway-quickstart.md). Configure the gateway to load a declarative resources file.

* An OVHcloud AI Endpoints access token.

* Access to the selected model.

* `curl` and `jq`.

## Configure with AISIX Enterprise or AISIX Cloud[​](#configure-with-aisix-enterprise-or-aisix-cloud "Direct link to Configure with AISIX Enterprise or AISIX Cloud")

Export the control-plane connection details:

```
# AISIX_CP is the Admin API base URL; include /api and omit a trailing slash

# The local AISIX Enterprise quickstart uses http://localhost:8080/api

export AISIX_CP="YOUR_AISIX_CONTROL_PLANE_API_URL"

export AISIX_TOKEN="YOUR_ADMIN_TOKEN"

export ENV_ID="YOUR_ENVIRONMENT_ID"
```

OVHcloud is a community catalog provider with an OpenAI-compatible endpoint. AISIX connects through the `openai` adapter and authenticates upstream requests with a bearer token.

### Create a Provider Key[​](#create-a-provider-key "Direct link to Create a Provider Key")

```
export OVHCLOUD_API_KEY="YOUR_OVHCLOUD_ACCESS_TOKEN"



PROVIDER_KEY_ID=$(

  curl -sS -X POST "$AISIX_CP/provider_keys" \

    -H "Authorization: Bearer $AISIX_TOKEN" \

    -H "Content-Type: application/json" \

    -d '{

      "display_name": "ovhcloud-prod",

      "provider": "ovhcloud",

      "api_key": "'"${OVHCLOUD_API_KEY}"'",

      "api_base": "https://oai.endpoints.kepler.ai.cloud.ovh.net/v1",

      "apis": {

        "responses": {}

      },

      "allowed_environments": ["'"${ENV_ID}"'"]

    }' | jq -er '.provider_key.id'

)



echo "$PROVIDER_KEY_ID"
```

Use the catalog ID `ovhcloud` and omit `adapter`. AISIX derives the OpenAI wire format and bearer authentication.

The API base is the shared OpenAI-compatible root documented by OVHcloud. It includes `/v1`; AISIX appends the selected endpoint path to this base.

The `apis.responses` declaration sends Responses requests to OVHcloud's native endpoint on the same API base instead of translating them through Chat Completions.

### Create a Model[​](#create-a-model "Direct link to Create a Model")

Create an alias with the exact OVHcloud model ID:

```
MODEL_ID=$(

  curl -sS -X POST "$AISIX_CP/environments/$ENV_ID/models" \

    -H "Authorization: Bearer $AISIX_TOKEN" \

    -H "Content-Type: application/json" \

    -d '{

      "display_name": "ovhcloud-gptoss-prod",

      "model_name": "gpt-oss-20b",

      "provider_key_id": "'"${PROVIDER_KEY_ID}"'"

    }' | jq -er '.model.id'

)



echo "$MODEL_ID"
```

OVHcloud model IDs do not necessarily match the publisher's original repository ID. Copy the value shown by OVHcloud, including underscores, hyphens, and casing.

### Create a Caller API Key[​](#create-a-caller-api-key "Direct link to Create a Caller API Key")

```
AISIX_API_KEY=$(

  curl -sS -X POST "$AISIX_CP/environments/$ENV_ID/api_keys" \

    -H "Authorization: Bearer $AISIX_TOKEN" \

    -H "Content-Type: application/json" \

    -d '{

      "display_name": "ovhcloud-caller",

      "allowed_models": ["'"${MODEL_ID}"'"]

    }' | jq -er '.plaintext'

)



echo "$AISIX_API_KEY"
```

## Configure with AISIX OSS[​](#configure-with-aisix-oss "Direct link to Configure with AISIX OSS")

Export the upstream credential and choose the caller API key that applications will send to the gateway:

```
export OVHCLOUD_API_KEY="YOUR_PROVIDER_API_KEY"

export CALLER_API_KEY="YOUR_CALLER_API_KEY"

export CALLER_API_KEY_SHA256="$(printf '%s' "$CALLER_API_KEY" | sha256sum | cut -d ' ' -f 1)"
```

For a new gateway, use this complete resources file. For an existing gateway, merge the entries into its [current file](https://docs.api7.ai/ai-gateway/reference/resources-file.md#apply-resource-examples-safely), preserving its other resources:

resources.yaml

```
_format_version: "2"



provider_keys:

  - id: 0937e08c-16c4-49e1-bd77-88892680da9f

    display_name: "ovhcloud-prod"

    provider: "ovhcloud"

    adapter: "openai"

    api_key: ${OVHCLOUD_API_KEY}

    api_base: "https://oai.endpoints.kepler.ai.cloud.ovh.net/v1"

    apis:

      responses: {}



models:

  - id: 3b2da538-0289-4278-b9be-47ce1a77c602

    display_name: "ovhcloud-gptoss-prod"

    provider: "ovhcloud"

    model_name: "gpt-oss-20b"

    provider_key_id: 0937e08c-16c4-49e1-bd77-88892680da9f



api_keys:

  - id: a7763a36-ab90-4d42-b894-ee83908c3809

    display_name: "ovhcloud-caller"

    key_hash: ${CALLER_API_KEY_SHA256}

    allowed_models:

      - "ovhcloud-gptoss-prod"
```

If AISIX is installed locally, validate the file before loading it:

```
aisix validate --resources resources.yaml
```

After validation, start the gateway with the referenced environment variables in its process environment. Reload an existing gateway only if those variables are already available to the process; otherwise, restart it with the updated environment.

If you use Docker, adapt the validation and startup commands in the [AISIX OSS getting-started guide](https://docs.api7.ai/ai-gateway/getting-started/gateway-quickstart.md). Mount this `resources.yaml` file and pass every environment variable it references with `-e` in both commands. After the resources load, prepare the shared verification request below:

```
export AISIX_API_KEY="$CALLER_API_KEY"
```

## Verify the Provider Connection[​](#verify-the-provider-connection "Direct link to Verify the Provider Connection")

Export the AISIX gateway origin:

```
# AISIX_PROXY has no trailing slash or endpoint path

# The local quickstarts use http://127.0.0.1:3000

export AISIX_PROXY="YOUR_AISIX_GATEWAY_URL"
```

Send a Responses request through the AISIX proxy:

```
curl -sS -X POST "$AISIX_PROXY/v1/responses" \

  -H "Authorization: Bearer $AISIX_API_KEY" \

  -H "Content-Type: application/json" \

  -d '{

    "model": "ovhcloud-gptoss-prod",

    "input": "Say hello from OVHcloud AI Endpoints.",

    "store": false

  }'
```

AISIX sends the OVHcloud model ID to the native Responses endpoint with bearer authentication, then restores the AISIX alias in the response. OVHcloud requires `store: false` because it does not currently manage Responses state.

## Endpoint Coverage[​](#endpoint-coverage "Direct link to Endpoint Coverage")

An OVHcloud model alias does not reach every proxy route. AISIX uses the `openai` adapter for the normalized inference routes, but some routes also restrict the configured provider value.

| Route                                                    | OVHcloud support                                                                                                                                                                                                                                                                                                        |
| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `/v1/chat/completions`, including `stream: true`         | Supported. Tool calling, structured output, vision, and other capabilities depend on the selected model.                                                                                                                                                                                                                |
| `/v1/responses`                                          | Sent to OVHcloud's native [Responses API](https://docs.ovhcloud.com/en/guides/public-cloud/ai-machine-learning/ai-endpoints-responses-api) because this guide declares `apis.responses`. Send `store: false`; state, `previous_response_id`, and built-in tools are not supported. Custom function tools are supported. |
| `/v1/messages`                                           | Supported for Anthropic-shaped callers through translation to chat completions. `/v1/messages/count_tokens` is unavailable because it requires an Anthropic-protocol provider key.                                                                                                                                      |
| `/v1/embeddings`                                         | Supported when the alias names an OVHcloud embedding model, such as `bge-m3`.                                                                                                                                                                                                                                           |
| `/v1/audio/transcriptions`                               | Supported when the alias names an OVHcloud speech-to-text model, such as `whisper-large-v3`. AISIX rewrites the model alias and forwards the OpenAI-compatible multipart form to OVHcloud's [transcription endpoint](https://docs.ovhcloud.com/en/guides/public-cloud/ai-machine-learning/ai-endpoints-audio-models).   |
| `/v1/audio/translations` and `/v1/audio/speech`          | Not available on the shared OVHcloud OpenAI-compatible base. OVHcloud handles translation through the transcription prompt and publishes [text-to-speech models](https://docs.ovhcloud.com/en/guides/public-cloud/ai-machine-learning/ai-endpoints-voice-virtual-assistant) on separate native endpoints.               |
| `/v1/images/generations`, `/v1/videos`, and `/v1/rerank` | Not available for an alias whose provider value is `ovhcloud`; these AISIX routes use provider allowlists that exclude it.                                                                                                                                                                                              |
| `/v1/models`                                             | Returns caller-accessible AISIX aliases, not the OVHcloud model catalog. Use `/passthrough/ovhcloud/models` for OVHcloud's current list.                                                                                                                                                                                |
| `/passthrough/ovhcloud/*rest`                            | Available through a configured [passthrough route](https://docs.api7.ai/ai-gateway/endpoints/provider-passthrough.md) for OVHcloud-native routes, with limited gateway normalization.                                                                                                                                   |

The `/passthrough/ovhcloud` paths on this page assume a [passthrough route](https://docs.api7.ai/ai-gateway/endpoints/provider-passthrough.md) claiming that prefix with the OVHcloud API base as its `target_url`; grant the route name on the caller key's `allowed_routes`. The normalized `/v1/responses` route is preferable for native Responses because AISIX rewrites the model alias, streams incrementally, and parses usage. Use passthrough for OVHcloud operations AISIX does not normalize; it forwards the body unchanged, so send the upstream model ID rather than the AISIX alias.

See [Provider Compatibility](https://docs.api7.ai/ai-gateway/providers/compatibility.md) for the gateway-wide endpoint rules.

## Troubleshooting[​](#troubleshooting "Direct link to Troubleshooting")

| Symptom                             | Check                                                             |
| ----------------------------------- | ----------------------------------------------------------------- |
| Upstream `401` or `403`             | Confirm the access token and project entitlement.                 |
| Upstream `404`                      | Keep `/v1` in `api_base` and copy the OVHcloud model ID exactly.  |
| Model not found                     | Check underscores, hyphens, and version segments in `model_name`. |
| Provider key creation returns `400` | Use `provider: "ovhcloud"` and omit `adapter`.                    |

## Next Steps[​](#next-steps "Direct link to Next Steps")

You have now connected AISIX to OVHcloud AI Endpoints and verified the model alias. Continue with these guides:

* [Model Aliases](https://docs.api7.ai/ai-gateway/models/model-aliases.md): configure routing, retry behavior, or cost metadata for the alias.
* [Routing and Failover](https://docs.api7.ai/ai-gateway/routing/routing-and-failover.md): route this alias alongside another European endpoint.
* [Provider Compatibility](https://docs.api7.ai/ai-gateway/providers/compatibility.md): review supported proxy endpoints and provider-specific boundaries.
