> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelstack.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Codex

> Use OpenAI Codex CLI with ModelStack-compatible workflows

## Overview

OpenAI's original Codex API was deprecated. Current Codex workflows are tied to OpenAI's modern model stack (for example GPT-5 Codex variants) and official OpenAI infrastructure.

## Installation

```bash theme={null}
npm install -g @openai/codex
```

## ModelStack Compatibility

Compatibility depends on your Codex CLI version and whether it permits custom OpenAI-compatible base URLs.

If your build supports custom base URL/env vars, configure:

* Base URL: `https://api.modelstack.cc/v1`
* API key: ModelStack API key

If not, use one of the tools with explicit OpenAI-compatible provider support (Cursor, Continue, Cline, Roo Code, Aider, Zed).

## Recommended

For guaranteed ModelStack compatibility, use [Aider](/integrations/aider) or [Continue](/integrations/continue).

***

*Last verified: 2026-03-07*


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.