Connect Dify to Gonka Broker
Dify is an open-source platform for building LLM apps — visual agents, workflows, and RAG. It reaches Gonka Broker through Dify’s OpenAI-compatible model layer, so your agents and workflows run on open-source models like MiniMax M2 and Kimi K2 with predictable USD pricing and no crypto.
Prerequisites
Section titled “Prerequisites”- A Gonka API key (starts with
gnk-prx-). See Create a Gonka API Key. - A Dify workspace — Dify Cloud or a self-hosted instance.
Use the dedicated plugin (recommended)
The Gonka Broker model plugin in the Dify Marketplace adds Gonka Broker as a provider with the endpoint built in — you only supply your key and a model id, no base URL to configure.
- In Dify, open Plugins → Marketplace, search for Gonka Broker, and install it.
- Go to Settings → Model Provider → Gonka Broker and click Add Model.
- Fill in:
- Model Name — a Gonka-supported model id, e.g.
MiniMaxAI/MiniMax-M2.7 - API Key — your
gnk-prx-…key - Model context size — defaults to
131072; adjust to the model you use.
- Model Name — a Gonka-supported model id, e.g.
- Save. The model is now available across your apps, agents, and workflows.
The base URL (https://proxy.gonkabroker.com/v1) is built into the plugin — you never enter an endpoint.
Use the OpenAI-compatible config
Section titled “Use the OpenAI-compatible config”This works on any Dify instance, no dedicated plugin required. Dify ships an OpenAI-API-compatible model provider that talks to any OpenAI-compatible endpoint.
- In Dify, open Plugins → Marketplace and install OpenAI-API-compatible (by langgenius) if it isn’t already present.
- Go to Settings → Model Provider → OpenAI-API-compatible and click Add Model.
- Fill in:
- Model Name — a Gonka-supported model id, e.g.
MiniMaxAI/MiniMax-M2.7 - API Key — your
gnk-prx-…key - API endpoint URL —
https://proxy.gonkabroker.com/v1 - Completion mode — Chat
- Model context size — e.g.
131072
- Model Name — a Gonka-supported model id, e.g.
- Save. Add one entry per model you want to use.
Model Name must match a Gonka-supported model id (see Supported Models).
Build agents and workflows
Section titled “Build agents and workflows”Once the model is added, pick it in any Dify app — Chatflow, Workflow, Agent, or Chatbot — from the model selector. Tool calling and structured output work through the OpenAI-compatible transport, so agent nodes and function calls run unchanged. Because Gonka pricing is locked at top-up, token-hungry agent loops stay predictable.
Verify
Section titled “Verify”Create a simple Chatbot app, select your Gonka model, and send a message. A reply confirms the connection. If the model doesn’t appear in the selector, re-open Settings → Model Provider and confirm the model was saved without an error.
Troubleshooting
Section titled “Troubleshooting”- 401 / invalid API key — wrong or paused key. Check it in your Gonka dashboard.
- Model not found / unsupported — the Model Name must match a supported model id exactly.
- Connection error (manual config) — confirm the API endpoint URL is
https://proxy.gonkabroker.com/v1and Completion mode is Chat.