PixAI Platform
API v2 DocumentationMedia

Get media URLs by ID

Resolves up to 100 media IDs to their URLs, for example the outputs.mediaIds or outputs.videoMediaId of a finished task. No authentication is needed for public media.

IDs that do not exist are left out, and the order of the result is not guaranteed, so match items by id.

GET
/media/batch

Authorization

bearerAuth
AuthorizationBearer <token>

In all requests that require authentication

In: header

Query Parameters

ids*|array<>

Comma-separated media IDs, 1 to 100, e.g. ?ids=1,2,3. Repeating the parameter (?ids=1&ids=2) also works.

Response Body

application/json

curl -X GET "https://api.pixai.art/v2/media/batch?ids=string"
[
  {
    "id": "string",
    "type": "IMAGE",
    "urls": [
      {
        "variant": "PUBLIC",
        "url": "string"
      }
    ],
    "width": 0,
    "height": 0,
    "fileUrl": "string",
    "hlsUrl": "string",
    "thumbnailUrl": "string",
    "duration": 0
  }
]