Codex + DeepSeek

Give Codex a flat-rate DeepSeek provider.

Codex supports named Responses API providers. Add Camel Stream once, keep the key in your environment, and launch Codex with a dedicated Stream profile.

Why this setup

Keep the agent. Change the inference bill.

01

Native Responses transport

Codex talks directly to Stream's Responses API instead of relying on a compatibility shim or plugin.

02

A separate provider profile

The Stream profile leaves your normal OpenAI provider and unrelated Codex settings in place.

03

Built for coding loops

Repository exploration and repeated tool calls use flat-rate Stream capacity rather than a token meter.

Configuration

Connect Codex to Stream.

1. Export your Stream key

Set CAMEL_API_KEY in the shell that launches Codex. Keep the raw key out of your TOML files.

2. Add the provider and profile

Register camel_stream in ~/.codex/config.toml, then create ~/.codex/camel-stream.config.toml with the Stream model selection.

3. Launch the Stream profile

Run codex --profile camel-stream in a test repository. Codex will use Stream's /v1/responses endpoint.

Codex configuration
Stream endpoint
# Add to ~/.codex/config.toml
[model_providers.camel_stream]
name = "Camel Stream"
base_url = "https://stream.camelai.com/v1"
env_key = "CAMEL_API_KEY"
wire_api = "responses"

# Create ~/.codex/camel-stream.config.toml
model = "deepseek-v4-flash"
model_provider = "camel_stream"

Troubleshooting

Check these details first.

Most connection issues come down to the endpoint, API mode, model ID, or key. Start with these checks.

01

The Codex base URL includes /v1: https://stream.camelai.com/v1.

02

Set wire_api to responses, not chat or chat_completions.

03

Put the provider in your user Codex config; project-level provider settings are ignored.

04

If authentication fails, confirm CAMEL_API_KEY is available in the same shell that starts Codex.

Frequently asked questions

Before you connect.

Give your coding agent room to work.

DeepSeek V4 Flash through an OpenAI-compatible API with unlimited token usage for one fixed monthly price.

Get your API key