---
title: ChatGPT
description: Sign in with your ChatGPT subscription to run the Railway Agent, cloud agents, dev.new, and the Slack and Discord bots on your ChatGPT plan.
---
Signing in with ChatGPT connects your ChatGPT subscription to Railway's AI features. Requests count against your ChatGPT plan's usage limits instead of producing a Railway bill.

The connection belongs to your Railway account, so one sign-in covers every workspace you're a member of. For how models are chosen across Railway, see [Bring Your Own Models](/ai/bring-your-own-models).

## Connect ChatGPT

Railway connects to ChatGPT with an activation code, so you approve the connection on ChatGPT's own site.

1. Navigate to <a href="https://railway.com/account/agents" target="_blank">Account Settings, then **Agents**</a>.
2. Find the **OpenAI Subscription** card in the **Providers** section.
3. Click **Connect**. Railway shows an activation code.
4. Click **Continue to ChatGPT**, enter the code, and approve the connection.

Once you approve, your ChatGPT email appears in the strip at the bottom of the card. Your ChatGPT models then appear under **OpenAI Subscription** in **Default Model**.

## Disconnect ChatGPT

Click **Disconnect** on the **OpenAI Subscription** card. Disconnecting removes the connection from every workspace and resets any default model that used it to the Railway default.

## Troubleshooting

Most ChatGPT problems show up as a status line on the **OpenAI Subscription** card.

<Collapse title="ChatGPT sign-in fails to start">
Device code login is disabled for your ChatGPT account or workspace. Enable it in ChatGPT's security settings, or ask your ChatGPT workspace admin to allow it, then click **Connect** again.
</Collapse>

<Collapse title="The ChatGPT card says authentication expired">
OpenAI ended the session. Click **Re-Authenticate** and approve the new activation code. Requests on the subscription fail until you do.
</Collapse>