Server Configuration
Describes the environment variables required to run the server.
Name | Required | Description | Default |
---|---|---|---|
GOOGLE_MODEL | No | Model to use with Google provider (only for Google provider, defaults to 'gemini') | gemini |
ZHIPU_API_KEY | No | API key for ZhipuAI | |
GEMINI_API_KEY | No | API key for Google (Gemini/Imagen) | |
IMAGE_PROVIDER | Yes | Choose between Google (Imagen/Gemini), ZhipuAI, or Bailian | |
DASHSCOPE_API_KEY | No | API key for Alibaba Bailian | |
OUTPUT_IMAGE_PATH | No | Directory to save generated images (optional) |
Schema
Prompts
Interactive templates invoked by user choice
Name | Description |
---|---|
No prompts |
Resources
Contextual data attached and managed by the client
Name | Description |
---|---|
No resources |
Tools
Functions exposed to the LLM to take actions
Name | Description |
---|---|
generate_image_from_text | Generate an image based on the given text prompt using the configured image provider. Args:
prompt: User's text prompt describing the desired image to generate
model_type: Optional model type for Google provider ("gemini" or "imagen").
If not specified, uses the default from GOOGLE_MODEL env var.
Returns:
Path to the generated image file using the configured provider's image generation capabilities |
transform_image_from_encoded | Transform an existing image based on the given text prompt using the configured image provider. Args:
encoded_image: Base64 encoded image data with header. Must be in format:
"data:image/[format];base64,[data]"
Where [format] can be: png, jpeg, jpg, gif, webp, etc.
prompt: Text prompt describing the desired transformation or modifications
Returns:
Path to the transformed image file saved on the server
|
transform_image_from_url | Transform an existing image from a URL using the configured image provider. Args:
image_url: Remote or Public URL of the image to be transformed
prompt: Text prompt describing the desired transformation or modifications
function: WanX editing function (default: 'description_edit'). Supported functions:
'description_edit', 'description_edit_with_mask', 'stylization_all',
'stylization_local', 'remove_watermark', 'expand', 'super_resolution',
'colorization', 'doodle', 'control_cartoon_feature'
mask_image_url: URL of mask image (required for 'description_edit_with_mask')
Returns:
Details about the transformed image including local path and remote URL
|
transform_image_from_file | Transform an existing image file based on the given text prompt using the configured image provider. Args:
image_file_path: Path to the image file to be transformed
prompt: Text prompt describing the desired transformation or modifications
Returns:
Path to the transformed image file saved on the server
|