# Codex CLI

Set up sivcloud in Codex CLI: a ready-to-copy configuration snippet.

Codex CLI uses the Responses format, so the model must open the `/v1/responses` endpoint. The list of models and the endpoints each one opens is on the Models page in the console.

## Set up

**`~/.codex/config.toml`**

```toml
model = "deepseek-v4.1-flash"
model_provider = "sivcloud"

[model_providers.sivcloud]
name = "sivcloud"
base_url = "https://ai.sivcloud.com/v1"
env_key = "SIVCLOUD_API_KEY"
wire_api = "responses"
```

Export SIVCLOUD_API_KEY with your API key before running codex.

## Check

1. Save the configuration, then restart Codex CLI if needed.
2. Send a short message. The usage shows on the [Usage](https://sivcloud.com/en/docs/console/usage/) page within moments.
3. Seeing `invalid_api_key`? Check the API key. Seeing `model_not_found`? Check the model id. Full list: [Error codes](https://sivcloud.com/en/docs/errors/).

The request format is explained on the [endpoint page](https://sivcloud.com/en/docs/responses/). Never write the API key into a file that goes into a repository.
