Add BroadNet Inference to Dify with the OpenAI-API-compatible plugin
Updated
In Dify, install the OpenAI-API-compatible plugin from Integrations, Model Provider, then click Add Model. Choose type LLM, enter a BroadNet model ID such as broadnet/glm-5.3, your BroadNet key and API Base URL https://inference.broadnet.ai/v1. Set Completion mode to Chat, the real context size, an output limit with room for reasoning, and Tool Call only for GLM 5.3 or Qwen3.8 27B.
Dify is an open-source platform for building LLM apps and workflows. Providers that Dify doesn’t list by name are added through the OpenAI-API-compatible model provider plugin, published by Dify’s team (langgenius). BroadNet Inference serves standard chat completions at https://inference.broadnet.ai/v1, so it fits. BroadRouter is BroadNet’s own site; field names below come from version 0.0.83 of the plugin.
Setup
Get a key. Create a pay-as-you-go key in the BroadNet console.
Install the plugin. In Dify, go to Integrations > Model Provider, find OpenAI-API-compatible under the providers you can install (or open it in the Marketplace), and install it. You need to be a workspace owner or admin.
Add a model. Click Add Model on the provider card and fill in:
Field
Value
Model Type
LLM
Model Name
broadnet/glm-5.3
Model display name
GLM 5.3 (BroadNet)
API Key
your BroadNet key
API Base URL
https://inference.broadnet.ai/v1
Completion mode
Chat
Model context size
1048576
Upper bound for max tokens
16000
Function Call Type
Tool Call
Vision Support
Not Support
Structured Output
Support
API Type
Chat Completions API (/chat/completions)
Token parameter name
Use max_tokens
Save. Dify checks the credentials before it adds the model.
Test it. Create a Chatbot app, select GLM 5.3 (BroadNet) in the model picker and send a message in the preview pane.
Repeat Add Model for each BroadNet model you want. The model name must match BroadNet’s ID exactly, including the broadnet/ prefix.
Per-model values
Model Name
Context size
Function Call Type
Vision Support
broadnet/glm-5.3
1048576
Tool Call
Not Support
broadnet/qwen3.8-27b
262144
Tool Call
Support
broadnet/deepseek-v4.1-flash
1048576
Not Support (untested)
Support
broadnet/gemma-4-26b-a4b
32768
Not Support
Support
Why these choices:
Context size defaults to 4,096 in the plugin. Left there, Dify trims memory and retrieved context far below what the model accepts.
Upper bound for max tokens also defaults to 4,096. Three of the models reason before they answer, and the reasoning counts toward this limit, so give them room. 16,000 is our suggestion, not a BroadNet limit.
Token parameter name set to max_tokens matches the field in BroadNet’s API reference. The plugin’s default is to guess from the model name.
API Type stays on Chat Completions. BroadNet doesn’t list the Responses API.
Transcription
The plugin can also add speech-to-text models. BroadNet serves /v1/audio/transcriptions with broadnet/cohere-transcribe-arabic for Arabic and broadnet/cohere-transcribe for 14 languages. The plugin’s README says that for speech-to-text it adds the version path itself, so its example uses the host without /v1 (here, https://inference.broadnet.ai). We have not tested this path through Dify; check it with a short WAV file first. See the Arabic speech-to-text guide.
Troubleshooting
Credential check fails. Check the key, the API Base URL (it ends in /v1 for LLMs) and the model name. Paid models need a top-up; the $5 credit covers only broadnet/gemma-4-26b-a4b and the two Transcribe models.
Empty replies in a workflow. The LLM node’s max tokens is too low for a reasoning model. Raise it. Why answers come back empty.
Agent node never calls tools. Use GLM 5.3 or Qwen3.8 27B with Function Call Type set to Tool Call.
429 under load. A pay-as-you-go key allows 30 requests a minute and 4 in flight. Parallel branches and iteration nodes can exceed that; lower their parallelism. See errors and retries.
Questions
Does BroadNet work on Dify Cloud as well as self-hosted Dify?
Yes. BroadNet Inference is a public HTTPS endpoint, so Dify Cloud can reach it. Dify's docs say only workspace owners and admins can manage model providers, and a key you add works across the whole workspace.
Should the API Base URL include /v1?
Yes, for LLM models. The plugin's own examples use a base URL ending in /v1 for chat models, and its README warns that for some other model types it adds the version path itself.
Which Function Call Type should I pick?
Tool Call for GLM 5.3 and Qwen3.8 27B, which BroadNet lists with tools. Choose Not Support for DeepSeek V4.1 Flash unless you have tested tool calls on it yourself.
Do Dify AI credits apply to BroadNet models?
No. Dify's docs say AI credits don't apply to providers you run on your own account. BroadNet bills the key you enter.