Connect ChatGPT
On the Connect and Pro plans, you can link a ChatGPT account. Interviews, style builds and the face’s side of a benchmark then run on your ChatGPT plan where the model allows it, so that work costs you no API credits. So does a Codex-eligible downstream model on chat at/v1/responses (codex_eligible: true in GET /v1/models).
Choices, and the steering of chat and
decisions, are not affected: they are billed from your plan’s
allowance, then from credits, whether or not ChatGPT is linked.
Link a ChatGPT account
Linking uses a device code: you get a short code, the user enters it at OpenAI in any browser, and approves. No browser extension and no callback URL are needed. Linking, listing and unlinking take a signed-in session: an API key answers403.
Step 1: start
user_code and verification_uri, exactly as returned. Keep device_auth_id
for polling. The code expires at expires_at, after 15 minutes.
First-time setup. ChatGPT requires device codes to be enabled once per account. Ask
users to open chatgpt.com/#settings/Security
(the panel can take a few seconds to appear) and turn on “Enable device code
authorization for Codex” before they approve. On Team, Business and Enterprise
workspaces, a workspace admin must turn it on.
Step 2: the user approves
The user opensverification_uri, enters user_code, signs in to ChatGPT, and approves.
Step 3: poll until complete
interval seconds:
Cancel
204, even if the code is already gone. Call it when the user gives up.
Errors on start
See the linked account
account_email and chatgpt_plan_type. A
chatgpt_plan_type of null or "free" is a ChatGPT plan that cannot be used this way.
Unlink
204 No Content, whether or not an account was linked.
When ChatGPT is unavailable
On Connect and Pro subscriptions, theapi_fallback preference is false by default: if ChatGPT is
unavailable or refuses the request, it fails rather than being paid from credits. Turn it on
to fall back to credits:
"interviewer_billing_source": "oauth" on an interview, or oauth_only on a
style build, refuses to fall back, whatever the preference says. A request parameter wins
over the stored preference.
On Free there is no ChatGPT route: api_fallback is always true, and setting it to false
is a 422 oauth_only_unavailable. Nothing is charged.
Errors when ChatGPT refuses
When ChatGPT refuses and fallback is off, the error is underdetail:
A reply that stops partway
ChatGPT sometimes ends a reply without finishing it. Faces retries once. If the second try also stops short,api_fallback decides:
- on: the work is paid from credits, like any other fallback;
- off:
503 oauth_incomplete, and nothing is charged.
oauth_only never falls back: it retries, then fails.
Staying linked
The link renews itself before it expires, so a request after a quiet spell does not fail. If renewal fails, link the account again.Interviews
Interview threads use the linked ChatGPT plan automatically on Connect and Pro. Theinterviewer_billing_source field in each
response says which was used: "oauth" or
"credits".
If the interviewer model is not one ChatGPT serves, an interview on the oauth route is a
422 with "error": "oauth_rejected" and "fallback_available": false, before anything is
sent. It is never moved to your credits.
An interview with interviewer_billing_source: "credits" is not affected.