Codex

OpenAI Codex talks to models over the Responses API, which EmberCloud implements natively at /v1/responses. That means you can run Codex on EmberCloud's open-source models by adding one provider block to your Codex config — no proxy or wrapper required.

TL;DR: point a custom Codex model_provider at https://api.embercloud.ai/v1 with wire_api = "responses", set your API key, and run.

Configure Codex

Add an ember provider to ~/.codex/config.toml and make it the default model provider:

~/.codex/config.toml
model = "glm-4.7"
model_provider = "ember"

[model_providers.ember]
name = "Ember Cloud"
base_url = "https://api.embercloud.ai/v1"
wire_api = "responses"
env_key = "EMBER_API_KEY"

Codex reads your key from the environment variable named by env_key and sends it as Authorization: Bearer. Export your EmberCloud API key:

Set your key
export EMBER_API_KEY="YOUR_API_KEY"

Run It

That's it — run Codex as usual. Requests now go to https://api.embercloud.ai/v1/responses.

Terminal
# make sure you're on a recent Codex
npm install -g @openai/codex

codex "refactor this function to use async/await"

Want a different model for a single run? Override it without editing the config:

Per-run model override
codex -c model="glm-5.2" "add tests for the auth module"

Notes & Troubleshooting

  • Keep the /v1 in base_url. Codex appends /responses, so https://api.embercloud.ai/v1 becomes https://api.embercloud.ai/v1/responses. Dropping /v1 will 404.
  • Use wire_api = "responses". Recent Codex removed the old chat wire API; responses is both the only valid value and the default. If you're on an old Codex, update it.
  • Pick a distinct provider id. The built-in ids openai, ollama, and lmstudio are reserved — that's why we use ember.
  • See the Models page for available model ids you can put in model.