Documentation Index
Fetch the complete documentation index at: https://docs.gravitex.ai/llms.txt
Use this file to discover all available pages before exploring further.
1. Overview
Codex is OpenAI’s official terminal-based coding agent, designed for code generation, code review and complex engineering tasks. With GravitexAI (OpenAI-compatible) you can:Unified access
Use one API key to reach GPT-5.5 / 5.4 / 5.4-Pro and the whole GPT family
Responses API
Built-in
wire_api = "responses" for the latest GPT modelsHigh availability
Distributed infra with automatic failover and stable global routing
Pay-as-you-go
No subscriptions, token-based billing — better value than the official endpoint
2. Prerequisites
- Codex CLI installed (follow Codex’s official install instructions)
- An API key created in the GravitexAI console (format
sk-xxxxxxxxxx)
3. Quick Setup
Codex uses a TOML config to declare providers. Env vars can be unreliable for custom providers, so we recommend writing the config directly into TOML.Edit ~/.codex/config.toml
4. Recommended Models (via GravitexAI)
Codex currently supports GPT-family model IDs. The most commonly used combinations on GravitexAI:| Model ID | Best for | Notes |
|---|---|---|
| gpt-5.5 ⭐ | Complex reasoning, production code | OpenAI’s latest flagship |
| gpt-5.4 | General chat, codegen | Next-gen main model for pro tasks |
| gpt-5.4-pro | Heavy refactoring / reasoning | High-performance variant |
| gpt-5.4-mini | Balanced cost & speed | General daily dev |
| gpt-5.4-nano | High concurrency / low cost | Lightweight workloads |
| gpt-5.1-codex | Code-focused completion | Requires wire_api = "responses" |
5. Personality & Reasoning
Codex exposes two optional settings to customize behavior: personality and model_reasoning_effort.5.1 Personality
Controls the tone and style of replies.| Option | Description |
|---|---|
pragmatic | Direct and practical, minimal explanation |
concise | Short and to the point |
detailed | More context and explanation |
analytical | Structured, logic-focused |
creative | Expressive and flexible |
5.2 Reasoning effort
Controls how much “thinking” the model spends — maps to thereasoning.effort field of OpenAI’s Responses API.
| Option | Description | Best for |
|---|---|---|
low | Fastest responses | Quick Q&A, copy generation |
medium | Balanced speed/quality | Day-to-day coding |
high | Deep reasoning | Complex debugging, design, algorithms |
5.3 Full example
- Clear, practical answers
- Deep reasoning for complex tasks
- Full GPT-5.5 capability via the Responses API
6. FAQ
401 / invalid API key
401 / invalid API key
- Re-check your key in the GravitexAI console — beware of stray spaces or newlines.
- Confirm the
Authorizationheader isBearer sk-xxxxxxxxxx. - Make sure your balance is positive.
404 / wrong endpoint
404 / wrong endpoint
Make sure the Base URL ends with Common mistakes: missing
/v1:/v1, appending /responses, using http:// instead of https://.Model not found
Model not found
- Verify the model ID exists in the GravitexAI model list.
- Codex supports GPT-family IDs only (no Claude / Gemini).
- Model names are case-sensitive.
chatCompletion error with gpt-5.1-codex
chatCompletion error with gpt-5.1-codex
gpt-5.1-codex / gpt-5.2-codex and similar Codex models only support the Responses API. Make sure your provider config has:Env vars don't seem to work?
Env vars don't seem to work?
For custom providers, Codex may not auto-inject
OPENAI_API_KEY. Recommended: set Authorization explicitly via http_headers:7. References
- GravitexAI console: https://maas.gravitex.ai
- Model catalog: https://maas.gravitex.ai/#/models
- API keys: https://maas.gravitex.ai/#/keys
- OpenAI Responses API: https://platform.openai.com/docs/api-reference/responses