openapi: 3.1.0 info: title: Runway ML API description: | Runway API for generative media. Provides endpoints for generating video from images, video from video, and images from text, plus task management for asynchronous generation jobs. version: "1.0.0" contact: name: Runway Developer Portal url: https://docs.dev.runwayml.com/ servers: - url: https://api.dev.runwayml.com/v1 description: Runway API production base URL security: - bearerAuth: [] paths: /image_to_video: post: summary: Generate a video from an input image description: Creates an asynchronous task that generates a video clip from a source image and optional prompt. operationId: createImageToVideoTask requestBody: required: true content: application/json: schema: type: object required: [promptImage, model] properties: promptImage: type: string description: URL or data URI of the source image. promptText: type: string model: type: string description: Identifier of the generation model to use. seed: type: integer duration: type: integer description: Length of the generated video in seconds. ratio: type: string description: Aspect ratio of the generated video. responses: "200": description: Task created content: application/json: schema: $ref: '#/components/schemas/Task' "401": description: Missing or invalid API key /video_to_video: post: summary: Generate a video from an input video operationId: createVideoToVideoTask requestBody: required: true content: application/json: schema: type: object required: [videoUri, model] properties: videoUri: type: string promptText: type: string model: type: string seed: type: integer responses: "200": description: Task created content: application/json: schema: $ref: '#/components/schemas/Task' /text_to_image: post: summary: Generate an image from text operationId: createTextToImageTask requestBody: required: true content: application/json: schema: type: object required: [promptText, model] properties: promptText: type: string model: type: string ratio: type: string seed: type: integer responses: "200": description: Task created content: application/json: schema: $ref: '#/components/schemas/Task' /tasks/{id}: parameters: - in: path name: id required: true schema: type: string description: Task identifier. get: summary: Retrieve task details operationId: getTask responses: "200": description: Task details content: application/json: schema: $ref: '#/components/schemas/Task' "404": description: Task not found delete: summary: Cancel or delete a task operationId: deleteTask responses: "204": description: Task cancelled or deleted components: securitySchemes: bearerAuth: type: http scheme: bearer description: Runway API key issued via the Runway Developer Portal, supplied as a bearer token in the Authorization header. schemas: Task: type: object properties: id: type: string status: type: string enum: [PENDING, RUNNING, SUCCEEDED, FAILED, CANCELLED, THROTTLED] createdAt: type: string format: date-time output: type: array items: type: string failure: type: string failureCode: type: string