Chat models plus image and video generation through APIMaster or any OpenAI-compatible gateway.
A Dify plugin that adds two things the built-in OpenAI-compatible provider cannot do on
its own:
Works against any other OpenAI-compatible gateway too: change the Base URL.
Source code: https://github.com/apimaster-ai/dify-plugin-apimaster
From the Dify marketplace, search for APIMaster.
To install from source:
Settings → Model Provider → APIMaster
Press Save. Unlike the generic OpenAI-compatible provider, this one calls
before accepting the credential, so a wrong key or a Base URL missing its fails
immediately with a readable message instead of surfacing later inside a workflow run.
For the media tools, configure the same credential under Tools → APIMaster Media.
Four models ship predefined: , , ,
. Every id was verified against , and context sizes and
capabilities come from the models.dev canonical entries. deliberately has no
temperature slider: the model does not accept one.
The catalog changes, so the provider also supports customizable models: add any id
the endpoint serves through Add Model. List what is available with:
Max output tokens. Most models on this gateway are reasoning models: they spend part
of the token budget on hidden reasoning before emitting any visible text. Measured on one
model, a 64-token budget was consumed 59 tokens by reasoning and the answer came back
empty; at 256 it answered correctly. If a model returns nothing, raise this before
assuming it is broken.
Text-to-image, image-to-image (comma-separated reference URLs) and inpainting (mask URL).
Aspect ratio and 1K/2K/4K resolution.
Turn on "Submit and poll" for 2K and 4K. A single synchronous request at those sizes
can exceed the gateway's own timeout and return a 408; async mode submits the job and
polls instead.
The tool emits the image three ways: as a file (so it survives the URL expiring), as a
link, and as JSON with all the URLs — use whichever your workflow needs.
Text-to-video and image-to-video. 4–20 seconds, 720p (higher tiers depend on the model),
landscape or portrait. Submits, polls, and returns the MP4 as a file.
Video is slow, and Dify has a time limit. took about 15 minutes for a
4-second clip, while Dify stops a plugin call after 10 minutes by default
(). So the tool waits about 8.5 minutes; if the job is
still rendering it returns instead of failing.
Takes that and returns the MP4 once the job has finished, or its status and
progress if not. In a workflow, put it after Generate Video behind a wait or a loop; an
agent can simply call it again later. Nothing is lost if you check back late.
Always set Aspect ratio when you pass a reference image. A portrait reference with no
aspect ratio is treated as 16:9 by the gateway and comes back letterboxed.
Nothing here is vendor-locked. Point the Base URL at any endpoint that implements
, and . The model
dropdowns are suggestions; the customizable-model path takes any id.
The tests parse , the provider, every predefined model and both tools
against the Dify SDK's own pydantic models — the same validation Dify performs when
it loads a plugin. They also assert that every shipped model id is one the gateway really
serves, because a stale id is the most common cause of a "plugin is broken" report.
No Dify instance, no API key and no network access are required to run them.
See PRIVACY.md. The plugin stores nothing and sends data only to the
endpoint you configure.
MIT
Some outbound calls build their address at runtime, so the list may be incomplete.
Last checked 09/30/2026 01:37 PM · version 0.1.0