Skip to main content
Codex builds its own request body, so the deadline goes on an agent key.

Set this up with an agent

Copy the block below into any coding agent. It never asks for your API key: you run the one export line yourself.

Configure Codex

Codex keeps each profile in its own file. This profile leaves your usual Codex setup alone, and you opt in per run with --profile.
  1. Write the profile file. Paste this once:
  1. Export the key Codex reads. The profile file never holds it.
  1. Start Codex with the profile.
That is the whole integration. Codex calls /v1/responses, sends the key as a bearer token, and the key supplies the deadline. The session header names the provider in use, so you can see the profile took. To reach us on every Codex run instead, put the same lines in ~/.codex/config.toml. The top-level model and model_provider there set your default. env_key and auth rule each other out. env_key reads the key from your environment, which is the short path. Keep secrets in a keychain instead and you leave env_key out, then name a helper command in auth. Keep the model line. Codex otherwise defaults to a slug ending in -codex, which we hold no price for and never race. Use the full gpt-5.6-sol, because the bare gpt-5.6 alias makes Codex print a metadata warning.

Troubleshooting

Nothing reaches us at all. You ran a plain codex, which uses your usual provider and account. Start it with --profile flexinference. Any error you saw is theirs, usage limits included, and the session header names the provider in use. 400 model_not_priced_for_managed. model is unset, so the request arrived on a -codex slug we hold no price for. Set model = "gpt-5.6-sol" in the profile. On your own provider key we run that slug instead, with no cost figure of ours. 400 service_tier_not_allowed. The profile sets service_tier, and we read the tier from the deadline instead. Remove the line. Anything not specific to Codex is on agent keys.