Connect Dify to byesu API
Connect Dify (Cloud or self-hosted Community Edition) to byesu so your RAG pipelines, Chatflows, and Agent workflows can call Claude, GPT, Gemini, DeepSeek, and Grok models with a single pay-as-you-go API key.
Quick configuration
- OpenAI-API-compatible Endpoint URL:
https://byesu.com/v1(all vendors under one plugin) - Anthropic Plugin API URL:
https://byesu.com(native/v1/messages+0.1xPrompt Caching) - API Key: your byesu token (
sk-..., created in the defaultautogroup) - Recommended models:
claude-sonnet-5-5,claude-opus-5-5,gpt-6.2-sol,deepseek-v4-pro,gemini-4-argon
Option 1: OpenAI-API-compatible Plugin (All Models)
Use Dify's OpenAI-API-compatible plugin when you want to register Claude, GPT, Gemini, DeepSeek, and Grok models side by side with one credential shape.
- Create an
sk-...token in the byesu Console under the defaultautogroup (see Choosing a Group). - In Dify, open Settings → Model Providers, search the Marketplace for OpenAI-API-compatible, and install it.
- Click Add Model under OpenAI-API-compatible and configure:
- Model Type:
LLM - Model Name: exact model ID from the console, e.g.
claude-sonnet-5-5,deepseek-v4-pro, orgpt-6.2-sol - API Key: your
sk-...token - API Endpoint URL:text
https://byesu.com/v1 - Model Context Size:
1000000(or match the target model window) - Upper Bound for Max Tokens:
64000 - Function Calling:
Tool Call - Stream Mode: Enabled
- Model Type:
- Click Save, then click Add Model again for additional models (
claude-opus-5-5,claude-haiku-5-5,gpt-6.2-astra,gpt-6.1-sol,gemini-4-argon,gemini-3.8-flash,deepseek-v4.1-flash,grok-4.7).
Option 2: Anthropic Plugin (Native /v1/messages & 0.1x Caching)
If your Dify workflows rely heavily on Claude models with large system instructions or RAG context blocks, you can also install the Anthropic model provider plugin:
- Go to Settings → Model Providers → Anthropic → Setup.
- Paste your
sk-...token into API Key. - Set API URL to:text(Do not append
https://byesu.com/v1/messages— the Anthropic plugin appends the path automatically.) - Save to unlock native Anthropic Messages routing, including prompt cache reads billed as low as
0.1xon repeated prefixes (see Prompt Caching).
Production Engineering Notes
- Reasoning model timeouts in Agent & Workflow nodes: Deep-thinking models (
gpt-6.2-sol,claude-opus-5-5,deepseek-v4-pro) spend extra seconds reasoning before emitting final output. Keep Streaming enabled on LLM nodes, and on self-hosted Dify deployments increaseAPI_TOOL_DEFAULT_TIMEOUTand workflow node timeouts to ≥ 120s (for exampleAPI_TOOL_DEFAULT_TIMEOUT=180andTEXT_GENERATION_TIMEOUT_MS=180000in.env) so p95 thinking latency never triggers a premature timeout. - Dedicated model groups: The
autogroup covers Claude, GPT, Gemini, DeepSeek, and Grok. To callglm-5.3,kimi-k3, or image generation models (gpt-image-2,gemini-3.1-flash-image-ultra), create separate tokens in theGlm,Kimi, ormediagroup. - Pay-as-you-go billing: Usage is billed per token with no monthly subscription; live per-model rates are displayed in the byesu Console after sign-in.
Troubleshooting & Benchmarks
- 401 invalid_api_key / authentication_error: confirm
https://byesu.com/v1is used for OpenAI-API-compatible andhttps://byesu.comfor Anthropic (OpenAI 401 fix, Claude 401 fix). - 404 / no available channel: verify the Model Name matches the console model ID character for character and matches your token's group (no available channel).
- Workflow node timeout or dropped stream: enable streaming and raise Dify / reverse-proxy read timeouts ≥ 120s (Anthropic timeout, streaming connection dropped).
- 429 / latency data: see OpenAI 429 rate limit vs quota and live production benchmarks.