Runway Tasks API

Retrieve status and output of asynchronous generation tasks.

OpenAPI Specification

runway-tasks-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Runway Characters Avatars Tasks API
  description: The Runway Characters API enables developers to build real-time conversational avatars powered by GWM-1, Runway's General World Model. Characters are fully custom conversational video agents that can be created from a single image with no fine-tuning required, supporting photorealistic or animated styles, human or non-human appearances. The API manages avatars, real-time sessions via WebRTC, and knowledge documents that avatars can reference during conversations. Sessions have a maximum duration of 5 minutes.
  version: '2024-11-06'
  contact:
    name: Runway Support
    url: https://support.runwayml.com/
  termsOfService: https://runwayml.com/terms-of-use
servers:
- url: https://api.dev.runwayml.com/v1
  description: Production Server
security:
- bearerAuth: []
tags:
- name: Tasks
  description: Retrieve status and output of asynchronous generation tasks.
paths:
  /tasks/{id}:
    get:
      operationId: getTask
      summary: Retrieve task status and output
      description: Retrieves the current status and output of an asynchronous image generation task by its unique identifier. Poll this endpoint until the task status indicates completion. When a task succeeds, the response includes output URLs linking to the generated image.
      tags:
      - Tasks
      parameters:
      - $ref: '#/components/parameters/RunwayVersion'
      - $ref: '#/components/parameters/TaskId'
      responses:
        '200':
          description: Task status retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '401':
          description: Unauthorized - invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Task not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      operationId: deleteTask
      summary: Cancel or delete a task
      description: Cancels a pending task or deletes a completed task by its unique identifier. This operation cannot be undone.
      tags:
      - Tasks
      parameters:
      - $ref: '#/components/parameters/RunwayVersion'
      - $ref: '#/components/parameters/TaskId'
      responses:
        '204':
          description: Task deleted successfully
        '401':
          description: Unauthorized - invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Task not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  parameters:
    RunwayVersion:
      name: X-Runway-Version
      in: header
      required: true
      description: API version identifier. Must be set to the exact value 2024-11-06.
      schema:
        type: string
        enum:
        - '2024-11-06'
    TaskId:
      name: id
      in: path
      required: true
      description: The unique identifier of the task, returned when the task was created.
      schema:
        type: string
        format: uuid
  schemas:
    TaskResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the task.
        status:
          type: string
          description: The current status of the task.
          enum:
          - PENDING
          - PROCESSING
          - SUCCEEDED
          - FAILED
          - CANCELLED
        createdAt:
          type: string
          format: date-time
          description: The timestamp when the task was created.
        output:
          type: array
          description: One or more URLs linking to the generated output image. Only present when the task status is SUCCEEDED.
          items:
            type: string
            format: uri
        failure:
          type: string
          description: A description of the failure reason. Only present when the task status is FAILED.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: A human-readable error message describing what went wrong.
        code:
          type: string
          description: A machine-readable error code identifying the type of error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key passed via the HTTP Authorization header using the Bearer scheme. Obtain your API key from the Runway Developer Portal at https://dev.runwayml.com/.
externalDocs:
  description: Runway Characters Documentation
  url: https://docs.dev.runwayml.com/characters/