---
title: Wan afbeelding naar video | RunAPI
description: Gebruik het eindpunt voor afbeelding naar video om een asynchrone taak
  aan te maken.
url: https://runapi.ai/nl/docs/api/wan/image-to-video.md
canonical: https://runapi.ai/nl/docs/api/wan/image-to-video
locale: nl
---

> HTML-versie: https://runapi.ai/nl/docs/api/wan/image-to-video
> Site-index voor agents: https://runapi.ai/llms.txt

# Wan afbeelding naar video

## Overzicht

Gebruik het eindpunt voor afbeelding naar video met een ondersteund model. Gebruik de geretourneerde taak-ID om de status op te halen, of geef callback_url op voor de hieronder gedocumenteerde leveringen.

### Snelstart

1. Maak een API-sleutel aan en stel deze in als RUNAPI_API_KEY.
2. Kies een ondersteund model en stuur een POST-verzoek waarvan de body overeenkomt met het schema van dat model.
3. Sla de geretourneerde taak-ID op en poll vervolgens totdat een eindstatus is bereikt, of verwerk de hieronder gedocumenteerde callbacks.

## Eindpunt

POST /api/v1/wan/image_to_video

Basis-URL: https://runapi.ai

API-versie: v1

Authenticatie: Authorization: Bearer YOUR_API_TOKEN

## Ondersteunde modellen

Open een modelpagina voor actuele prijzen, snelheidslimieten en details over commercieel gebruik.

