{
 "spec_version": 1,
 "model": "runway/aleph-2",
 "type": "video",
 "input_modalities": [
  "text"
 ],
 "output_modalities": [
  "video"
 ],
 "context_window": null,
 "max_output_tokens": null,
 "endpoint": {
  "method": "POST",
  "path": "/v1/videos"
 },
 "async": {
  "poll": "GET /v1/videos/{video_id}",
  "download": "GET /v1/videos/{video_id}/content"
 },
 "parameters": [
  {
   "name": "model",
   "type": "string",
   "required": true,
   "description": "This model's ID."
  },
  {
   "name": "prompt",
   "type": "string",
   "required": true,
   "description": "What happens in the clip."
  },
  {
   "name": "duration",
   "type": "integer",
   "description": "Length in whole seconds. `seconds` is accepted too.",
   "minimum": 4,
   "maximum": 10,
   "default": 5
  },
  {
   "name": "resolution",
   "type": "string",
   "enum": [
    "720p"
   ],
   "description": "Output resolution; lower is faster and cheaper."
  },
  {
   "name": "aspect_ratio",
   "type": "string",
   "enum": [
    "16:9",
    "4:3",
    "3:2",
    "1:1",
    "2:3",
    "3:4",
    "9:16",
    "21:9"
   ],
   "description": "Output aspect ratio."
  },
  {
   "name": "seed",
   "type": "integer",
   "minimum": -1,
   "maximum": 4294967295,
   "description": "Same seed, prompt and settings give a similar clip; `-1` or none is random. If the request is served where a seed is not available it is ignored and named in the `x-oceantoken-dropped-params` response header."
  },
  {
   "name": "input_references",
   "type": "array",
   "description": "The source video this model changes (exactly one): `[{\"type\": \"video_url\", \"video_url\": {\"url\": ...}}]`. It does not make a video from text alone.",
   "limits": {
    "videos": 1
   },
   "required": true
  }
 ],
 "response": {
  "fields": [
   {
    "name": "id",
    "type": "string",
    "description": "The job's ID; poll it."
   },
   {
    "name": "status",
    "type": "string",
    "enum": [
     "queued",
     "in_progress",
     "completed",
     "failed"
    ],
    "description": "Where the job is."
   },
   {
    "name": "seconds",
    "type": "string",
    "description": "Length of the clip."
   },
   {
    "name": "size",
    "type": [
     "string",
     "null"
    ],
    "description": "The `size` the request asked for (width x height), not measured from the file; null when the request named a `resolution` instead."
   },
   {
    "name": "content_url",
    "type": "string",
    "description": "Once completed: the MP4, valid for 24 hours."
   },
   {
    "name": "error",
    "type": "object",
    "description": "On a failed job: `code` and `message`."
   }
  ],
  "example": {
   "id": "video_...",
   "object": "video",
   "status": "completed",
   "model": "runway/aleph-2",
   "seconds": "5",
   "size": null,
   "created_at": 1792000000,
   "completed_at": 1792000095,
   "content_url": "https://...",
   "error": null
  }
 },
 "examples": [
  {
   "title": "Edit a video",
   "request": {
    "model": "runway/aleph-2",
    "prompt": "Turn the scene into night; keep everything else",
    "duration": 5,
    "resolution": "720p",
    "input_references": [
     {
      "type": "video_url",
      "video_url": {
       "url": "https://example.com/source.mp4"
      }
     }
    ]
   }
  }
 ],
 "input_schema": {
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "required": [
   "model",
   "prompt",
   "input_references"
  ],
  "properties": {
   "model": {
    "type": "string",
    "description": "This model's ID."
   },
   "prompt": {
    "type": "string",
    "description": "What happens in the clip."
   },
   "duration": {
    "type": "integer",
    "description": "Length in whole seconds. `seconds` is accepted too.",
    "default": 5,
    "minimum": 4,
    "maximum": 10
   },
   "resolution": {
    "type": "string",
    "description": "Output resolution; lower is faster and cheaper.",
    "enum": [
     "720p"
    ]
   },
   "aspect_ratio": {
    "type": "string",
    "description": "Output aspect ratio.",
    "enum": [
     "16:9",
     "4:3",
     "3:2",
     "1:1",
     "2:3",
     "3:4",
     "9:16",
     "21:9"
    ]
   },
   "seed": {
    "type": "integer",
    "description": "Same seed, prompt and settings give a similar clip; `-1` or none is random. If the request is served where a seed is not available it is ignored and named in the `x-oceantoken-dropped-params` response header.",
    "minimum": -1,
    "maximum": 4294967295
   },
   "input_references": {
    "type": "array",
    "description": "The source video this model changes (exactly one): `[{\"type\": \"video_url\", \"video_url\": {\"url\": ...}}]`. It does not make a video from text alone."
   }
  }
 }
}
