Skip to main content

Documentation Index

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

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

OpenAI’s Codex CLI lets you swap providers via a TOML config. Point it at GMI Cloud and you get the full GMI model catalog through Codex’s native interface, chat, tool use, and the OpenAI Responses API all work as-is.

Prerequisites

  • A GMI Cloud account at console.gmicloud.ai
  • Codex CLI installed
  • A terminal running zsh or bash
  • About 5 minutes

Step 1. Get your GMI API key

  1. Sign in to console.gmicloud.ai.
  2. Open API Keys and click Create API Key.
  3. Copy the key now, it won’t be shown again.

Step 2. Export the key

Add this to your shell config (~/.zshrc or ~/.bashrc):
export GMI_API_KEY=your_gmi_api_key_here
Then reload:
source ~/.zshrc

Step 3. Configure Codex

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

model = "openai/gpt-5.5"
model_provider = "gmi"

[model_providers.gmi]
name = "GMI Cloud"
base_url = "https://api.gmi-serving.com/v1"
env_key = "GMI_API_KEY"
wire_api = "responses"

[projects."/home/your-username"]
trust_level = "trusted"

[tui.model_availability_nux]
"gpt-5.5" = 2
Adjust two things for your setup:
  • model: pick any model from the GMI catalog. Defaults to openai/gpt-5.5 here.
  • [projects."/path"]: set this to the absolute path of the project directory you want Codex to trust without prompting.
The wire_api = "responses" line tells Codex to use OpenAI’s Responses API, which GMI Cloud serves at /v1/responses.

Step 4. Run Codex

codex
Codex picks up the config, reads GMI_API_KEY from your environment, and talks to GMI Cloud directly.

Tips

Troubleshooting

  • 401 Unauthorized: GMI_API_KEY isn’t exported in the shell where you launched Codex. Run echo $GMI_API_KEY to confirm.
  • Unknown model: the model string must include the provider prefix (e.g. openai/gpt-5.5, not gpt-5.5).
  • Trust prompts on every run: make sure the [projects."..."] path matches the directory you’re running Codex from exactly.

Next steps