Dify
Add OneRouter as an OpenAI-API-compatible model provider in Dify.
Prepare the connection
Create a dedicated OneRouter API key, then choose a complete model ID from the Models page or GET /v1/models. Keep the key in an environment variable or the application's protected credential store.
curl https://onerouter.com/v1/models \
-H "Authorization: Bearer YOUR_API_KEY"Configuration
Provider type: OpenAI-API-compatible
API Base URL: https://onerouter.com/v1
API Key: YOUR_API_KEY
Model name: openai/gpt-5.2Verify
Save the configuration, fully restart the app or terminal session, and select the saved OneRouter provider. Send a small test request such as Reply with OK only, then confirm it appears in OneRouter usage logs before enabling tools, file access, or production traffic.
Troubleshooting
| Symptom | How to fix it |
|---|---|
| 401 | Re-enter the complete key and confirm the restarted process can read it. |
| 403 | Confirm the key can access the requested model. |
| 404 | Use https://onerouter.com/v1 as the OpenAI-compatible base URL; do not append a request path unless the client asks for a full endpoint. |
| Model not found | Use the complete ID returned by GET /v1/models, including the provider prefix. |
| Saved settings have no effect | Restart the whole application and check whether workspace-level settings override the user configuration. |