Use APINebula in Codex

Prices and modelsEndpoint verified 2026-11-09

Generate a Codex config from the Responses-compatible endpoint in APINebula's docs. The API key in the config is a placeholder; replace it with a key you create at APINebula.

Endpoints

  • Pay as you gohttps://apinebula.ai/v1The token must be in the CODEX group.Docs · verified 2026-11-09

Generate the config

Pick from the 32 models this provider sells, or type another model name.

Save to ~/.codex/config.toml; merge it in if the file already exists
model = "gpt-6-astra"
model_provider = "apinebula"

[model_providers.apinebula]
name = "APINebula"
base_url = "https://apinebula.ai/v1"
env_key = "APINEBULA_API_KEY"
wire_api = "responses"

Models and prices

ModelInputOutputRatio
Claude Fable 5.2claude-fable-5-2Claude Code全球高防Subscription pool$2.04$10.190.25×
Gemini 4 Argongemini-4-argonGemini-UltraReverse-engineered$0.30$1.500.15×
Gemini 4 Argongemini-4-argon-highGemini-UltraReverse-engineered$0.60$3.000.30×
Gemini 4 Argongemini-4-argon-lowGemini-UltraReverse-engineered$0.60$3.000.30×
Gemini 4 Argongemini-4-argon-mediumGemini-UltraReverse-engineered$0.60$3.000.30×
Claude Haiku 5.5claude-haiku-5-5Claude Code全球高防Subscription pool$0.025$0.1270.25×
GPT-6.1 Solgpt-6.1-solCODEXSubscription pool$0.117$0.5850.059×
Claude Sonnet 5.5claude-sonnet-5-5CC-kiroReverse-engineered$0.15$0.750.075×
Claude Opus 5.5claude-opus-5-5CC-kiroReverse-engineered$0.30$1.500.075×
GPT-6 Solgpt-6-solCODEXSubscription pool$0.117$0.5850.059×
Grok 4.7grok-4.7GrokSubscription pool$0.15$0.450.075×
GPT-6 Astragpt-6-astraCODEXSubscription pool$0.585$2.920.059×
Gemini 3.8 Flashgemini-3.8-flashGemini-反重力Reverse-engineered$0.090$0.450.12×
Claude Fable 5.1claude-fable-5-1Claude Code全球高防Subscription pool$2.55$12.740.25×
GLM-5.3glm-5.3智谱-自部署Self-hosted$1.02$3.570.85×
Gemini 3.7 Flashgemini-3.7-flashGemini-反重力Reverse-engineered$0.090$0.450.12×
Grok 4.6grok-4.6GrokSubscription pool$0.15$0.450.075×
Claude Opus 5claude-opus-5CC-kiroReverse-engineered$0.375$1.870.075×
Gemini 3.6 Flashgemini-3.6-flashGemini-反重力Reverse-engineered$0.18$0.8990.24×
Kimi K3kimi-k3KIMI-自部署Self-hosted$2.55$12.740.85×
GPT-5.6 Solgpt-5.6-solCODEXSubscription pool$0.292$1.750.088×
Grok 4.5grok-4.5GrokSubscription pool$0.15$0.450.075×
Claude Sonnet 5claude-sonnet-5CC-kiroReverse-engineered$0.15$0.750.075×
GLM-5.2glm-5.2智谱-官Official API$1.14$3.990.95×
Claude Fable 5claude-fable-5Claude Code全球高防Subscription pool$2.55$12.740.25×
Claude Opus 4.8claude-opus-4-8CC-kiroReverse-engineered$0.375$1.870.075×
Gemini 3.5 Flashgemini-3.5-flashGemini-反重力Reverse-engineered$0.18$1.080.12×
Grok 4.3grok-4.3GrokSubscription pool$0.094$0.1870.075×
Claude Opus 4.7claude-opus-4-7CC-kiroReverse-engineered$0.375$1.870.075×
Gemini 3.1 Pro Previewgemini-3.1-pro-previewGemini-反重力Reverse-engineered$0.24$1.440.12×
Claude Sonnet 4.6claude-sonnet-4-6CC-kiroReverse-engineered$0.225$1.120.075×
Claude Opus 4.6claude-opus-4-6CC-kiroReverse-engineered$0.375$1.870.075×
$ per 1M tokens. Each model uses the provider's cheapest group; the ratio uses the output price

How to check it works

Restart Codex and send a message. If it replies and the request shows up in APINebula's console, it is using this endpoint.

FAQ

Why is the key in an environment variable?

config.toml only holds the variable's name, so the key never goes into the config file and does not leak when you share or sync it. To keep it, add the export line to ~/.zshrc or ~/.bashrc.

How do I switch back to OpenAI?

Remove the model_provider line from config.toml, then restart Codex.

Does my key pass through this site?

No. The page only generates config text and never asks for your key; the key only goes into the terminal or environment variables on your own machine.

Codex configs for other providers