Skip to main content
Codex is currently unsupported and this integration is not functional at this time.

Concentrate and Codex

Codex is a command-line coding assistant from OpenAI that supports OpenAI-compatible APIs. By pointing Codex at Concentrate, you get a number of important advantages over connecting to OpenAI directly.

Unified Spend Management

Concentrate offers centralized budget management for groups and companies. You can prevent unforeseen cost overruns and assign limits to team members all through the Concentrate dashboard. This is particularly helpful if many developers use Codex throughout your company.

Observability and Insights

With Concentrate, you can monitor all of your team’s Codex activity through the dashboard. This includes usage statistics, top spenders, providers and models, latency and more.

Prerequisites

Before you begin, ensure you have:
  • A Concentrate AI account with an active API key (starts with sk-cn)
  • Codex CLI installed

Quick Setup

Bash

Verify Installation

After running the setup script:
  1. Restart your terminal or source your shell profile:
  2. Launch Codex:
    The CLI should start without errors and show your configured model.

Manual Setup

If you prefer to configure Codex manually or the automated script doesn’t work for your environment:
1

Set your API key

Add the following to your shell profile (~/.bashrc, ~/.zshrc, etc.):
Then reload your shell:
2

Configure ~/.codex/config.toml

Create or edit ~/.codex/config.toml:
3

Verify the connection

Launch Codex in a project directory:
You should see the model name from your config displayed and be able to interact with the assistant.

Remove Concentrate AI

Bash

Troubleshooting

If you see an error about a missing API key:
  1. Verify the environment variable is set:
  2. Make sure you’ve sourced your shell profile:
  3. Confirm env_key in your config.toml is set to "CONCENTRATE_API_KEY" (not "OPENAI_API_KEY")
If your API key is rejected:
  1. Verify the key in your dashboard
  2. Ensure there are no extra spaces or quotes in the environment variable
  3. Check that the key starts with sk-cn
If you cannot connect to the API:
  1. Verify base_url in your config.toml is set correctly:
  2. Test the connection manually:
  3. Check your internet connection and firewall settings

Next Steps

Codex CLI on GitHub

View source, report issues, and follow development

Available Models

Browse all supported models

API Reference

Explore the full API capabilities

Get Support

Contact our support team