media
images.generate
Generate Image
Effects: write
Generates a PNG image from a text prompt using Gemini 2.5 Flash Image. Returns a file_id consumable by messages.send(attachments=[...]) and other file-aware tools. Supports up to 12 reference image file_ids for subject-consistent edits and composition (use file IDs from the [ATTACHMENTS] block, files.search, or search.files). Latency: ~8-10s per image. Output: 1024×1024 PNG.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
aspect_ratio | string | no | Output aspect ratio. (one of 1:1, 16:9, 9:16, 4:3, 3:4; default 1:1) |
prompt | string | yes | Text description of the image to generate (3-4000 chars). |
reference_file_ids | array | no | Optional list of up to 3 file_ids whose images should be used as visual references (for edits, subject consistency, or composition). Files must be image MIME types (image/png, image/jpeg, image/webp, image/gif). |
images.search
Search Images
Effects: read
Searches images in this workspace by visual content using vector embeddings (Voyage multimodal-3). Pass a text description; returns ranked file_ids with cosine scores and presigned download URLs. Up to 50 results.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
collection_id | integer | no | Optional — restrict to images attached to this collection. Filter is applied after RAG, so you may get fewer than limit results; pass a larger limit to broaden if needed. |
limit | integer | no | Max number of results. (default 10; min 1.0; max 50.0) |
mime_type | string | no | Optional — restrict to a specific image MIME (e.g. "image/png"). Filter is applied after RAG (same caveat as collection_id). |
query | string | yes | Text description of what you're looking for (3-4000 chars). |
score_threshold | number | no | Minimum cosine similarity (0.0 returns all, higher = stricter). (default 0.3; min 0.0; max 1.0) |
videos.generate
Generate Video
Effects: write
Generate a short video (5-10s) from a text prompt using BytePlus Seedance. Optionally accepts up to 12 image file IDs from the user's attached files (visible in the [ATTACHMENTS] block) as reference_file_ids for style and composition. Returns immediately with a job_id; the video is delivered back via continuation when the job completes (~30-90s for fast model, ~2-5min for pro). Reference images are temporarily re-hosted on a third-party CDN (imgbb) for the duration of generation and deleted on completion — don't submit confidential references. Gated behind a workspace opt-in flag.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
aspect_ratio | string | no | Output aspect ratio. Wan supports '16:9', '9:16', '1:1'; Seedance also supports '4:3', '3:4', '21:9'. Per-model support enforced by validation. (one of 16:9, 9:16, 1:1, 4:3, 3:4, 21:9; default 16:9) |
camera_motion | string | no | Camera motion preset. Seedance models only. OMIT for no camera motion. (one of dolly_in, dolly_out, pan_left, pan_right, zoom_in, zoom_out, static) |
duration | integer | no | Output video duration in seconds. Single-clip: 5 or 10. Long-form (chained, i2v models only): 15, 20, 30, 45, or 60. Long-form videos are silent (no audio in v1) and use only reference_file_ids[0] when refs are provided. (default 5) |
generate_audio | boolean | no | Whether the model should produce native audio. For wan2.6-i2v-flash this doubles the per-second rate (e.g., 720p+audio is $0.05/s vs $0.025/s silent) — set False for cheaper silent clips. wan2.6-i2v always produces audio regardless of this flag. wan2.6-t2v / wan2.2-i2v-flash / seedance-2-fast never produce audio. (default True) |
model | string | no | Video model. 'wan2.6-i2v-flash' (default, cheap, 720p/1080p, optional audio), 'wan2.6-i2v' (premium, always-on audio), 'wan2.6-t2v' (text-only input, 720p/1080p, no audio), 'wan2.2-i2v-flash' (cheapest, 480p/720p, no audio). Legacy BytePlus: 'seedance-2-fast', 'seedance-2-pro' (720p only). (one of wan2.6-i2v-flash, wan2.6-i2v, wan2.6-t2v, wan2.2-i2v-flash, happyhorse-1.0-t2v, happyhorse-1.0-i2v, wan2.2-s2v, omnihuman-1.5, seedance-2-pro; default wan2.6-i2v-flash) |
negative_prompt | string | no | Optional text describing what to AVOID in the output. Honored by Wan and Seedance models. |
prompt | string | yes | Text description of the video to generate (3-4000 chars). |
reference_file_ids | array | no | Optional list of up to 12 image file_ids to use as visual references (style, composition). Files must be image MIME types (image/png, image/jpeg, image/webp, image/gif). Get IDs from the [ATTACHMENTS] block, files.search, or search.files. |
resolution | string | no | Output resolution. '720p' is the safe default; '1080p' is wan2.6 only; '480p' is wan2.2-i2v-flash only. Per-model support enforced by validation. (one of 480p, 720p, 1080p; default 720p) |
seed | integer | no | Random seed for reproducibility (0-2147483647). Omit for random. |
shot_type | string | no | Shot mode: 'single' (continuous) or 'multi' (scene cuts). wan2.6-t2v only. OMIT to use the model default. (one of single, multi) |
style | string | no | Style preset. Seedance models only. OMIT for no style preset. (one of cinematic, anime, realistic, 3d_render) |