Retrieve assets

August 8, 2024

Table of contents

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

Runway Assets.

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

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…50.
  • mediaType is optional. Specify which asset media types you want to retrieve.
    Supported values: video, image and audio.
Responses
  • 200 OK

    [
        {
            "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",
            "name": "Gen-3 Alpha 35801490234, funny cats jumping over.mp4",
            "url": "<assets url>",
            "previewUrls": ["<asset preview url>"],
            "mediaType": "video",
            "mediaSubtype": null,
            "fileCount": 1,
            "fileSize": 1234567,
            "fileExtStandardized": "mp4",
            "isUserUpload": false,
            "metadata": {
                "frameRate": 24,
                "duration": 10.542,
                "dimensions": [
                    1280,
                    768
                ],
                "size": {
                    "width": 1280,
                    "height": 768
                }
            },
            "username": "<user name>",
            "userPicture": null,
            "userId": 123456789,
            "createdBy": 123456789,
            "private": true,
            "privateInTeam": true,
            "parentAssetGroupId": "<uuid>",
            "taskId": "user:user_id-runwayml:account_email-task:task_uuid",
            "favorite": false,
        }
    ]
    
  • 400 Bad Request

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

    {
      "error": "Unauthorized",
      "code": 401
    }
    
Model
{ // TypeScript, all fields are optional
    assetId: string,
    id: string,
    createdAt: string,
    updatedAt: string,
    name: string,
    url: string,
    previewUrls: string[],
    mediaType: string,
    mediaSubtype: string,
    fileCount: number,
    fileSize: number,
    fileExtStandardized: string,
    isUserUpload: boolean,
    metadata: {
      frameRate: number,
      duration: number,
      dimensions: number[],
      size: {
          width: number,
          height: number
      }
    },
    username: string,
    userPicture: string,
    userId: number,
    createdBy: number,
    private: boolean,
    privateInTeam: boolean,
    parentAssetGroupId: string,
    taskId: string,
    favorite: boolean
}[]
Examples
  • curl "https://api.useapi.net/v1/runwayml/assets/?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/assets/?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/assets/?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