Retrieve assets

August 8, 2024

Table of contents

  1. Request Headers
  2. Path parameter
  3. Responses
  4. Model
  5. Examples
  6. Try It

Runway Assets.

https://api.useapi.net/v1/runwayml/assets/assetId

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
Path parameter
  • assetId is required. Specify the assetId you want to retrieve.
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": "Race car.jpg",
        "url": "<asset url>",
        "previewUrls": ["<asset preview url>"],
        "mediaType": "image",
        "fileCount": 1,
        "fileSize": 123456,
        "fileExtStandardized": "jpeg",
        "isUserUpload": true,
        "metadata": null,
        "username": "<user name>",
        "userId": 123456789,
        "createdBy": 123456789,
        "userPicture": null,
        "private": true,
        "privateInTeam": true,
        "parentAssetGroupId": null,
        "favorite": false
    }
    
  • 400 Bad Request

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

    {
      "error": "Unauthorized",
      "code": 401
    }
    
  • 404 Not Found

    {
        "error": "Not found.",
        "code": 404
    }
    
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/assetId" \
       -H "Accept: application/json" \
       -H "Authorization: Bearer …" 
    
  • const token = "API token";
    const assetId = "assetId to retrieve"; 
    const apiUrl = `https://api.useapi.net/v1/runwayml/assets/${assetId}`; 
    const response = await fetch(apiUrl, {
      headers: {
        "Authorization": `Bearer ${token}`,
      },
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    token = "API token"
    assetId = "assetId to retrieve"
    apiUrl = f"https://api.useapi.net/v1/runwayml/assets/{assetId}"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    response = requests.get(apiUrl, headers=headers)
    print(response, response.json())
    
Try It