- [wan-2.2-a14b-image-to-video-turbo](https://runapi.ai/nl/models/wan/2.2-a14b-image-to-video-turbo)
- [wan-2.5-image-to-video](https://runapi.ai/nl/models/wan/2.5-image-to-video)
- [wan-2.6-flash-image-to-video](https://runapi.ai/nl/models/wan/2.6-flash-image-to-video)
- [wan-2.6-image-to-video](https://runapi.ai/nl/models/wan/2.6-image-to-video)
- [wan-2.7-image-to-video](https://runapi.ai/nl/models/wan/2.7-image-to-video)

## Verzoekschema

Velden en toegestane waarden zijn afhankelijk van het geselecteerde model. Indien opgegeven, ontvangt callback_url de hieronder gedocumenteerde taakaflevering.

### wan-2.2-a14b-image-to-video-turbo

```json
{
  "acceleration": {
    "type": "string"
  },
  "aspect_ratio": {
    "type": "string"
  },
  "audio": {
    "type": "boolean"
  },
  "background_audio_url": {
    "type": "string"
  },
  "callback_url": {
    "type": "string"
  },
  "driving_audio_url": {
    "type": "string"
  },
  "duration_seconds": {
    "type": "integer"
  },
  "enable_prompt_expansion": {
    "type": "boolean"
  },
  "enable_safety_checker": {
    "type": "boolean"
  },
  "first_frame_image_url": {
    "required": true,
    "type": "string"
  },
  "last_frame_image_url": {
    "type": "string"
  },
  "model": {
    "type": "string"
  },
  "negative_prompt": {
    "type": "string"
  },
  "output_resolution": {
    "enum": [
      "480p",
      "720p"
    ],
    "type": "string"
  },
  "prompt": {
    "type": "string"
  },
  "ratio": {
    "type": "string"
  },
  "seed": {
    "type": "integer"
  },
  "source_video_url": {
    "type": "string"
  },
  "watermark": {
    "type": "boolean"
  }
}
```

### wan-2.5-image-to-video

```json
{
  "acceleration": {
    "type": "string"
  },
  "aspect_ratio": {
    "type": "string"
  },
  "audio": {
    "type": "boolean"
  },
  "background_audio_url": {
    "type": "string"
  },
  "callback_url": {
    "type": "string"
  },
  "driving_audio_url": {
    "type": "string"
  },
  "duration_seconds": {
    "required": true,
    "type": "integer"
  },
  "enable_prompt_expansion": {
    "type": "boolean"
  },
  "enable_safety_checker": {
    "type": "boolean"
  },
  "first_frame_image_url": {
    "required": true,
    "type": "string"
  },
  "last_frame_image_url": {
    "type": "string"
  },
  "model": {
    "type": "string"
  },
  "negative_prompt": {
    "type": "string"
  },
  "output_resolution": {
    "enum": [
      "720p",
      "1080p"
    ],
    "type": "string"
  },
  "prompt": {
    "type": "string"
  },
  "ratio": {
    "type": "string"
  },
  "seed": {
    "type": "integer"
  },
  "source_video_url": {
    "type": "string"
  },
  "watermark": {
    "type": "boolean"
  }
}
```

### wan-2.6-flash-image-to-video

```json
{
  "acceleration": {
    "type": "string"
  },
  "aspect_ratio": {
    "type": "string"
  },
  "audio": {
    "required": true,
    "type": "boolean"
  },
  "background_audio_url": {
    "type": "string"
  },
  "callback_url": {
    "type": "string"
  },
  "driving_audio_url": {
    "type": "string"
  },
  "duration_seconds": {
    "default": 5,
    "enum": [
      5,
      10,
      15
    ],
    "type": "integer"
  },
  "enable_prompt_expansion": {
    "type": "boolean"
  },
  "enable_safety_checker": {
    "type": "boolean"
  },
  "first_frame_image_url": {
    "required": true,
    "type": "string"
  },
  "last_frame_image_url": {
    "type": "string"
  },
  "model": {
    "type": "string"
  },
  "multi_shots": {
    "type": "boolean"
  },
  "negative_prompt": {
    "type": "string"
  },
  "output_resolution": {
    "default": "1080p",
    "enum": [
      "720p",
      "1080p"
    ],
    "type": "string"
  },
  "prompt": {
    "required": true,
    "type": "string"
  },
  "ratio": {
    "type": "string"
  },
  "source_video_url": {
    "type": "string"
  },
  "watermark": {
    "type": "boolean"
  }
}
```

### wan-2.6-image-to-video

```json
{
  "acceleration": {
    "type": "string"
  },
  "aspect_ratio": {
    "type": "string"
  },
  "audio": {
    "type": "boolean"
  },
  "background_audio_url": {
    "type": "string"
  },
  "callback_url": {
    "type": "string"
  },
  "driving_audio_url": {
    "type": "string"
  },
  "duration_seconds": {
    "type": "integer"
  },
  "enable_prompt_expansion": {
    "type": "boolean"
  },
  "enable_safety_checker": {
    "type": "boolean"
  },
  "first_frame_image_url": {
    "required": true,
    "type": "string"
  },
  "last_frame_image_url": {
    "type": "string"
  },
  "model": {
    "type": "string"
  },
  "multi_shots": {
    "description": "Bepaalt of de gegenereerde video meerdere opnamen met overgangen gebruikt in plaats van één doorlopende opname.",
    "type": "boolean"
  },
  "negative_prompt": {
    "type": "string"
  },
  "output_resolution": {
    "enum": [
      "720p",
      "1080p"
    ],
    "type": "string"
  },
  "prompt": {
    "required": true,
    "type": "string"
  },
  "ratio": {
    "type": "string"
  },
  "source_video_url": {
    "type": "string"
  },
  "watermark": {
    "type": "boolean"
  }
}
```

### wan-2.7-image-to-video

```json
{
  "acceleration": {
    "type": "string"
  },
  "aspect_ratio": {
    "type": "string"
  },
  "audio": {
    "type": "boolean"
  },
  "background_audio_url": {
    "type": "string"
  },
  "callback_url": {
    "type": "string"
  },
  "driving_audio_url": {
    "type": "string"
  },
  "duration_seconds": {
    "type": "integer"
  },
  "enable_prompt_expansion": {
    "type": "boolean"
  },
  "enable_safety_checker": {
    "type": "boolean"
  },
  "first_frame_image_url": {
    "type": "string"
  },
  "last_frame_image_url": {
    "type": "string"
  },
  "model": {
    "type": "string"
  },
  "negative_prompt": {
    "type": "string"
  },
  "output_resolution": {
    "enum": [
      "720p",
      "1080p"
    ],
    "type": "string"
  },
  "prompt": {
    "required": true,
    "type": "string"
  },
  "ratio": {
    "type": "string"
  },
  "seed": {
    "type": "integer"
  },
  "source_video_url": {
    "type": "string"
  },
  "watermark": {
    "type": "boolean"
  }
}
```

#### Voorwaardelijke regels

Deze vereisten zijn van toepassing wanneer alle vermelde voorwaarden overeenkomen.

- **Wanneer**: `model` = `wan-2.2-a14b-image-to-video-turbo`; **Niet geaccepteerd**: `multi_shots`
- **Wanneer**: `model` = `wan-2.5-image-to-video`; **Niet geaccepteerd**: `multi_shots`
- **Wanneer**: `model` = `wan-2.6-flash-image-to-video`; **Niet geaccepteerd**: `seed`
- **Wanneer**: `model` = `wan-2.6-image-to-video`; **Niet geaccepteerd**: `seed`
- **Wanneer**: `model` = `wan-2.7-image-to-video`; **Niet geaccepteerd**: `multi_shots`

## Acceptatie aanmaken

HTTP 202 - POST /api/v1/wan/image_to_video

### Responsschema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "processing"
      ],
      "type": "string"
    },
    "task_replayed": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "status",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "id": "tsk_reference_demo",
  "status": "processing"
}
```

## Pollen bezig

HTTP 200 - GET /api/v1/wan/image_to_video/:id

### Responsschema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "processing"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "id": "tsk_reference_demo",
  "status": "processing"
}
```

## Pollen voltooid

HTTP 200 - GET /api/v1/wan/image_to_video/:id

### Responsschema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "completed"
      ],
      "type": "string"
    },
    "videos": {
      "items": {
        "properties": {
          "url": {
            "type": "string",
            "x-runapi-generated-media": true
          }
        },
        "required": [
          "url"
        ],
        "type": "object",
        "unevaluatedProperties": false
      },
      "type": "array"
    }
  },
  "required": [
    "id",
    "status",
    "videos",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "id": "tsk_reference_demo",
  "status": "completed",
  "videos": [
    {
      "url": "https://file.runapi.ai/reference-video.mp4"
    }
  ]
}
```

## Pollen mislukt

HTTP 200 - GET /api/v1/wan/image_to_video/:id

### Responsschema

```json
{
  "properties": {
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "error": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "failed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "error",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "error": "Task processing failed.",
  "id": "tsk_reference_demo",
  "status": "failed"
}
```

## Callback van klant: voltooid

HTTP 200 - POST callback_url

### Responsschema

```json
{
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "completed"
      ],
      "type": "string"
    },
    "videos": {
      "items": {
        "properties": {
          "url": {
            "type": "string",
            "x-runapi-generated-media": true
          }
        },
        "required": [
          "url"
        ],
        "type": "object",
        "unevaluatedProperties": false
      },
      "type": "array"
    }
  },
  "required": [
    "id",
    "status",
    "videos"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "id": "tsk_reference_demo",
  "status": "completed",
  "videos": [
    {
      "url": "https://file.runapi.ai/reference-video.mp4"
    }
  ]
}
```

## Callback van klant: mislukt

HTTP 200 - POST callback_url

### Responsschema

```json
{
  "properties": {
    "error": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "properties": {
            "code": {
              "type": "string"
            },
            "limit_cents": {
              "type": "integer"
            },
            "message": {
              "type": "string"
            },
            "reset_at": {
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "used_cents": {
              "type": "integer"
            },
            "window": {
              "enum": [
                "1h",
                "1d",
                "7d",
                "daily",
                "weekly",
                "monthly",
                "lifetime"
              ],
              "type": "string"
            }
          },
          "required": [
            "code",
            "message"
          ],
          "type": "object",
          "unevaluatedProperties": false
        }
      ]
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "failed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": {
    "code": "generation_failed",
    "message": "Task processing failed."
  },
  "id": "tsk_reference_demo",
  "status": "failed"
}
```

## Fouten

HTTP 401 - POST /api/v1/wan/image_to_video

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "Authentication required"
}
```

