Using BeatAPI in Dify
To use BeatAPI in Dify, add BeatAPI as a model provider under Settings → Model Provider with the base URL https://api.beatapi.io/v1; every app in the workspace can then select BeatAPI models. Dify is an LLMOps platform for building chat apps, agents, and workflows.
The model-provider setup on this page is separate from the BeatAPI tool plugin in Dify Marketplace. The Marketplace currently lists v0.1.0 with two music-video tools. The expanded v0.2.1 plugin is in Marketplace review; until the review completes, the Marketplace offers v0.1.0.
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
Option A and Option B reach the same result. Option A is faster; Option B 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; Dify does not read the list from the endpoint. Enabling a model that BeatAPI does not serve produces a not_found at run time, inside every app built on that model. Enable only IDs from the table in Step 3 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. Option B takes more typing, but the list then contains only models that BeatAPI serves.
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 two DeepSeek HC (high-cache) models double on weekdays 09:00–12:00 and 14:00–18:00 Beijing time (the regular paid DeepSeek models bill one rate at all hours), Hunyuan hy3 has its own daily peak window, GPT-6 Astra and the GPT-5.6 family have a higher tier above 272K input tokens, and Grok has a higher tier above 200K. 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
The model was enabled in Dify’s list but is not served by the account. Cross-check the ID against the pricing page.
402 insufficient_credits
Insufficient balance: the balance is zero or below the price of the request. Top up from the dashboard. A published app fails for its users while the balance is empty, so set an alert on 402 responses.
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.
For a workflow that calls the data API, build a source-linked research brief in Dify. The Dify research guide shows what to pass into the HTTP nodes and which fields to keep for citation.

