Integrations

Codex CLI

Add a PromptsForLess provider profile to Codex CLI's config.toml and run Codex on GPT models for less.

Codex CLI speaks the Responses API. Its configuration reference lists responses as the only wire protocol. PromptsForLess serves Responses at the same base URL as Chat Completions, so you only need a provider profile.

Before you start

Install Codex CLI with its official setup instructions. Create an API key in the dashboard and store it as PFL_API_KEY.

Create a profile

Merge this into your user-level ~/.codex/config.toml, keeping your existing settings:

~/.codex/config.toml
[model_providers.promptsforless]
name = "PromptsForLess"
base_url = "https://api.promptsforless.com/v1"
env_key = "PFL_API_KEY"
wire_api = "responses"
requires_openai_auth = false
supports_websockets = false

[profiles.promptsforless]
model_provider = "promptsforless"
model = "gpt-6-luna"

A profile keeps PromptsForLess separate from your other providers, so you choose it when you want it. Codex ignores provider definitions in a project-level .codex/config.toml, so use your user config.

With PFL_API_KEY set in the same terminal, start Codex:

codex --profile promptsforless

Check the connection

Send a direct request to confirm your key and model:

curl --fail-with-body https://api.promptsforless.com/v1/responses \
  -H "Authorization: Bearer $PFL_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"model":"gpt-6-luna","input":"Reply with hello."}'

A completed response includes output text. Then start Codex in a small repository and ask it to describe a file.

Keep the protocol settings

Keep wire_api = "responses", because current Codex does not support chat. Keep supports_websockets = false so Codex streams over standard HTTP. OpenAI platform features such as hosted web search and file search stay on OpenAI's platform; changing the base URL does not bring them along.

Troubleshooting

SymptomFix
Key variable is missingStart Codex from a terminal that has PFL_API_KEY set.
Codex asks you to sign inCheck that you passed --profile promptsforless and that requires_openai_auth = false.
Unknown modelUse the exact model ID from the catalog.
Provider settings are ignoredMove them from the project .codex/config.toml to ~/.codex/config.toml.

See the quickstart for direct HTTP checks and models for prices.

On this page