## Fouten

HTTP 401 - GET /api/v1/wan/image_to_video/:id

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "Authentication required"
}
```

## Fouten

HTTP 400 - POST /api/v1/wan/image_to_video

### Responsschema

```json
{
  "oneOf": [
    {
      "properties": {
        "error": {
          "description": "Leesbare foutmelding.",
          "type": "string"
        }
      },
      "required": [
        "error"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    {
      "properties": {
        "error": {
          "description": "Leesbare validatiesamenvatting.",
          "type": "string"
        },
        "errors": {
          "additionalProperties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": "Validatieberichten gekoppeld aan het openbare aanvraagveld, met een reeks leesbare tekenreeksen per veld.",
          "type": "object"
        }
      },
      "required": [
        "error",
        "errors"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  ]
}
```

### Responsvoorbeeld

```json
{
  "error": "model must be one of: wan-2.2-a14b-image-to-video-turbo, wan-2.5-image-to-video, wan-2.6-flash-image-to-video, wan-2.6-image-to-video, wan-2.7-image-to-video"
}
```

## Fouten

HTTP 402 - POST /api/v1/wan/image_to_video

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "Insufficient balance"
}
```

## Fouten

HTTP 429 - POST /api/v1/wan/image_to_video

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "API key credit limit exceeded"
}
```

## Fouten

HTTP 409 - POST /api/v1/wan/image_to_video

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "The request uses features that are not supported for the selected model"
}
```

## Fouten

HTTP 429 - POST /api/v1/wan/image_to_video

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "Rate limit reached. Please retry later."
}
```

## Fouten

HTTP 503 - POST /api/v1/wan/image_to_video

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "Service under maintenance, please try again later"
}
```

## Fouten

HTTP 504 - POST /api/v1/wan/image_to_video

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "The request timed out"
}
```

## Fouten

HTTP 404 - GET /api/v1/wan/image_to_video/:id

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "Task with id 'tsk_reference_demo' not found"
}
```

## Gegenereerde codevoorbeelden

Gebruik cURL rechtstreeks, of installeer een SDK voor uw taal. Elk voorbeeld dient het gevalideerde verzoek in dat in deze referentie wordt getoond.

### curl

```curl
curl -X POST https://runapi.ai/api/v1/wan/image_to_video \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"model":"wan-2.2-a14b-image-to-video-turbo","first_frame_image_url":"https://file.runapi.ai/first-frame.png","prompt":"Gentle ocean waves move in the background."}'
```

### javascript

#### Installeren

```bash
npm install @runapi.ai/wan
```

```javascript
import { WanClient } from "@runapi.ai/wan";

const client = new WanClient({ apiKey: process.env.RUNAPI_API_KEY });
const task = await client.imageToVideo.create({
  "model": "wan-2.2-a14b-image-to-video-turbo",
  "first_frame_image_url": "https://file.runapi.ai/first-frame.png",
  "prompt": "Gentle ocean waves move in the background."
});
```

### python

#### Installeren

```bash
pip install runapi-wan
```

```python
import os
from runapi.wan import WanClient

client = WanClient(api_key=os.environ["RUNAPI_API_KEY"])
task = client.image_to_video.create(
  model="wan-2.2-a14b-image-to-video-turbo",
  first_frame_image_url="https://file.runapi.ai/first-frame.png",
  prompt="Gentle ocean waves move in the background."
)
```

### go

#### Installeren

```bash
go get github.com/runapi-ai/wan-sdk/go@latest
```

```go
package main

import (
  "context"
  "log"
  "os"

  "github.com/runapi-ai/core-sdk/go/option"
  wan "github.com/runapi-ai/wan-sdk/go/wan"
)

func main() {
  client, err := wan.NewClient(option.WithAPIKey(os.Getenv("RUNAPI_API_KEY")))
  if err != nil {
    log.Fatal(err)
  }

  task, err := client.ImageToVideo.Create(context.Background(), wan.ImageToVideoParams{
    Model: "wan-2.2-a14b-image-to-video-turbo",
    FirstFrameImageURL: "https://file.runapi.ai/first-frame.png",
    Prompt: "Gentle ocean waves move in the background.",
  })
  if err != nil {
    log.Fatal(err)
  }
  _ = task
}
```

### ruby

#### Installeren

```bash
gem install runapi-wan
```

```ruby
require "runapi/wan"

client = RunApi::Wan::Client.new(api_key: ENV.fetch("RUNAPI_API_KEY"))
task = client.image_to_video.create(
  model: "wan-2.2-a14b-image-to-video-turbo",
  first_frame_image_url: "https://file.runapi.ai/first-frame.png",
  prompt: "Gentle ocean waves move in the background."
)
```

### java

#### Installeren

```kotlin
implementation("ai.runapi:runapi-wan")
```

```java
import ai.runapi.wan.WanClient;
import ai.runapi.wan.types.ImageToVideoParams;
import ai.runapi.core.polling.TaskCreateResponse;

public final class Example {
  public static void main(String[] args) {
    WanClient client = WanClient.builder()
        .apiKey(System.getenv("RUNAPI_API_KEY"))
        .build();
    TaskCreateResponse task = client.imageToVideo().create(
        ImageToVideoParams.builder()
        .model("wan-2.2-a14b-image-to-video-turbo")
        .firstFrameImageUrl("https://file.runapi.ai/first-frame.png")
        .prompt("Gentle ocean waves move in the background.")
            .build()
    );
  }
}
```

### php

#### Installeren

```bash
composer require runapi-ai/wan
```

```php
<?php

require __DIR__ . '/vendor/autoload.php';

use RunApi\Core\ClientOptions;
use RunApi\Wan\WanClient;

$client = new WanClient(new ClientOptions(apiKey: getenv('RUNAPI_API_KEY')));
$task = $client->imageToVideo->create([
  "model" => "wan-2.2-a14b-image-to-video-turbo",
  "first_frame_image_url" => "https://file.runapi.ai/first-frame.png",
  "prompt" => "Gentle ocean waves move in the background."
]);
```

## Gerelateerde handleidingen

- [Authenticatie](https://runapi.ai/nl/docs/guides/authentication.md)
- [Snelstart](https://runapi.ai/nl/docs/guides/task-api/quickstart.md)

---

## Meer van RunAPI

- [Home](https://runapi.ai/nl/.md)
- [Modelcatalogus](https://runapi.ai/nl/models.md)
- [Prijzen](https://runapi.ai/nl/pricing.md)
- [Providers](https://runapi.ai/nl/models)
- [Documentatie](https://runapi.ai/nl/docs/guides)
- [SDK's](https://runapi.ai/nl/sdk.md)
- [CLI](https://runapi.ai/nl/cli.md)
- [MCP Server](https://runapi.ai/nl/mcp.md)
- [Claude Code vs Cursor](https://runapi.ai/nl/claude-code-vs-cursor.md)
- [Cursor API instellen](https://runapi.ai/nl/cursor-api-setup.md)
- [RunAPI vs OpenRouter](https://runapi.ai/nl/openrouter-alternative.md)
- [Enterprise](https://runapi.ai/nl/contact.md)
- [Contact](https://runapi.ai/nl/contact.md)
- [Voorwaarden](https://runapi.ai/nl/terms.md)
- [Privacy](https://runapi.ai/nl/privacy.md)
- [Site-index voor agents](https://runapi.ai/llms.txt)

Contact: contact@runapi.ai

## Gestructureerde gegevens

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "nl",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/nl",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/nl/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "nl",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/nl",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/nlicon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "nl",
    "@type": "TechArticle",
    "headline": "Wan afbeelding naar video",
    "description": "Gebruik het eindpunt voor afbeelding naar video om een asynchrone taak aan te maken.",
    "url": "https://runapi.ai/nl/docs/api/wan/image-to-video",
    "mainEntityOfPage": "https://runapi.ai/nl/docs/api/wan/image-to-video"
  }
]
```
