# What Is Codex Hosted? ProxyLLM's Main Feature, Explained

Codex Hosted runs OpenAI's official Codex CLI on our servers, signed in with your ChatGPT account, and exposes it as an OpenAI-compatible endpoint billed to your flat plan.

*Published 2026-06-12 · https://proxyllm.ai/blog/what-is-codex-hosted*

Codex Hosted is ProxyLLM's main feature, and it fits in one sentence: we run OpenAI's official, unmodified Codex CLI on managed servers, signed in with your own ChatGPT account, and expose it to your software as a standard OpenAI-compatible endpoint. Your apps call one URL exactly as they would call the OpenAI API. The work runs as Codex usage and bills to your flat ChatGPT subscription instead of the per-token meter.

That is the definition. The rest of this page covers the gap it closes, how a request actually travels, the cost shape, and what the feature deliberately is not.

## The gap it closes

OpenAI prices the same intelligence two ways. The API meters every token: more requests, more agent steps, more retries, more dollars, with no ceiling. ChatGPT plans are flat: a fixed monthly price with usage limits that reset on rolling windows.

For years there was no bridge between the two, so anything programmatic paid the meter. Codex changed that. It is included in ChatGPT plans, OpenAI recommends ChatGPT sign-in for the CLI (github.com/openai/codex), and `codex exec` is the CLI's documented non-interactive mode for scripts and CI. A subscription can now do programmatic work.

What a subscription cannot do on its own is behave like infrastructure. Someone has to keep a machine up, refresh the session, queue concurrent requests, watch the usage window, and log what ran. Codex Hosted is that operations layer, run for you. The full background lives in [can you use your ChatGPT subscription as an API?](/blog/can-you-use-your-chatgpt-subscription-as-an-api)

## How a request flows

The path from your code to OpenAI and back, in plain text:

```text
your app
  |   POST /v1/chat/completions, authenticated with your ProxyLLM key
  v
ProxyLLM gateway        validates the key, queues the job, writes the request log
  |
  v
your container          one per ChatGPT account, isolated, never shared
  |
  v
codex exec              the official CLI, running under your ChatGPT session
  |
  v
OpenAI                  the work bills to your flat plan, not a token meter
  |
  v
complete response       returned to your app as a standard OpenAI-style payload
```

Three details in that diagram do the heavy lifting. The gateway speaks the OpenAI API shape, so anything that accepts a base URL works without code changes. The container is yours alone: we never pool accounts or route anyone else's traffic through your session. And the response comes back complete rather than streamed, which backend workloads rarely notice and chat UIs should plan around.

When your plan's window is exhausted, the gateway fails over: a second connected ChatGPT account if you have one, then your own OpenAI API key, then back to the subscription lane once the window resets. The request log records which lane served every call, so nothing about the fallback is mysterious.

## What it costs

Two flat charges. OpenAI bills your ChatGPT subscription directly, and we bill $129 per month for the platform, with no markup on inference.

The planning math, using our capacity estimates (estimates, not guarantees; OpenAI tunes plan limits over time):

- A $3,500/month API workload fits a ChatGPT Pro 5x plan, estimated at roughly $3,500 of API-equivalent capacity.
- New monthly cost: $100 (Pro 5x, paid to OpenAI) + $129 (ProxyLLM) .

A $3,500 monthly API bill maps to $100 for the plan plus our flat $129 fee. For small bills the dollar gap narrows: below roughly $150-250 of monthly API spend the fee and the savings roughly cancel, and the reason to switch becomes the meter coming off rather than the bill shrinking, which is what lets you run multi-pass reasoning and eval sweeps without counting calls. The tier-by-tier breakdown is in [OpenAI API vs ChatGPT subscription cost](/blog/openai-api-vs-chatgpt-subscription-cost), and the [calculator](/calculator) runs your own number in thirty seconds.

## Where OpenAI stands

Stated plainly, the way we state it everywhere: `codex exec` and headless device-code sign-in are documented, intended functionality, and Codex usage is included in ChatGPT plans. OpenAI's Terms of Use still govern your account, accounts may not be shared, and OpenAI can restrict accounts at its discretion. Intended functionality, but OpenAI has the final call.

That stance is why the architecture looks the way it does: one account, one container, signed in by you on your own machine, with your password never touching us. The complete reading, sources included, is in [is Codex Hosted against OpenAI's terms?](/blog/is-codex-hosted-against-openai-terms)

## What Codex Hosted is not

Honest boundaries, because this category attracts hype:

- **Not an OpenAI product.** ProxyLLM is independent software with no affiliation, endorsement, or partnership.
- **Not pooled capacity.** Nothing is resold. Your subscription serves your workloads only.
- **Not a streaming API.** The Codex lane returns complete responses. API-key lanes stream.
- **Not the full API surface.** You get the models Codex serves. Embeddings, fine-tunes, and exotic parameters stay on your API key.
- **Not available for Claude.** Anthropic does not permit third-party services to route requests through Claude subscription credentials, so this approach is specific to OpenAI's Codex.

## Getting started

Connect your ChatGPT account (run the login command on your machine, then one connect command), set `OPENAI_BASE_URL` to `https://api.proxyllm.ai/v1` with your ProxyLLM key, and send a request. The whole sequence, with commands for every step, is in the [setup guide](/blog/codex-hosted-setup-guide).

If you take one action from this page, make it the [calculator](/calculator): paste in your current OpenAI bill and it shows what the same work costs flat.
