---
title: "Magic resize from an image"
method: POST
path: "/api/v1/canvases/{canvasId}/magic-resize"
tags: ["run"]
---

# Magic resize from an image

`POST /api/v1/canvases/{canvasId}/magic-resize`

## Path parameters

- `canvasId` string, uuid, required

## Request body

- object
  - `sourceNodeId` string, uuid, required
  - `ratios` union[], required
    - union
      - '21:9' | '16:9' | '4:3' | '1:1' | '3:4' | '9:16' | '9:21'
      - string

## Response `201`

201

- object
  - `nodeId` string, uuid, required
  - `nodeRunId` string, uuid, required
  - `creditCost` integer, required

## Other responses

- `400` — 400
- `401` — Missing, invalid, expired, or revoked API key.
- `403` — The API key's user is not a member of the requested team.
- `404` — 404
- `429` — Rate limit reached — retry after the `Retry-After` header.

---

[API](https://skmtc.net/melius/apis/melius-api.md) · [All operations](https://skmtc.net/melius/apis/melius-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/melius/melius-api/revisions/c48e2a9e4b72/schema)
