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

> ## Agent Instructions
> PostQueen's hosted API is https://api.postqueen.ai. The public API base is https://api.postqueen.ai/public/v1 and takes the raw API key in the Authorization header, with no Bearer prefix.
> The MCP server for posting is https://api.postqueen.ai/mcp/YOUR_API_KEY (or /mcp with Authorization: Bearer YOUR_API_KEY). docs.postqueen.ai/mcp only searches these docs and cannot post.
> The API key is under Connections > API Keys in the app, and only workspace admins can see it.

# List media

> Page through the media library to reuse a file in a post instead of uploading it again.

The library comes newest first, 18 files to a page. `pages` says how many pages there are, so ask for `page=2`, `page=3` and so on until you reach it. `page` starts at `1` and is read as a whole number, so `1.5` reads as `1` and `2abc` as `2`. `0`, a negative number or a value that is not a number, such as `abc`, answers `400`.

Each file carries only what a post needs: put its `id` and `path` in `image`, exactly as [Create a post](/public-api/posts/create) takes them. `originalName` is the name the file was uploaded with, and `search` matches part of it, with upper and lower case alike:

```bash theme={"dark"}
curl "https://api.postqueen.ai/public/v1/media?search=launch&page=1" \
  -H "Authorization: YOUR_API_KEY"
```

A video that is still being converted is left out until it is ready. To follow one you just uploaded, use [Get media status](/public-api/uploads/media-status) with the id the upload returned.


## OpenAPI

````yaml GET /media
openapi: 3.1.0
info:
  title: PostQueen Public API
  version: 1.0.0
  license:
    name: MIT
    identifier: MIT
  description: >-
    Schedule posts, upload media, read analytics and manage the channels of your
    PostQueen workspace.


    ## Authentication


    Send your API key in the `Authorization` header exactly as it is, with no
    prefix:


    ```

    Authorization: YOUR_API_KEY

    ```


    The key is under **Connections > API Keys** in the app. Only a workspace
    Admin or Super Admin can reveal or rotate it. An app your users sign in to
    with OAuth sends its `pos_` access token in the same header, also with no
    prefix. The workspace needs a subscription, and the free trial counts.


    ## Rate limits


    A workspace can send 30 `POST /posts` requests an hour. A request refused
    with `400` or `422` during validation gets its slot back; one refused once
    the posts are being created counts. `POST /upload` and `POST
    /upload-from-url` allow 300 requests an hour each, per workspace. Nothing
    else is limited. A limited endpoint answers with `X-RateLimit-Limit`,
    `X-RateLimit-Remaining` and `X-RateLimit-Reset` headers, and over the limit
    with `429` and `Retry-After` (seconds).


    ## Terminology


    The app says channel, the API says integration. They are the same thing: a
    connected account on a network.
servers:
  - url: https://api.postqueen.ai/public/v1
    description: PostQueen
security:
  - ApiKeyAuth: []
tags:
  - name: Channels
    description: Connected channels. The API calls them integrations.
  - name: Posts
    description: Create, list, change and delete posts
  - name: Media
    description: Upload files to the media library
  - name: Clipping
    description: >-
      Turn a YouTube video into short vertical clips. Not available on PostQueen
      yet
  - name: AI video
    description: Generate a video with AI into the media library
  - name: Analytics
    description: Channel and post metrics
  - name: Notifications
    description: The workspace's notifications
  - name: OAuth
    description: Sign-in for apps that act for other PostQueen workspaces
paths:
  /media:
    get:
      tags:
        - Media
      summary: List media
      description: >-
        Your media library, newest first, 18 items to a page. Each item carries
        what a post needs to attach it: `id` and `path` go into `image` as they
        are. Videos that are still being converted are left out until they are
        ready.
      operationId: listMedia
      parameters:
        - name: page
          in: query
          required: false
          description: 'The page, from 1. Default 1. Read as a whole number: `1.5` is 1'
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: search
          in: query
          required: false
          description: >-
            Only files whose original name contains this text. Upper and lower
            case match alike
          schema:
            type: string
      responses:
        '200':
          description: One page of the media library
          content:
            application/json:
              schema:
                type: object
                properties:
                  pages:
                    type: integer
                    description: >-
                      How many pages there are for this search. `0` when the
                      library is empty
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                          description: The stored file name
                        originalName:
                          type:
                            - string
                            - 'null'
                          description: The file name it was uploaded with
                        path:
                          type: string
                          description: The file's address. Put it in `image` with the `id`
                        createdAt:
                          type: string
                          format: date-time
              example:
                pages: 3
                results:
                  - id: e639003b-f727-4a1e-87bd-74a2c48ae41e
                    name: f6g7h8i9j0.mp4
                    originalName: clip.mov
                    path: https://cdn.example.com/f6g7h8i9j0.mp4
                    createdAt: '2026-10-01T09:00:00.000Z'
        '400':
          description: >-
            `page` is 0, negative or not a number. It is read with `parseInt`,
            so `1.5` reads as 1 and `2abc` as 2
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NestError'
              example:
                statusCode: 400
                message:
                  - page must not be less than 1
                error: Bad Request
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    NestError:
      type: object
      description: >-
        The standard error shape: validation errors, not-found errors and rate
        limits
      properties:
        statusCode:
          type: integer
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        error:
          type: string
    MessageError:
      type: object
      description: The error shape of most checks written into the public API itself
      properties:
        msg:
          type: string
  responses:
    Unauthorized:
      description: >-
        `No API Key found`, `Invalid API key`, `Invalid OAuth token`, or `No
        subscription found` when the workspace has no subscription
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageError'
          example:
            msg: Invalid API key
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Your API key from Connections > API Keys, or an OAuth access token
        (`pos_...`). Send it as it is, with no `Bearer` prefix.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.