Integrations / Dify
Launch and agentsExperimental
Connect Dify applications to Badgr
Use Badgr models in Dify as an OpenAI-compatible provider. Starting GPU jobs from a workflow is a manual API setup.
A setup guide only. Badgr has not tested this path, so expect to adjust it.
Why use Badgr for Dify
- Badgr interface
- AI API
- Where Dify fits
- External app
- Why Badgr
- Model and compute integrations
- Use Badgr models in Dify as an OpenAI-compatible provider.
- A workflow node can start a capped GPU job and read the result later.
- Job starts are idempotent and observable, so a retried workflow does not start the work twice.
What you can do
- Use a Badgr model inside Dify chatbots and workflows
- Call a capped GPU job from a workflow HTTP node
- Poll a job until its result is ready
Quickstart: Dify settings
- In Dify, open Settings, then Model Provider, and add an OpenAI-API-compatible provider.
- Set the API base URL to https://aibadgr.com/v1, paste your Badgr key and add the model badgr-auto.
- For GPU work, add an HTTP Request node to your workflow that calls the Badgr jobs API with a maximum cost in the body.
- Add a second HTTP Request node in a loop to poll the job status until it finishes.
How it works
- 1.Dify runs your workflow
- 2.A node calls Badgr to start a job with a cost cap
- 3.A later node polls for the result
- 4.The workflow uses the output
What you get
- Model replies inside Dify
- Job results your workflow reads from the API
Requirements
- A funded Badgr balance
- A Badgr API key (get one at /get-api-key)
- Admin access to a Dify workspace
What it costs
- The model provider bills you separately for tokens where your own key is used. Badgr does not quote a price for that.
- Every job started from the API needs its own maximum cost. Set it in the request, not in the prompt.
See pricing for how billing works.
Proof
No tested run is recorded for this integration yet. A receipt and example output will be added here after a real run, not before.
Troubleshooting
Provider fails to save
Check the base URL has /v1 and the key is a Badgr key. Add the model name by hand.
Workflow times out waiting
Do not wait inside one node. Start the job, then poll in a loop with a delay.
Request shape unclear
The jobs API is documented in the compute API reference. Start there for the exact request shape and base URL.
Developer reference
Ready to start with Dify?
Every run or service has a spending limit you set before it starts.