Skip to main content
POST
/
generate-video
/
extend
cURL
curl --request POST \
  --url https://nano-gpt.com/api/generate-video/extend \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "taskId": "fal-request-abc123xyz",
  "index": 0
}
'
{
  "runId": "<string>",
  "status": "pending",
  "model": "<string>",
  "projectId": "<string>",
  "cost": 123,
  "paymentSource": "<string>",
  "remainingBalance": 123,
  "prechargeLabel": "<string>"
}

Overview

This endpoint is the task-based extension flow for Midjourney videos. For all other extend models, use POST /api/generate-video with a source video.

Endpoint

POST /api/generate-video/extend

Rate limit

20 requests/minute per IP

Supported models (task-based)

  • midjourney-video (extend a Midjourney video created via POST /api/generate-video)

Required fields (Midjourney extend)

  • runId (preferred) or taskId (legacy alias): the job ID from the original Midjourney video request
  • index (0-3)
index maps to the 4 videos returned by the original Midjourney request.

Request notes

  • Send the same authentication headers as /api/generate-video.
  • Session ownership is enforced; requests for jobs you do not own return 403.
  • This endpoint does not accept video, videoUrl, videoDataUrl, or videoAttachmentId.
  • The response format matches the standard generation response (runId, id, status, model, cost).

Source video extend (use /api/generate-video)

Use POST /api/generate-video with an extend model and a source video input. Extend model examples:
  • wan-wavespeed-22-spicy-extend
  • wan-wavespeed-25-extend
  • veo3-1-extend
  • veo3-1-fast-extend
  • bytedance-seedance-v1.5-pro-extend
Required fields:
  • prompt
  • videoUrl (or videoDataUrl / videoAttachmentId)
Notes:
  • video is only accepted by specific models (for example, wan-wavespeed-25-extend).
  • wan-wavespeed-22-spicy-extend accepts videoUrl, videoDataUrl, or videoAttachmentId only.
  • Max source video length: 120 seconds.

Example: Midjourney extend (task-based)

{
  "runId": "vid_m1abc123def456",
  "index": 0
}

Example response

{
  "success": true,
  "runId": "vid_m1abc123def456",
  "id": "vid_m1abc123def456",
  "taskId": "vid_m1abc123def456",
  "status": "pending",
  "model": "midjourney-video",
  "message": "Extending video 1 by 5 seconds...",
  "eta": 60
}

Example: Source video extend (/api/generate-video)

{
  "model": "wan-wavespeed-22-spicy-extend",
  "prompt": "Extend the clip with smooth motion and warm light",
  "videoUrl": "https://example.com/source.mp4",
  "resolution": "480p",
  "duration": 5,
  "seed": -1
}

Authorizations

x-api-key
string
header
required

Body

application/json

Midjourney extension request payload (taskId from the original run + index).

taskId
string
required

Run ID from the original Midjourney video request.

index
integer
required

Zero-based index of the Midjourney video to extend (0-3).

Required range: 0 <= x <= 3

Response

Video extension request submitted successfully (asynchronous processing)

runId
string
required

Unique identifier for the video generation request

status
enum<string>
default:pending
required

Current status of the generation

Available options:
pending,
processing,
completed,
failed
model
string
required

The model used for generation

projectId
string

Project identifier (for LongStories models)

cost
number

Cost of the video generation

paymentSource
string

Payment source used (USD or XNO)

remainingBalance
number

Remaining balance after the generation

prechargeLabel
string

Provider label for the precharge