Use SteadyRouter with Dify
In Dify, add SteadyRouter models through the OpenAI-API-compatible model provider. For Claude models, you can use the Anthropic provider instead, so Claude features such as prompt caching and extended thinking work the way they do with Anthropic's API. Both use the same SteadyRouter key.
Before you start
- Create a SteadyRouter account.
- In the console, open API Keys and copy your key. New accounts come with one called Default Key, on Lowest price (see below). To make another, click Create API Key. Keep Smart routing on: if a group fails, the request is retried in the next group within the same call. A new key starts on Auto, or on Lowest price if your balance is under US$1.
- Find the model names you want on Model Square, for example
gpt-5-mini.
Add models with OpenAI-API-compatible
- In Dify, open Settings → Model Provider. If OpenAI-API-compatible isn't listed, install it from the Dify Marketplace.
- On the OpenAI-API-compatible card, add a model. Dify adds models one at a time:
Field Value Model type LLM Model Name the name from Model Square, for example gpt-5-miniModel display name optional API Key your SteadyRouter key API Base URL https://api.steadyrouter.com/v1Completion mode Chat Model context size the model's context window, from the model developer's docs Upper bound for max tokens the model's maximum output Function Call Type Tool Call, if the model supports tools and you use agents or tool nodes Vision Support Support, if the model accepts images - Save. Repeat for each model you want.
Claude models with the Anthropic provider
- In Settings → Model Provider, install the Anthropic provider if it isn't listed.
- API Key: your SteadyRouter key.
- API URL:
URL
https://api.steadyrouter.com - Save, then pick a Claude model such as
claude-haiku-5-5in your app. To use one that isn't listed, such asclaude-sonnet-5-5, add it on the Anthropic card with Add Model, using its model name.
Trying it on a small balance
New accounts currently start with US$0.05 of credit. Before each request, the gateway reserves balance based on the input plus the maximum output the request asks for (the Max Tokens setting of the model in your app). To make a small balance last:
- Use Lowest price under Smart routing on your API key. Default Key is already on it; for another key, choose it when you create the key or later by editing it.
- Start with a smaller model, and keep Max Tokens in your app modest (8192 or less). On Lowest price, a request to
claude-haiku-5-5orgpt-5-minicosts a small fraction of the same request to larger models such asclaude-sonnet-5-5,gpt-5.5orclaude-opus-5-5.
Once you've confirmed everything works, add funds, and switch the key back to Auto if you prefer.
Lowest price often puts Pool groups first: usually cheaper, sometimes less stable. In every smart routing mode, Pool and Mixed groups can be used, so for stability-critical work, turn smart routing off and list only cloud or API groups on the key. See Models and groups.
If something goes wrong
| What you see | What to do |
|---|---|
| The model won't save, or returns 404 | Check the API Base URL: https://api.steadyrouter.com/v1 for OpenAI-API-compatible, https://api.steadyrouter.com for Anthropic. |
401 Invalid token | The key is wrong, disabled, expired or out of its spending cap. Check it under API Keys. |
403 insufficient_user_quota | Your balance can't cover the request. Top up, or follow the small-balance steps above. |
503 model_not_found | The Model Name is wrong, or the groups your key uses don't offer it. Check the name on Model Square. |
| 408, 504 or 524 | An upstream timeout. These are not moved to another group automatically, so add a retry to the node. |
Every error message ends with a request id. Include it when you email support@steadyrouter.com.
More: API docs · Model Square