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

# Get Media

> Returns a specified piece of media, such as a video clip or thumbnail image captured for a camera event, with a short-lived URL from which you can download it.

Returns a specified piece of media, such as a video clip or thumbnail image captured for a camera event, with a short-lived URL from which you can download it. Camera events list their media in `media_ids`. This endpoint is in beta.


## OpenAPI

````yaml /openapi.json get /media/get
openapi: 3.0.0
info:
  description: >-
    Programmable API to control locks, thermostats, noise sensors, cameras,
    access control systems, and other IoT devices.


    Prefer the official Seam SDKs over hand-written HTTP calls: they handle

    authentication, request serialization, pagination, and error handling for

    you. The official SDKs are listed in this document under

    `info.x-seam-sdks`.


    If you call the HTTP API directly, your query parameters must be

    serialized compatibly with the Seam API. There is no universal convention

    for serializing arrays, booleans, or nested objects in a query string, so

    use @seamapi/url-search-params-serializer, the language specific serializer
    module provided by each Seam SDK, or follow its specification:

    https://github.com/seamapi/url-search-params-serializer
  title: Seam Connect
  version: 1.0.0
  x-seam-query-serializer:
    description: >-
      Reference implementation and specification for query parameter
      serialization compatible with the Seam API.
    url: https://github.com/seamapi/url-search-params-serializer
  x-seam-sdks:
    - language: javascript
      url: https://github.com/seamapi/javascript
    - language: python
      url: https://github.com/seamapi/python
    - language: ruby
      url: https://github.com/seamapi/ruby
    - language: php
      url: https://github.com/seamapi/php
    - language: csharp
      url: https://github.com/seamapi/csharp
servers:
  - url: https://connect.getseam.com
security: []
tags:
  - description: access_codes
    name: /access_codes
  - description: acs
    name: /acs
  - description: action_attempts
    name: /action_attempts
  - description: client_sessions
    name: /client_sessions
  - description: connected_accounts
    name: /connected_accounts
  - description: connect_webviews
    name: /connect_webviews
  - description: devices
    name: /devices
  - description: events
    name: /events
  - description: health
    name: /health
  - description: locks
    name: /locks
  - description: networks
    name: /networks
  - description: noise_sensors
    name: /noise_sensors
  - description: phones
    name: /phones
  - description: thermostats
    name: /thermostats
  - description: user_identities
    name: /user_identities
  - description: webhooks
    name: /webhooks
  - description: workspaces
    name: /workspaces
paths:
  /media/get:
    get:
      tags: []
      summary: Get Media
      description: >-
        Returns a specified piece of media, such as a video clip or thumbnail
        image captured for a camera event, with a short-lived URL from which you
        can download it. Camera events list their media in `media_ids`. This
        endpoint is in beta.
      operationId: mediaGetGet
      parameters:
        - in: query
          name: media_id
          required: true
          schema:
            description: ID of the media that you want to get.
            format: uuid
            type: string
        - in: query
          name: format
          required: false
          schema:
            default: json
            description: >-
              Response format. `json` returns the media object. `redirect`
              responds with a `302` redirect to the media's download URL, so you
              can use this endpoint directly as the source of an image or video.
            enum:
              - json
              - redirect
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  media:
                    $ref: '#/components/schemas/media'
                required:
                  - media
                type: object
          description: OK
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      security:
        - api_key: []
        - pat_with_workspace: []
        - console_session_with_workspace: []
        - client_session: []
        - client_session_with_customer: []
        - client_session_with_customer_ro: []
        - support_read_only_token: []
components:
  schemas:
    media:
      description: >-
        Represents a piece of media, such as a video clip or a thumbnail image,
        that a device captured for an event. Media is in beta. See the [media
        object](https://www.seam.co/docs/api/media/object).
      properties:
        content_type:
          description: MIME type of the media, such as `video/mp4` or `image/jpeg`.
          nullable: true
          type: string
        created_at:
          description: Date and time at which the media was created.
          format: date-time
          type: string
        device_id:
          description: ID of the device that captured the media.
          format: uuid
          nullable: true
          type: string
        event_id:
          description: ID of the event that the media belongs to.
          format: uuid
          nullable: true
          type: string
        expires_at:
          description: >-
            Date and time at which the media stops being available. Null when
            Seam does not know when the media expires.
          format: date-time
          nullable: true
          type: string
        media_id:
          description: ID of the media.
          format: uuid
          type: string
        media_type:
          description: 'Type of the media: a video clip or a still image.'
          enum:
            - video
            - image
          type: string
        status:
          description: >-
            Status of the media. `pending` means that Seam is still retrieving
            the media. `available` means that `url` can be used to download it.
            `unavailable` means that no media exists for the event, and `failed`
            means that Seam could not retrieve it.
          enum:
            - pending
            - available
            - unavailable
            - failed
          type: string
        url:
          description: >-
            Short-lived URL from which you can download the media. Null unless
            `status` is `available`. The URL expires after about five minutes.
            Call `/media/get` again for a new URL.
          format: uri
          nullable: true
          type: string
        workspace_id:
          description: ID of the workspace that contains the media.
          format: uuid
          type: string
      required:
        - media_id
        - workspace_id
        - device_id
        - event_id
        - media_type
        - content_type
        - status
        - url
        - expires_at
        - created_at
      type: object
      x-route-path: /media
  securitySchemes:
    api_key:
      bearerFormat: API Key
      scheme: bearer
      type: http
    pat_with_workspace:
      bearerFormat: API Token
      scheme: bearer
      type: http
    console_session_with_workspace:
      bearerFormat: Console Session Token
      scheme: bearer
      type: http
    client_session:
      bearerFormat: Client Session Token
      scheme: bearer
      type: http
    client_session_with_customer:
      bearerFormat: Customer Client Session Token
      scheme: bearer
      type: http
    client_session_with_customer_ro:
      bearerFormat: Customer Client Session Token (Read-Only)
      scheme: bearer
      type: http
    support_read_only_token:
      bearerFormat: Support Read-Only Token
      scheme: bearer
      type: http

````