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

# Get media asset

> Retrieve a single media asset by ID.



## OpenAPI

````yaml https://api.marblecms.com/openapi.json get /v1/media/{id}
openapi: 3.1.0
info:
  title: Marble API
  version: 1.0.0
  description: A headless CMS API for managing and delivering content programmatically.
servers:
  - url: https://api.marblecms.com
    description: Production
security:
  - apiKey: []
paths:
  /v1/media/{id}:
    get:
      tags:
        - Media
      summary: Get media asset
      description: Retrieve a single media asset by ID.
      parameters:
        - schema:
            type: string
            example: cryitfjp1234jl04vdnycek8
            description: Media asset ID
          required: true
          description: Media asset ID
          name: id
          in: path
      responses:
        '200':
          description: Media asset retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MediaResponse'
        '404':
          description: Media asset not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
components:
  schemas:
    MediaResponse:
      type: object
      properties:
        media:
          $ref: '#/components/schemas/Media'
      required:
        - media
    NotFound:
      type: object
      properties:
        error:
          type: string
          example: Post not found
        message:
          type: string
          example: The requested resource does not exist
      required:
        - error
        - message
    ServerError:
      type: object
      properties:
        error:
          type: string
          example: Internal server error
        message:
          type: string
          example: Failed to fetch resource
      required:
        - error
    Media:
      type: object
      properties:
        id:
          type: string
          example: cryitfjp1234jl04vdnycek8
        name:
          type: string
          example: Hero image
        url:
          type: string
          format: uri
          example: https://cdn.marblecms.com/media/hero.jpg
        alt:
          type: string
          nullable: true
          example: A dashboard screenshot
        size:
          type: integer
          example: 382019
          description: File size in bytes
        mimeType:
          type: string
          nullable: true
          example: image/jpeg
        width:
          type: integer
          nullable: true
          example: 1600
        height:
          type: integer
          nullable: true
          example: 900
        duration:
          type: integer
          nullable: true
          example: 12000
          description: Duration in milliseconds
        blurHash:
          type: string
          nullable: true
          example: LEHV6nWB2yk8pyo0adR*.7kCMdnj
        type:
          $ref: '#/components/schemas/MediaType'
        createdAt:
          type: string
          format: date-time
          example: '2024-01-15T10:00:00Z'
        updatedAt:
          type: string
          format: date-time
          example: '2024-01-16T12:00:00Z'
      required:
        - id
        - name
        - url
        - alt
        - size
        - mimeType
        - width
        - height
        - duration
        - blurHash
        - type
        - createdAt
        - updatedAt
    MediaType:
      type: string
      enum:
        - image
        - video
        - audio
        - document
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: Your Marble API key

````