<!-- Generated from public website sources; do not edit this file. -->

# Codex
Connect Codex to a compatible provider using a separate provider configuration.

## Before you start
Codex uses the Responses API for model requests. This integration requires a service endpoint that supports the Responses API, an API key, and a supported model. Compatibility has not yet been verified for this site.

## Prepare your configuration
Back up your existing `~/.codex/config.toml` before changing it. Obtain the correct base URL and model name from the service. DeepSeek's official guide also uses a model catalog; settings and model metadata can change as Codex evolves.

Check your installed client before editing:

```sh
codex --version
```

## Understand the configuration files
| File or setting | Purpose |
| --- | --- |
| `~/.codex/config.toml` | Provider selection and client settings |
| `model` | The exact model ID supported by your provider |
| `model_provider` | The ID matching your provider table |
| `model_providers.<id>.base_url` | The provider's Responses-compatible API base |
| `model_providers.<id>.wire_api` | `responses` for the integration described here |
| `model_catalog_json` | A catalog with the model metadata expected by the installed client |

The official DeepSeek guide supplies a complete catalog and matching configuration. A base URL alone is not a complete setup. Ask an independent provider for its supported catalog and authentication configuration instead of assuming official metadata applies.

## Follow the provider guide
Use the [DeepSeek Codex integration guide](https://api-docs.deepseek.com/quick_start/agent_integrations/codex/) as a reference for the official API. For this service, substitute its documented provider endpoint and model configuration only after Responses API support is confirmed. Do not run a third-party setup script against your configuration without reviewing what it changes.

## Test and restore
Restart Codex after changing the provider, then run a small request in a test project. If the client cannot reach the model, verify the endpoint, API key, model metadata, and Responses API support. Restore your backed-up configuration to return to your previous provider.

1. Merge provider settings into your existing file; do not duplicate a TOML table.
2. Start a fresh session in a small project and check the selected model.
3. Ask it to explain one file before attempting a large task.
4. If configuration parsing fails, check duplicate tables and quoting first. For HTTP failures, use [error codes](https://deepseeksub.com/docs/error-codes/index.md).
5. Restore both the configuration and any catalog you changed if you return to the original setup.

---

HTML source: [Codex — DeepSeek Subscription Tutorials](https://deepseeksub.com/docs/codex/)
