---
title: "Generate a single canvas edge"
method: POST
path: "/v1/collections/{id}/canvases/{canvasId}/edges/{edgeId}/generate"
tags: ["Canvases"]
deprecated: true
---

# Generate a single canvas edge

`POST /v1/collections/{id}/canvases/{canvasId}/edges/{edgeId}/generate`

## Request

- Base URL: `https://api.masko.ai`
- URL: `https://api.masko.ai/v1/collections/{id}/canvases/{canvasId}/edges/{edgeId}/generate`
- Auth: HTTP bearer

> **Deprecated.**

Dispatches generation for one specific canvas edge by ID. Costs the same as a single edge in generate-all: duration * 2 for animation_model=standard or duration * 6 for premium. Without animation_model, legacy duration * 5 pricing is retained. If the edge already has a video asset, archives the old assets and re-dispatches. Any State edges (source: "*") and reverse edges are rejected with 400. Requires the source and target nodes to already have generated images. Loops use the source pose receipt, even on a mixed-variant canvas. Transitions retain both endpoint contexts. For uploads without receipts, the canvas context selects matching references; ambiguous shared uploads return 409 before charging.

## Path parameters

- `id` string, uuid, required
- `canvasId` string, uuid, required
- `edgeId` string, required

## Headers

- `Idempotency-Key` string

## Request body

- GenerateEdgeBody
  - `animation_model` 'standard' | 'premium': Same choices as Studio: standard costs 2 credits/sec (2–15s); premium costs 6 credits/sec (4–30s). Both default to 5s. Omit to preserve legacy generation at 5 credits/sec (4–10s, default 4s).
  - `duration` integer: Whole seconds. Standard: 2–15; Premium: 4–30; default 5 with either explicit model. Without animation_model: 4–10, default 4. An additional image costs 1 credit only when a source image must be generated.

## Response `202`

Edge generation started

- CanvasEdgeGenerateResponse
  - `data` CanvasEdgeGenerateData, required
    - `job_id` string, uuid, required
    - `edge_id` string, required
    - `type` 'loop' | 'transition', required
    - `source` string, required
    - `target` string, required
    - `cost` number, required
    - `urls` object
    - `poll_url` string, required

## Other responses

- `400`: Validation error
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `409`: Conflict

---

[API](https://skmtc.dev/masko/apis/masko-api.md) · [All operations](https://skmtc.dev/masko/apis/masko-api/llms.txt) · [OpenAPI document](https://skmtc.dev/masko/apis/masko-api/revisions/84832e255613?raw)
