# v1 to v2 Migration

Use the v2 create endpoint for everyday migrations from v1: it covers the v1 create, edit, and remix workflows through ordered reference images, while adding layout awareness.

## API shape changes

- v1 create, edit, and remix all map to v2 create.
- v2 uses prompt, and passes input images as references — an ordered list of image objects, each wrapping the bytes in { data } (or naming a stored image with { ref }).
- Refer to a reference image from the prompt by frame: <frame>N</frame> is the Nth entry in references (0-based). For a v1 edit call, pass the image being edited as the first reference and address it as <frame>0</frame>.
- v2 image endpoints return the generated image plus a layout. The experimental v2 endpoints expose lower-level layout controls and need experimentation for best results.
- v2 images are significantly larger resolution than v1 images. Add a fit_image postprocessing step, such as { "process": "fit_image", "max_dim": 2048 }, to cap the returned image at the maximum size your application needs.

Create: v1 to v2

Create: v1 to v2

Edit: v1 to v2 create

Remix: v1 to v2 create

JSON

```json
{
  "v1": {
    "endpoint": "POST /v1/image/create",
    "body": {
      "prompt": "A serene mountain landscape at sunset",
      "aspect_ratio": "16:9",
      "version": "latest"
    }
  },
  "v2": {
    "endpoint": "POST /v2/image/create",
    "body": {
      "prompt": "A serene mountain landscape at sunset",
      "aspect_ratio": "16:9"
    }
  }
}
```
