> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve Media Asset

> Retrieves a media asset by ID. Poll this while the asset is `processing`.



## OpenAPI

````yaml /openapi/api-v1-native.yml get /media/{id}
openapi: 3.1.0
info:
  title: Whop API
  description: >-
    Hand-written V1 endpoints. Merged into the GraphqlRestProxy-generated schema
    at build time.
  version: v1
servers:
  - url: https://{defaultHost}
    variables:
      defaultHost:
        default: api.whop.com/api/v1
security: []
paths:
  /media/{id}:
    get:
      tags:
        - Media
      summary: Retrieve Media Asset
      description: >-
        Retrieves a media asset by ID. Poll this while the asset is
        `processing`.
      operationId: retrieveMediaAsset
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: Media asset ID, prefixed `media_`.
      responses:
        '200':
          description: Media asset retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MediaAsset'
        '404':
          $ref: '#/components/responses/NotFound'
          description: >-
            Unknown media asset, including generation jobs not created through
            this API.
      security:
        - bearerAuth:
            - media:read
components:
  schemas:
    MediaAsset:
      type: object
      properties:
        id:
          type: string
          description: Media asset ID, prefixed `media_`.
        media_type:
          type: string
          description: The kind of media this asset holds.
          enum:
            - video
            - image
          example: video
        source:
          type: string
          description: How the asset was created. Always `generated`.
          enum:
            - generated
          example: generated
        status:
          type: string
          description: >-
            Lifecycle state: `processing` while generation runs, `ready` when
            the file is available, `failed` when generation failed and the
            charge was refunded.
          enum:
            - processing
            - ready
            - failed
          example: processing
        amount_charged:
          type:
            - number
            - 'null'
          description: >-
            USD amount charged to the account's balance for this generation.
            `null` if the generation wasn't billed.
        currency:
          type: string
          description: Currency of `amount_charged`. Always `usd`.
        error_message:
          type:
            - string
            - 'null'
          description: Why generation failed. `null` unless status is `failed`.
        created_at:
          type: string
          description: ISO 8601 timestamp when the generation was requested.
        completed_at:
          type:
            - string
            - 'null'
          description: >-
            ISO 8601 timestamp when the asset reached a terminal state. `null`
            while `processing`.
        generation:
          $ref: '#/components/schemas/MediaAssetGeneration'
          description: The inputs the asset was generated from.
        file:
          description: >-
            The produced file, usable anywhere attachments are accepted. `null`
            until the asset is `ready`.
          oneOf:
            - $ref: '#/components/schemas/MediaAssetFile'
            - type: 'null'
      required:
        - id
        - media_type
        - source
        - status
        - amount_charged
        - currency
        - error_message
        - created_at
        - completed_at
        - generation
        - file
    MediaAssetGeneration:
      type: object
      properties:
        prompt:
          type: string
          description: What the asset was generated from.
        reference_media:
          type: array
          items:
            type: string
            description: >-
              Reference image file IDs (`file_` prefixed) supplied at generation
              time.
        duration_seconds:
          type:
            - number
            - 'null'
          description: Requested video length in seconds. `null` for images.
        resolution:
          type:
            - string
            - 'null'
          description: >-
            Requested video resolution. `null` for images. `1080p` is not
            supported by Seedance 2.0 Fast or Mini; `4k` is only supported by
            Seedance 2.0.
          enum:
            - 480p
            - 720p
            - 1080p
            - 4k
            - null
          example: 480p
      required:
        - prompt
        - reference_media
        - duration_seconds
        - resolution
    MediaAssetFile:
      type: object
      properties:
        id:
          type: string
          description: File ID, prefixed `file_`.
        url:
          type: string
          description: CDN URL for downloading the file.
      required:
        - id
        - url
    V1ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              description: Machine-readable error code.
            message:
              type: string
              description: Human-readable error message.
          required:
            - type
            - message
      required:
        - error
  responses:
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/V1ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: auth-scheme
      description: >-
        An account API key, account scoped JWT, app API key, or user OAuth
        token.

````