image-generate
Image Generate
Generates an image from a text prompt using AI image generation models.
Command
npx agent-media@latest image generate --prompt <text> [options]
Inputs
| Option | Required | Description |
|---|---|---|
--prompt |
Yes | Text description of the image to generate |
--width |
No | Width of the generated image in pixels (default: 1280) |
--height |
No | Height of the generated image in pixels (default: 720) |
--count |
No | Number of images to generate (default: 1) |
--out |
No | Output path, filename or directory (default: ./) |
--provider |
No | Provider to use (default: auto-detect) |
Output
Returns a JSON object with the generated image path:
{
"ok": true,
"media_type": "image",
"action": "generate",
"provider": "fal",
"output_path": "generated_123_abc.png",
"mime": "image/png",
"bytes": 567890
}
Examples
Generate an image:
npx agent-media@latest image generate --prompt "a red robot standing in a forest"
Generate with specific dimensions:
npx agent-media@latest image generate --prompt "sunset over mountains" --width 1024 --height 768
Generate using specific provider:
npx agent-media@latest image generate --prompt "abstract art" --provider replicate
Providers
This action requires an external provider:
- fal - Requires
FAL_API_KEY - replicate - Requires
REPLICATE_API_TOKEN - runpod - Requires
RUNPOD_API_KEY - ai-gateway - Requires
AI_GATEWAY_API_KEY
The local provider does not support image generation.
More from agntswrm/agent-media
audio-transcribe
Transcribes audio to text with timestamps and optional speaker identification. Use when you need to convert speech to text, create subtitles, transcribe meetings, or process voice recordings.
131image-remove-background
Removes the background from an image, leaving the foreground subject with transparency. Use when you need to isolate subjects, create cutouts, or prepare images for compositing.
128image-crop
Crops an image to specified dimensions around a focal point. Use when you need to extract a portion of an image, create thumbnails with custom positioning, or prepare images for specific aspect ratios.
81video-generate
Generates video from text prompts or animates static images. Use when you need to create videos from descriptions, animate images, or produce video content using AI.
64image-edit
Edits an existing image using a text prompt. Use when you need to modify, enhance, or transform an image based on text instructions.
62image-resize
Resizes an image to specified dimensions. Use when you need to change image size, create thumbnails, or prepare images for specific display requirements.
47