---
title: "Generate image"
method: POST
path: "/v1/tools/generate-image"
tags: ["Tools"]
---

# Generate image

`POST /v1/tools/generate-image`

Generate an image from a text prompt, optionally guided by reference images and actor, product, or visual-style entity ids. When reference images are provided, the prompt describes the desired transformation. VideoGen automatically routes each request to the most effective state-of-the-art image model for your prompt, reference images, entities, and quality tier, so you don't pick a model.

## Request body

- GenerateImageRequest
  - `prompt` string, required — Text prompt describing the image to generate. When reference images are provided, the prompt describes the desired transformation.
  - `imageFileIds` string[] — Optional file ids of reference images (e.g. `["vg_file_..."]`). Upload files first via `POST /v1/files/upload`, then pass the returned ids here. Maximum 4 images. When provided, the model uses these as guidance for generation.
  - `entityIds` string[] — Optional actor, product, or visual-style entity ids (e.g. `["vg_enti_..."]`). The model uses each entity as identity/reference the same way in-app image generation does. Can be combined with `imageFileIds`. A missing id returns not found; an inaccessible id returns a permission error.
  - `aspectRatio` AspectRatio — Aspect ratio as a width:height pair (e.g. 16 and 9 for 16:9). Not pixel dimensions.
    - `width` integer, required
    - `height` integer, required
  - `quality` 'LOW' | 'STANDARD' | 'HIGH' | 'MAX' — AI generation quality tier, shared across every generative feature (image, video, text, and so on). `LOW` is fastest and cheapest, `STANDARD` balances quality and cost, `HIGH` is higher quality, and `MAX` is the highest quality. When a request omits the quality field, VideoGen falls back to your account's **Default AI quality** for that feature, which you can change at [Account settings](https://app.videogen.io/settings/account). Not every feature supports every tier; unsupported tiers are rejected with an error (see each field's description).
  - `contentPolicyConfig` ContentPolicyConfig — Controls how content-policy rejections are handled during generation.
    - `maxPromptRewrites` integer — Maximum number of automatic prompt rewrites to attempt after a content-policy rejection before failing. Must be an integer between 0 and 4. 0 (the default) fails on the first rejection and returns the moderation error so you can revise the prompt yourself. Higher values let the request automatically rephrase and retry the prompt.
  - `watermarkMode` 'NONE' | 'VIDEO_GEN' | 'AUTO' — Controls whether the VideoGen watermark is applied to the output. `AUTO` applies the watermark unless you have a Pro plan. `VIDEO_GEN` always applies it. `NONE` removes the watermark (requires Pro; returns an error if you don't have it).
  - `numResults` integer — Number of output results to generate. Defaults to 1.
  - `isOutputTemporary` boolean — When true, generated files are temporary. Temporary files are guaranteed to be available for 24 hours, after which they may be archived at any time. Temporary files are not analyzed (no description, transcript, or embedding will be generated), so they will not appear in search results. Defaults to false.
  - `hideFromUi` boolean — When true, generated files are hidden from the VideoGen Media page by default. They remain accessible through the API. Defaults to false.

## Response `202`

Execution accepted; poll until complete.

- StartToolExecutionResponse — Returned when a tool execution is started. Use `toolExecutionId` to poll for results or cancel.
  - `toolExecutionId` string, required — Execution id (e.g. `vg_tool_...`).

## Other responses

- `default` — Error

---

[API](https://skmtc.dev/videogen/apis/videogen-api.md) · [All operations](https://skmtc.dev/videogen/apis/videogen-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/videogen/videogen-api/revisions/33dda0455d67/schema)
