Image to Image

Create an Image to Image task

Edit or restyle from 1-5 reference images, supplied directly or chained from a prior image task with input_task_id. Consumes credits; see https://docs.meshy.ai for pricing.

post/v1/image-to-image

Request

  • Base URL: https://api.meshy.ai/openapi
  • URL: https://api.meshy.ai/openapi/v1/image-to-image
  • Auth: HTTP bearer

Request body

ai_model'nano-banana' | 'nano-banana-pro' | 'nano-banana-2' | 'nano-banana-2-lite' | 'gpt-image-2' | 'gpt-image-2-5-flare' | 'gpt-image-2-5-sunburst' required

Edit model to use.

input_task_idstring

SUCCEEDED Text to Image / Image to Image task (multi-view included) of yours whose output images become the reference images. ALL of its images are used, so a multi-view source fills several of the 5 slots. Mutually exclusive with reference_image_urls.

reference_image_urlsstring[]

1-5 reference images to edit from. Mutually exclusive with input_task_id.

promptstring required

Edit prompt.

generate_multi_viewboolean nullable

Produce a 4-view split image instead of a single image.

aspect_ratio'1:1' | '16:9' | '9:16' | '4:3' | '3:4' | '3:2' | '2:3'

Output aspect ratio (model-dependent; cannot be combined with generate_multi_view).

remove_backgroundboolean

Return a transparent RGBA cutout (single-image only).

Response

Task accepted for processing.

resultstring required

The created task's ID.

Changes

No recorded changes to this operation across all 1 revision of this API.