> ## 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.

# Get media status

> Check whether an uploaded video has finished processing and is ready to post.

Both upload endpoints answer a video with `"status": "processing"` while PostQueen prepares it, which takes from a few seconds to a few minutes. Ask again with the media `id` until `status` changes:

| Status       | What to do                                                                                       |
| ------------ | ------------------------------------------------------------------------------------------------ |
| `processing` | Wait a few seconds and ask again                                                                 |
| `ready`      | Put it on a post, with the `id` and `path` from **this** answer: a converted file has a new path |
| `failed`     | Read `processingError`, then upload another file                                                 |

An id that is not in your workspace answers `404 Media not found`.


## OpenAPI

````yaml GET /media/{id}/status
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, and a request
    refused with `400` counts too. `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/{id}/status:
    get:
      tags:
        - Media
      summary: Get media status
      description: >-
        Whether an uploaded file is ready to put on a post. A video answers the
        upload endpoints with `status: "processing"` and is ready a few seconds
        to a few minutes later, possibly with a new `path`. Use the `path` this
        returns once `status` is `ready`. `failed` carries the reason in
        `processingError`.
      operationId: getMediaStatus
      parameters:
        - name: id
          in: path
          required: true
          description: The media id from an upload
          schema:
            type: string
      responses:
        '200':
          description: The media row
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  originalName:
                    type:
                      - string
                      - 'null'
                  path:
                    type: string
                  thumbnail:
                    type:
                      - string
                      - 'null'
                  alt:
                    type:
                      - string
                      - 'null'
                  status:
                    type: string
                    enum:
                      - ready
                      - processing
                      - failed
                  processingError:
                    type:
                      - string
                      - 'null'
              example:
                id: e639003b-f727-4a1e-87bd-74a2c48ae41e
                name: f6g7h8i9j0.mp4
                originalName: clip.mov
                path: https://cdn.example.com/f6g7h8i9j0.mp4
                thumbnail: https://cdn.example.com/f6g7h8i9j0.jpg
                alt: null
                status: ready
                processingError: null
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: '`Media not found`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NestError'
              example:
                statusCode: 404
                message: Media not found
components:
  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
  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
  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.

````