Alibaba Provider
Provider name: alibaba
What It Does #
Alibaba is currently the image-generation provider used by
util_generate_image.
You give the Discord MCP a prompt, Alibaba generates one image, and the Discord MCP returns a usable URL. If an image uploader is also configured, the Discord MCP may reupload the result instead of returning Alibaba's URL directly.
Typical Use Case #
Use Alibaba when you want an MCP client to:
- generate one image from text
- receive a URL instead of raw binary data
- keep provider choice outside of the model prompt
What It Usually Needs #
At minimum, Alibaba needs:
- a token
- a model name
In practice, a common setup is:
- global default model configured once by the operator
- per-app token configured only for the applications that should be allowed to generate images
- optional request-time model override through
X-Image-Model - optional request-time size through the tool argument
size
If the required configuration is missing, util_generate_image is hidden and
cannot be used.
Alibaba support is intentionally restricted to models matching:
^qwen-image-2\.0(?:-pro)?$
If the effective model does not match that pattern, the Discord MCP hides the tool and rejects calls.
What You Can Configure #
Provider fields:
token(required)model(required)
Provider selection settings that can point to alibaba:
image_apidefault_image_api
Request-time override:
X-Image-Model
Practical meaning:
- use
image_api/default_image_apito choose Alibaba as the image generator - use
tokenso the Discord MCP can authenticate upstream - use
modelas the normal default model - use
X-Image-Modelonly when you intentionally want to override that model for one request - use
sizeonly when you want to request a specific output size for one call
Request-time size support:
- Format:
WxH - Supported range: each value must be between
512and2048 - Examples:
1024x10241024x15362048x2048
If size is omitted, Alibaba uses its normal upstream default behavior.
Output Shape #
Alibaba may return:
- a direct image URL
- base64 image data
- a data URL
The Discord MCP handles those cases for you and always tries to end up with a simple URL in the tool response.
Related Tools #
Related Settings #
tokenmodelimage_apidefault_image_api
You do not need to know the internal storage layout to use the service, but the operator or app owner must configure the provider before it becomes available.