MCP API Integration Guide · Image
MCP API — Image Generation
Guide to uploading images or generating them via AI with upload_asset and generate_image for use as reference assets in the video pipeline.
Overview
This section covers generating or uploading images via MCP to use as reference assets in the video pipeline. The core tools are upload_asset and generate_image; the returned assetId can be reused in create_clip and other tools.
upload_asset
Takes an external image URL or base64 data and stores it stably in Autoagens Storage. Free.
Parameters
- url — public image URL
- base64Data — or base64 data (data URL supported)
- mimeType — required when base64Data is raw (e.g.
image/png)
Returns
assetId— stable ID starting withmcpa_...publicUrl— Supabase Storage public URLmimeType,width,height
Use Cases
- Bring existing brand logos / product photos into the video pipeline
- Persist externally-generated images as stable public URLs (avoid session URL expiry)
- Pass a character reference image to
characterReferences
generate_image
Gemini-based AI image generation. Supports text-to-image and image-to-image (with reference images). 100 coins.
Parameters
- prompt (required) — image generation prompt (Korean or English)
- referenceImages — array of public URLs (image-to-image)
- referenceAssetIds — array of pre-uploaded assetIds (recommended for reuse)
Returns
Same structure as upload_asset — assetId, publicUrl, mimeType, width, height
Use Cases
- Generate a character master image → reuse the same assetId across multiple create_clip calls (consistency)
- Generate variations while preserving the reference image's style/composition
- Generate start/end keyframes for I2V mode
upload_asset vs generate_image
| Property | upload_asset | generate_image |
|---|---|---|
| Purpose | Store existing image | Create new image |
| Cost | Free | 100 coins |
| Input | URL or base64 | Prompt (+ references) |
| Returns | assetId + publicUrl | assetId + publicUrl |
Character Consistency Strategy
To maintain the same person/product across multiple scenes:
generate_image→ create master character → getassetId_main- For each scene, call
create_clip:{ "mode": "image-text-to-video", "model": "kling-v3-pro", "imageAssetId": "assetId_main", "characterReferences": [{ "frontalImageAssetId": "assetId_main" }], "prompt": "scene-specific motion description" } - For multi-scene chaining: use
previousClipTaskId+referenceVideoUrlto strengthen motion continuity
Note
Gemini image generation supports both Korean and English prompts. Reference images must be fetchable via public URL; expired or session-dependent URLs will fail.