Retrieve assets
August 8, 2024
Table of contents
Runway Assets.
https://api.useapi.net/v1/runwayml/assets/
assetId
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
- API tokenis required, see Setup useapi.net for details.
Path parameter
- assetIdis required. Specify the assetId you want to retrieve.
Responses
-   { "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 }
-   { "error": "<Error message>", "code": 400 }
-   { "error": "Unauthorized", "code": 401 }
-   { "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())