# Codex — External Subscription Connect your own ChatGPT/Codex subscription and route OpenAI **Responses** calls through it. The LLM cost lands on your ChatGPT subscription, not your Cohesivity wallet — Cohesivity meters the request at **$0**. (Same idea as Capy's "external subscriptions".) **Claimed accounts only.** Connecting is agent-mediated via OpenAI's official device-code flow — no Cohesivity UI, no key to paste. ## Not provisioned via /api/resources Codex is an account-level *connection*, not a per-tenant resource. Do not call `POST https://cohesivity.ai/api/resources/codex` — connect it instead: ## Connect 1. `POST https://cohesivity.ai/api/codex/connect` with `Authorization: Bearer ` (claimed tenant) → `{ user_code, verification_uri, security_settings_url, wait }`. 2. Tell the human: turn on **Allow device code login** in ChatGPT → Settings → Security (`security_settings_url`), open `verification_uri`, enter `user_code`, and approve. 3. Poll `GET https://cohesivity.ai/api/wait` with the returned `wait` blob (or run its bash one-liner) until `{ "status": "completed" }`. ## Use `POST https://cohesivity.ai/edge/codex/responses` (or `/edge/codex/v1/responses`) with `?key=` or an edge-session token; body is the OpenAI Responses request `{ model, input, ... }`. Eligible models: the GPT-5.x Codex family included in your ChatGPT plan. Embeddings/images are not on this surface. ## Status & disconnect - `GET https://cohesivity.ai/api/codex` → `{ connected, status, eligible_models, fallback_to_wallet }` - `POST https://cohesivity.ai/api/codex/disconnect` → revokes the stored credentials ## Billing Subscription-routed calls cost $0 against your Cohesivity wallet (your ChatGPT plan's own limits apply). If the subscription is unavailable and you enabled wallet fallback, the call falls through to the wallet-billed `openai-api` offering; otherwise it returns `402 external_subscription_unavailable`.