---
title: "Get media by ID"
description: "Look up a media item by ID and get its type, dimensions and the URLs of each of its variants."
canonical: "https://platform.pixai.art/en/docs/api/media/getMedia"
last-updated: "2026-11-02"
---

# Get media by ID

Look up a media item by ID and get its type, dimensions and the URLs of each of its variants.



## GET https://api.pixai.art/v1/media/{mediaId}

Machine-readable OpenAPI spec: https://platform.pixai.art/openapi-spec.yaml

### Parameters

- `mediaId` (in path, string, required)
  ID of media that needs to be fetched

### Responses

- `200`
  successful operation
  Body fields:
  - `id` (string, required)
    The unique identifier for the media.
  - `type` (string, required)
  - `urls` (object[], required)
  - `urls[].variant` (string, required)
  - `urls[].url` (string, required)
  - `width` (integer, optional)
    The width of the media.
  - `height` (integer, optional)
    The height of the media.
- `404`
  Media not found
