Skip to content

Task: Generate Video

Runway official video generation API for creating short videos from one or more images.


Overview

  • Method: POST
  • Path: /runwayml/v1/image_to_video
  • Content-Type: application/json
  • Category: Video Models (Video) / Runway official API

Authentication

  • Header: Authorization: Bearer <token>
  • Additional header: X-Runway-Version: 2024-11-06

Request Parameters

JSON Body Fields

FieldTypeRequiredDescription
promptImagestring / arrayYesInitial video frame image, supports URL or Base64; may also be an array of objects to specify start/end frames
modelstringYesModel version, supports gen3a_turbo, gen4a_turbo
seedintegerNoRandom seed; if omitted, a random seed is generated
promptTextstringNoVideo prompt text, up to 512 characters
watermarkbooleanNoWhether to include a Runway watermark, default false
durationintegerNoVideo duration, supports 5 or 10, default 5
ratiostringNoVideo resolution ratio, supports 1280:768 or 768:1280

Request Example

curl Example

bash
curl -X POST "https://api.gpt.ge/runwayml/v1/image_to_video" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $YOUR_TOKEN" \
  -H "X-Runway-Version: 2024-11-06" \
  -d '{
    "promptImage": "https://pic.chaopx.com/chao_origin_pic/22/04/29/e086fae1a2ed91679fdc6a25beca5c68.jpg",
    "model": "gen4a_turbo",
    "seed": 2372601190,
    "promptText": "A dreamlike and disorienting hyperlapse racing through 1980s New York City.",
    "watermark": false,
    "duration": 5,
    "ratio": "1280:768"
  }'

JavaScript (fetch) Example

javascript
fetch('https://api.gpt.ge/runwayml/v1/image_to_video', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_TOKEN',
    'X-Runway-Version': '2024-11-06'
  },
  body: JSON.stringify({
    promptImage: 'https://pic.chaopx.com/chao_origin_pic/22/04/29/e086fae1a2ed91679fdc6a25beca5c68.jpg',
    model: 'gen4a_turbo',
    seed: 2372601190,
    promptText: 'A dreamlike and disorienting hyperlapse racing through 1980s New York City.',
    watermark: false,
    duration: 5,
    ratio: '1280:768'
  })
}).then(res => res.json()).then(console.log)

Python Example (requests)

python
import requests

resp = requests.post(
    'https://api.gpt.ge/runwayml/v1/image_to_video',
    headers={
        'Content-Type': 'application/json',
        'Authorization': 'Bearer YOUR_TOKEN',
        'X-Runway-Version': '2024-11-06'
    },
    json={
        'promptImage': 'https://pic.chaopx.com/chao_origin_pic/22/04/29/e086fae1a2ed91679fdc6a25beca5c68.jpg',
        'model': 'gen4a_turbo',
        'seed': 2372601190,
        'promptText': 'A dreamlike and disorienting hyperlapse racing through 1980s New York City.',
        'watermark': False,
        'duration': 5,
        'ratio': '1280:768'
    }
)
print(resp.json())

Response Fields

FieldTypeDescription
idstringTask ID used for subsequent queries

Response Example (200)

json
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}