> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gmicloud.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# wan2.7-videoedit

> API usage guide for wan2.7-videoedit.

**Model ID**

```bash theme={null}
wan2.7-videoedit
```

**Calling method:** async

# wan2.7-videoedit API Usage Guide

## Overview

**wan2.7-videoedit** enables text-guided editing of existing videos. Provide a source video and describe the desired edits in a prompt. Optionally supply a reference image to guide the visual style or subject appearance of the edit.

Requests are submitted to the request-queue API and results are retrieved via polling.

## Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header:

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Submit Video Edit Request

### Base URL

```
https://console.gmicloud.ai
```

### Endpoint

```
POST /api/v1/ie/requestqueue/apikey/requests
```

### Request Format

```bash theme={null}
curl -X POST "https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wan2.7-videoedit",
    "payload": {
      "prompt": "Change the background to a tropical beach at sunset",
      "video": "https://example.com/source-video.mp4",
      "reference_image": "https://example.com/beach-reference.jpg",
      "negative_prompt": "blurry, low quality, distorted",
      "resolution": "1080P",
      "duration": 5,
      "audio_setting": "origin",
      "prompt_extend": true,
      "watermark": false,
      "seed": 12345
    }
  }'
```

### Request Parameters

| Parameter | Type | Required | Description | Default | Constraints |
| - | - | - | - | - | - |
| `prompt` | string | Yes | Text prompt describing the desired edit | - | Max 1500 characters |
| `negative_prompt` | string | No | What to avoid in the output | "" | Max 500 characters |
| `video` | video (URL) | Yes | Source video to edit | - | 1 video |
| `reference_image` | image (URL) | No | Reference image for style/subject guidance | null | Max 1 image |
| `resolution` | string (enum) | No | Output resolution tier | "1080P" | Options: `"720P"`, `"1080P"` |
| `duration` | integer | No | Output video length in seconds | - | 2–10 |
| `audio_setting` | string (enum) | No | Audio handling for the output video | "auto" | `"auto"`: model decides; `"origin"`: keep original audio |
| `prompt_extend` | boolean | No | LLM rewrites prompt for richer detail | true | - |
| `watermark` | boolean | No | Add fixed `AI Generated` watermark | false | - |
| `seed` | integer | No | Random seed for reproducibility | - | 0–2147483647 |

### Response

```json theme={null}
{
  "request_id": "550e8400-e29b-41d4-a716-446655440000",
  "model": "wan2.7-videoedit",
  "status": "queued",
  "created_at": 1750442925,
  "updated_at": 1750442925,
  "queued_at": 1750442925
}
```

## Check Request Status

### Endpoint

```
GET /api/v1/ie/requestqueue/apikey/requests/{request_id}
```

### Example

```bash theme={null}
curl -X GET "https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Response

```json theme={null}
{
  "request_id": "550e8400-e29b-41d4-a716-446655440000",
  "org_id": "your-org-id",
  "model": "wan2.7-videoedit",
  "status": "success",
  "is_public": false,
  "payload": {
    "prompt": "Change the background to a tropical beach at sunset",
    "video": "https://example.com/source-video.mp4",
    "reference_image": "https://example.com/beach-reference.jpg",
    "negative_prompt": "blurry, low quality, distorted",
    "resolution": "1080P",
    "duration": 5,
    "audio_setting": "origin",
    "prompt_extend": true,
    "watermark": false,
    "seed": 12345
  },
  "outcome": {
    "video_url": "https://storage.googleapis.com/bucket/edited-video.mp4",
    "thumbnail_image_url": "https://storage.googleapis.com/bucket/thumbnail.jpg"
  },
  "created_at": 1750442925,
  "updated_at": 1750442930,
  "queued_at": 1750442925
}
```

## Request Status Values

| Status | Description |
| - | - |
| `queued` | Request is waiting to be processed |
| `processing` | Video editing is in progress |
| `success` | Video editing completed successfully |
| `failed` | Video editing failed |
| `cancelled` | Request was cancelled |

## List Your Requests

### Endpoint

```
GET /api/v1/ie/requestqueue/apikey/requests?model_id=wan2.7-videoedit
```

### Example

```bash theme={null}
curl -X GET "https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests?model_id=wan2.7-videoedit" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## List Available Models

### Endpoint

```
GET /api/v1/apikey/models
```

### Example

```bash theme={null}
curl -X GET "https://console.gmicloud.ai/api/v1/apikey/models" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Tips for Better Results

1. **Be specific about edits**: Clearly describe what should change (e.g. "replace the sky with a stormy sky") rather than vague instructions
2. **Reference image**: Supply a reference image when you want the edit to match a specific visual style or subject appearance
3. **Audio setting**: Use `origin` to preserve the original audio track, or `auto` to let the model decide
4. **Prompt Extension**: Keep `prompt_extend` enabled for short prompts
5. **Duration**: Output duration is capped at 10 seconds; if not specified, the model decides based on the source video
6. **Seed for reproducibility**: Fix a seed value to regenerate consistent results


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.