Retrieve tasks

Table of contents

  1. Request Headers
  2. Query Parameters
  3. Responses
  4. Model
  5. Examples
  6. Try It

https://api.useapi.net/v1/runwayml/tasks/?…

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
Query Parameters
  • email is optional when only one account configured. However, if you have multiple accounts configured, this parameter becomes required.
  • offset is required. This parameter is used to facilitate pagination.
    Valid range 0…1000.
  • limit is required . This parameter is used to facilitate pagination.
    Valid range 1…1000.
  • statuses is optional. Filter results by a comma-separated list of task statuses, e.g. PENDING,RUNNING,THROTTLED.
    Supported values: PENDING, RUNNING, THROTTLED, SUCCEEDED and FAILED.
Responses
  • 200 OK
    Retrieving taskId …/tasks/?taskId=task_id

    {
        "taskId": "user:user_id-runwayml:account_email-task:task_uuid"
        "id": "<task uuid>",
        "name": "Gen-3 Alpha 123456, Slow motion zoom in, cat chasing dog in the kitchen",
        "image": null,
        "createdAt": "2024-08-01T01:02:03.456Z",
        "updatedAt": "2024-08-01T01:02:03.456Z",
        "taskType": "gen3a",
        "options": {
          "name": "Gen-3 Alpha 123456789, Slow motion zoom in, cat chasing dog in the kitchen",
          "seconds": 5,
          "text_prompt": "Slow motion zoom in",
          "seed": 123456789,
          "exploreMode": true,
          "watermark": false,
          "enhance_prompt": false,
          "init_image": "<asset image url>",
          "resolution": "720p",
          "assetGroupName": "Generative Video",
          "recordingEnabled": true
        },
        "status": "SUCCEEDED",
        "error": null,
        "progressText": null,
        "progressRatio": "1",
        "estimatedTimeToStartSeconds": null,
        "artifacts": [
          {
            "assetId": "user:user_id-runwayml:account_email-asset:asset_uuid",
            "id": "<asset uuid>",
            "createdAt": "2024-08-01T01:02:03.456Z",
            "updatedAt": "2024-08-01T01:02:03.456Z",
            "userId": 1234567,
            "createdBy": 1234567,
            "taskId": "user:user_id-runwayml:account_email-task:task_uuid",
            "parentAssetGroupId": "<group uuid>",
            "filename": "Gen-3 Alpha 123456789, Slow motion zoom in, cat chasing dog in the kitchen",
            "url": "<asset url>",
            "fileSize": "12345678",
            "isDirectory": false,
            "previewUrls": ["<asset preview url>"],
            "private": true,
            "privateInTeam": true,
            "deleted": false,
            "reported": false,
            "metadata": {
              "frameRate": 24,
              "duration": 5.209,
              "dimensions": [
                1280,
                768
              ],
              "size": {
                "width": 1280,
                "height": 768
              }
            },
            "favorite": false        
          }
        ],
        "sharedAsset": null    
    }
    
  • 400 Bad Request

    {
        "error": "<Error message>",
        "code": 400
    }
    
  • 401 Unauthorized

    {
      "error": "Unauthorized",
      "code": 401
    }
    
Model
{ // TypeScript, all fields are optional
  taskId: string,
  id: string,
  name: string,
  image: string,
  createdAt: string,
  updatedAt: string,
  taskType: string,
  options: {
    name: string,
    seconds: number,
    gen2Options: {
      mode: string,
      text_prompt: string,
      seed: number,
      interpolate: boolean,
      upscale: boolean,
      watermark: boolean,
      motion_score: number,
      use_motion_score: boolean,
      use_motion_vectors: boolean,
      style: string,
      width: number,
      height: number,
      motion_vector: {
        x: number,
        y: number,
        r: number,
        z: number,
        bg_x_pan: number,
        bg_y_pan: number
      },
      init_video: string,
      image_prompt: string,
      init_image: string,
      extended_from_task_id: string
    },
    gen_audio_options: {
      name: string,
      text: string,
      voice_id: string,
      model_id: string
    },
    paid_user_watermark_override: boolean,
    recordingEnabled: boolean,
    exploreMode: boolean,
    assetGroupName: string,
    image: string,
    video: string,
    image_asset_id: string,
    video_asset_id: string,
    audio: string,
    audio_asset_id: string
    watermark: boolean,
    text_prompt: string,
    seed: number,
    image_as_end_frame: boolean,
    init_video: string,
    extended_from_task_id: string
  },
  status: string,
  error: {
    errorMessage: string,
    reason: string,
    message: string,
    moderation_category: string,
    tally_asimov: boolean
  },
  progressText: string,
  progressRatio: string,
  estimatedTimeToStartSeconds: number,
  assetId: string,
  sharedAsset: any,
  artifacts: {
    taskId: string,
    id: string,
    createdAt: string,
    updatedAt: string,
    userId: number,
    createdBy: number,
    parentAssetGroupId: string,
    filename: string,
    url: string,
    fileSize: string,
    isDirectory: boolean,
    previewUrls: string[],
    private: boolean,
    privateInTeam: boolean,
    deleted: boolean,
    reported: boolean,
    metadata: {
      frameRate: number,
      duration: number,
      dimensions: [number, number],
      size: {
        width: number,
        height: number
      }
    },
    favorite: boolean,
  }[]
}
Examples
  • curl "https://api.useapi.net/v1/runwayml/tasks/?offset=0&limit=50&email=email" \
       -H "Accept: application/json" \
       -H "Authorization: Bearer …" 
    
  • const token = "API token";
    const email = "Previously configured email"; 
    const apiUrl = `https://api.useapi.net/v1/runwayml/tasks/?offset=0&limit=50&email=${email}`; 
    const response = await fetch(apiUrl, {
      headers: {
        "Authorization": `Bearer ${token}`,
      },
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    token = "API token"
    email = "Previously configured email"
    apiUrl = f"https://api.useapi.net/v1/runwayml/tasks/?offset=0&limit=50&email={email}"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    response = requests.get(apiUrl, headers=headers)
    print(response, response.json())
    
Try It