Skip to main content

Documentation Index

Fetch the complete documentation index at: https://concentrate.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Codex integration is currently in beta. Some features may have limitations or be subject to change.

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
curl -fsSL https://concentrate.ai/scripts/setup-codex.sh | bash

Verify Installation

After running the setup script:
  1. Restart your terminal or source your shell profile:
    # For bash (Linux)
    source ~/.bashrc
    
    # For bash (macOS)
    source ~/.bash_profile
    
    # For zsh
    source ~/.zshrc
    
  2. Launch Codex:
    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.):
export CONCENTRATE_API_KEY="sk-cn-v1-..."
Then reload your shell:
source ~/.bashrc  # or ~/.zshrc
2

Configure ~/.codex/config.toml

Create or edit ~/.codex/config.toml:
model_provider = "concentrate"
model = "openai/gpt-5.3-codex"

[model_providers.concentrate]
name = "concentrate"
base_url = "https://api.concentrate.ai/v1"
env_key = "CONCENTRATE_API_KEY"
3

Verify the connection

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

Remove Concentrate AI

Bash
curl -fsSL https://concentrate.ai/scripts/uninstall-codex.sh | bash

Troubleshooting

If you see an error about a missing API key:
  1. Verify the environment variable is set:
    echo $CONCENTRATE_API_KEY
    
  2. Make sure you’ve sourced your shell profile:
    source ~/.bashrc  # or appropriate file
    
  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:
    base_url = "https://api.concentrate.ai/v1"
    
  2. Test the connection manually:
    curl https://api.concentrate.ai/v1/models \
      -H "Authorization: Bearer $CONCENTRATE_API_KEY"
    
  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