Skip to main content
Image generation requires an OpenRouter API key configured in Settings → CodeFire Engine. Images are saved to the project’s assets/generated/ directory.

generate_image

Generate an image from a text prompt using AI (Google Gemini 3.1 Flash). Returns the file path of the generated image.
prompt
string
required
Text description of the image to generate
aspect_ratio
string
Aspect ratio: 1:1, 16:9, 9:16, 4:3, 3:2 (default: 1:1)
size
string
Resolution: 1K, 2K, 4K (default: 1K)
project_id
string
Project ID (auto-detected if omitted)
Returns:
file_path
string
Absolute path to the generated image file
prompt
string
The prompt that was used
image_id
integer
Database ID of the generated image
Example:
{
  "name": "generate_image",
  "arguments": {
    "prompt": "A futuristic coding workspace with holographic displays",
    "aspect_ratio": "16:9",
    "size": "2K"
  }
}
Response:
{
  "file_path": "/Users/you/projects/my-app/assets/generated/image-1234567890.png",
  "prompt": "A futuristic coding workspace with holographic displays",
  "image_id": 42
}

edit_image

Edit an existing image with text instructions using AI. Provide the file path of the source image and editing instructions.
image_path
string
required
Absolute file path of the image to edit
prompt
string
required
Editing instructions (e.g., “make the background blue”, “add a shadow”)
project_id
string
Project ID (auto-detected if omitted)
Returns:
file_path
string
Absolute path to the edited image file
parent_image_id
integer
ID of the source image
image_id
integer
Database ID of the new edited image
Example:
{
  "name": "edit_image",
  "arguments": {
    "image_path": "/Users/you/projects/my-app/assets/generated/image-1234567890.png",
    "prompt": "make the holographic displays glow brighter"
  }
}

list_images

List all generated images for a project, ordered by most recent first.
project_id
string
Project ID (auto-detected if omitted)
limit
integer
Maximum number of images to return (default: 20)
Returns: Array of image objects with:
id
integer
Image database ID
prompt
string
Prompt used to generate the image
file_path
string
Absolute path to the image file
aspect_ratio
string
Aspect ratio (e.g., “16:9”)
size
string
Resolution (e.g., “2K”)
parent_image_id
integer | null
ID of parent image if this was an edit
created_at
string
ISO 8601 timestamp
Example:
{
  "name": "list_images",
  "arguments": {
    "limit": 10
  }
}

get_image

Get detailed information about a specific generated image.
image_id
integer
required
Image database ID
Returns: Full image object with all metadata including prompt, file path, dimensions, parent image ID, and creation timestamp. Example:
{
  "name": "get_image",
  "arguments": {
    "image_id": 42
  }
}

Notes

  • Images are saved to <project-path>/assets/generated/
  • Requires OpenRouter API key in Settings → CodeFire Engine
  • Model used: google/gemini-3.1-flash-image-preview
  • Edited images maintain a link to their parent via parent_image_id
  • All image operations are project-scoped

Image Studio

Learn about the GUI image generation features

MCP Integration

See how to use images in AI workflows

Build docs developers (and LLMs) love