Bring Your Own Models
Bring Your Own Models lets you run Railway's AI features on a model account you already have. Sign in with your ChatGPT subscription or your OpenRouter account, pick a model, and the Railway Agent uses it everywhere it runs:
- Railway Agent chat in the dashboard
- The Railway Agent harness on cloud agents
- Apps you build on dev.new
- The Slack and Discord bots
Requests on your own account are billed by that provider, not by Railway. Railway models stay available alongside yours, so you can switch between them at any time.
Providers
Railway supports two sign-in providers. Each one has its own Priority Boarding flag, so you can enable either or both.
| Provider | What you connect | Priority Boarding flag |
|---|---|---|
| ChatGPT | Your ChatGPT subscription | Bring Your Own Subscription: ChatGPT |
| OpenRouter | Your OpenRouter account | Bring Your Own Models: OpenRouter |
ChatGPT
Signing in with ChatGPT connects your ChatGPT subscription. 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.
OpenRouter
Signing in with OpenRouter gives Railway access to models from several vendors through one account, including OpenAI, Anthropic, xAI, Z.ai, and Moonshot AI. OpenRouter bills the requests to your OpenRouter credits.
Signing in creates an API key labeled Railway Agents in your OpenRouter account. Railway stores it encrypted and shows only its last four characters. The key is saved for the workspace you connected it in, so connect OpenRouter again in each workspace where you want to use it.
Get started
Turning on a provider takes three steps: enable the flag, sign in, and choose a default model.
1. Enable the flag
Open the Feature Flags page and turn on Bring Your Own Subscription: ChatGPT, Bring Your Own Models: OpenRouter, or both.
2. Sign in
- Navigate to Account Settings, then Agents, with the workspace you want to configure selected.
- Find the Providers section under Models.
- Click Connect on the provider you want.
The sign-in flow differs by provider.
For ChatGPT, Railway shows an activation code. Click Continue to ChatGPT, enter the code, and approve the connection. The card changes to Connected as your ChatGPT email once you approve.
For OpenRouter, Railway opens openrouter.ai in a popup. Approve the connection there, and the card changes to Connected with the key's last four characters.
3. Choose a default model
Select a model from Default Model on the same page. The list groups models by account: Railway, OpenAI Subscription, and OpenRouter API Key.
The default model applies to Railway Agent chat, the Slack and Discord bots, and the cloud agents and dev.new apps you own in the selected workspace. The model picker in chat overrides it for a single message.
Where your models run
Signing in makes your models available on every surface that runs the Railway Agent. A few rules decide which account a request uses.
Dashboard chat and chat bots
Railway Agent chat uses your default model unless you pick another one in the chat's model picker. The Slack and Discord bots use the default model of the person who mentioned @Railway.
Cloud agents and dev.new
Cloud agents running the Railway Agent harness, and apps on dev.new, use their owner's model settings and credentials. That holds even when another workspace member uses the agent or app, so a teammate's prompts to your agent run on your account.
Inside a cloud agent, your models appear in the harness's model list, labeled (ChatGPT) or (Personal key).
The harness talks to each provider over a specific API, which limits the OpenRouter models it can run. OpenRouter's OpenAI and Anthropic models are available in dashboard chat and the bots but not in cloud agents. To use GPT or Claude models in a cloud agent, use ChatGPT sign-in or a Railway model.
Available models
The model list in Default Model is the authoritative list for your account. Railway curates the models offered for each provider:
| Provider | Models |
|---|---|
| ChatGPT | GPT-6 Astra, GPT-6.1 Sol, GPT-6 Luna |
| OpenRouter | GPT-6 Astra, GPT-6.1 Sol, GPT-6 Luna, Claude Opus 5.5, Claude Sonnet 5.5, Grok 4.7, Muse Spark 1.3, GLM 5.3, Kimi K3 |
Reasoning level is set under Default Reasoning Level when the selected model supports it.
Billing
Railway doesn't charge for tokens processed on your own account. ChatGPT requests count against your ChatGPT plan, and OpenRouter requests are paid from your OpenRouter credits.
Railway models keep their standard pricing, so switching back to a Railway model resumes Railway billing for those requests.
Disconnect a provider
Click Disconnect on the provider's card. The effects differ by provider.
- Disconnecting ChatGPT removes the connection from every workspace and resets any default model that used it to the Railway default.
- Disconnecting OpenRouter removes the key from this workspace only. The key stays active in your OpenRouter account until you delete it at openrouter.ai/settings/keys.
Troubleshooting
Most problems show up as a status line on the provider's card in Agents settings, so start there.