Using BeatAPI in Dify
Using BeatAPI in Dify
Dify is an LLMOps platform for building chat apps, agents, and workflows. BeatAPI is added as a model provider once and is then selectable on every app in the workspace.
Prerequisites
- A Dify workspace — the cloud service or a self-hosted deployment.
- A BeatAPI API key — create one in Dashboard → API Keys.
Step 1: Open model settings
Click your avatar at the top right, choose Settings, then Model Provider in the left menu.
Step 2: Add BeatAPI
Two routes reach the same result. The first is faster; the second keeps BeatAPI separate from any other provider you use.
Option A: Reuse the OpenAI provider
- Find the OpenAI provider and click Configure.
- Fill in:
- Save, then enable the models you intend to use in the model list.
Dify’s OpenAI model list is Dify’s own; it is not read from the endpoint. Enabling a model that BeatAPI does not serve produces a not_found at run time, inside whatever app you built on it. Enable only IDs from the table below or from the pricing page.
Option B: Add a custom model provider
- Scroll to Custom Model and click + Add Model.
- Fill in:
Repeat for each model you want available. This route is more typing but the list only ever contains models that actually work.
Step 3: Models
Full details are on the Text API pages; rates on the pricing page.
A few models change rate with load or context length: the DeepSeek family doubles on weekday peak hours in Beijing time, Hunyuan hy3 has its own daily peak window, and the GPT-5.6 and Grok families bill a higher tier past a context threshold. A Dify workflow that runs on a schedule can sit entirely inside a peak window without anyone noticing. See the pricing page footnotes.
Step 4: Build and publish
- Create an app — Chatbot, Text Generator, Agent, or Workflow.
- In Model Settings, select the BeatAPI model.
- Write the system prompt, using
{{variable}}for user input and{{context}}for knowledge-base content. - Test in the preview panel, then Publish — as an API, an embed, or a shared link.
Parameters worth setting
FAQ
Dify cannot connect
- Base URL must be
https://api.beatapi.io/v1— with/v1, no trailing slash. - Confirm the key is active in Dashboard → API Keys.
- Self-hosted deployments: confirm the Dify server can reach
api.beatapi.io, not just your browser.
A model fails only at run time
It was enabled in Dify’s list but is not served by the account. Cross-check the ID against the pricing page.
402 insufficient_credits
The balance is exhausted. Add credits from the dashboard. A published app fails for its users while the balance is empty, so this is worth alerting on.
429 rate_limit_exceeded
The key exceeded its request rate — likely from a workflow fanning out. Reduce concurrency in the workflow, or raise the allowance; the per-minute rate rises with lifetime top-ups and is shown on the dashboard.
Controlling spend
- Give each app its own BeatAPI key so
by_api_keyinGET /v1/usageattributes cost per app. - Route cheap steps — classification, routing, extraction — to a cheap model and reserve the strong model for the final answer.
- Cap Max Tokens on every node; workflow nodes inherit generous defaults.
Support
Open a support ticket from the dashboard and include the request_id from the failing response.

