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

# Screenshot a step

> A PNG of one step as the room will see it: the slide's page with its cards, text, shapes and images on it, or the full-screen poll the way the audience screen draws it. Beside the picture come the numbers: every element's rect, the pairs that overlap, `warnings` for a card too small to read or over another card or text box, `coversPageText`, the PDF page's own words a card or text box hides, and `measured`, each card and text box as the drawing measured it: cut off by its box, and how high its biggest answer text is drawn. Send `annotate` to have every element's box and name drawn on the picture, the clashing ones in red and the hidden words tinted; `element` to crop to one element, the way Paper screenshots one node; `scale` 2 for twice the pixels. Rendered on the server in a real browser, so the first look takes a few seconds; the same step at the same revision comes straight back. Through MCP the image arrives as an image; over HTTP, read `png` as a data URL or send `Accept: image/png` for the bytes.

Needs the `decks:read` scope.



## OpenAPI

````yaml https://test.polltheroom.com/openapi.json get /api/v1/decks/{id}/steps/{index}/screenshot
openapi: 3.1.0
info:
  title: Poll the Room API
  version: '1'
  description: >-
    Live polls on a presenter's own slides. A presenter (or an agent acting for
    one) builds a deck; the audience joins on their phones with a six-digit code
    and never signs up.


    Keys are made under Settings › API and sent as `Authorization: Bearer
    ptr_…`. A key belongs to a team, carries scopes, and is rate limited per
    hour. Plans: Free may decks:read, decks:write, rooms:read, results:read at
    60 requests an hour; Pro may decks:read, decks:write, rooms:read,
    rooms:start, results:read at 1000 requests an hour.


    The same verbs are MCP tools at https://test.polltheroom.com/api/mcp. The
    full reference is at https://test.polltheroom.com/llms-full.txt.
servers:
  - url: https://test.polltheroom.com
security:
  - apiKey: []
tags:
  - name: decks
    description: A deck is a document the editor and the API both read and write.
  - name: rooms
    description: A room is one live session of a deck.
paths:
  /api/v1/decks/{id}/steps/{index}/screenshot:
    get:
      tags:
        - decks
      summary: Screenshot a step
      description: >-
        A PNG of one step as the room will see it: the slide's page with its
        cards, text, shapes and images on it, or the full-screen poll the way
        the audience screen draws it. Beside the picture come the numbers: every
        element's rect, the pairs that overlap, `warnings` for a card too small
        to read or over another card or text box, `coversPageText`, the PDF
        page's own words a card or text box hides, and `measured`, each card and
        text box as the drawing measured it: cut off by its box, and how high
        its biggest answer text is drawn. Send `annotate` to have every
        element's box and name drawn on the picture, the clashing ones in red
        and the hidden words tinted; `element` to crop to one element, the way
        Paper screenshots one node; `scale` 2 for twice the pixels. Rendered on
        the server in a real browser, so the first look takes a few seconds; the
        same step at the same revision comes straight back. Through MCP the
        image arrives as an image; over HTTP, read `png` as a data URL or send
        `Accept: image/png` for the bytes.


        Needs the `decks:read` scope.
      operationId: get_screenshot
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            description: The deck's id
        - name: index
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
            maximum: 9007199254740991
            description: The step's index; the join screen (0) has no picture
        - name: scale
          in: query
          required: false
          schema:
            description: 1 (the default) for 1600 pixels wide, 2 for 3200
            type: integer
            minimum: 1
            maximum: 2
        - name: element
          in: query
          required: false
          schema:
            description: 'Crop to this element, as get_step names it: "overlay 0", "text 1"'
            type: string
            pattern: ^(overlay|text|shape|image) \d+$
        - name: annotate
          in: query
          required: false
          schema:
            description: Draw every element's box and name on the picture, clashes in red
            anyOf:
              - type: boolean
              - type: string
                enum:
                  - 'true'
                  - 'false'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  png:
                    type: string
                    description: The image, as a data URL
                  width:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: Pixels
                  height:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: Pixels
                  revision:
                    type: string
                    description: The deck's revision this picture shows
                  elements:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: >-
                            "overlay 0", "text 1": the list and the index, as
                            the step verbs address it
                        kind:
                          type: string
                          enum:
                            - overlay
                            - text
                            - shape
                            - image
                        index:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        rect:
                          type: object
                          properties:
                            x:
                              type: number
                              minimum: 0
                              maximum: 1
                            'y':
                              type: number
                              minimum: 0
                              maximum: 1
                            w:
                              type: number
                              minimum: 0.02
                              maximum: 1
                            h:
                              type: number
                              minimum: 0.02
                              maximum: 1
                          required:
                            - x
                            - 'y'
                            - w
                            - h
                          additionalProperties: false
                        z:
                          type: number
                          description: Stacking order; higher is on top
                        label:
                          type: string
                          description: >-
                            The card's question, the text box's first words, the
                            shape's kind, or image
                      required:
                        - id
                        - kind
                        - index
                        - rect
                        - z
                        - label
                      additionalProperties: false
                  overlaps:
                    type: array
                    items:
                      type: object
                      properties:
                        a:
                          type: string
                        b:
                          type: string
                        covered:
                          type: number
                          description: >-
                            How much of the smaller element the other covers, 0
                            to 1
                      required:
                        - a
                        - b
                        - covered
                      additionalProperties: false
                    description: >-
                      Pairs of elements that sit on top of each other; empty
                      when nothing overlaps
                  warnings:
                    type: array
                    items:
                      type: object
                      properties:
                        element:
                          type: string
                          description: The element it is about, "overlay 0", "text 1"
                        with:
                          description: The other element, for an overlap
                          type: string
                        message:
                          type: string
                          description: What is wrong and what to do
                      required:
                        - element
                        - message
                      additionalProperties: false
                    description: >-
                      What on this slide will not read well: a card too small to
                      read, a card or text box over another
                  coversPageText:
                    type: array
                    items:
                      type: object
                      properties:
                        element:
                          type: string
                        text:
                          type: string
                          description: The first of the page's words it hides
                        hidden:
                          type: number
                          description: How much of those lines it hides, 0 to 1
                      required:
                        - element
                        - text
                        - hidden
                      additionalProperties: false
                    description: >-
                      Cards and text boxes over the PDF page's own text. Words
                      drawn inside a picture on the page are pixels, not text,
                      so look at the picture for those
                  measured:
                    type: array
                    items:
                      type: object
                      properties:
                        element:
                          type: string
                        clipped:
                          type: boolean
                          description: Something inside is cut off by its box
                        overflowPx:
                          type: number
                          description: >-
                            By how many pixels the content outgrows its box; a
                            few are padding
                        textPx:
                          anyOf:
                            - type: number
                            - type: 'null'
                          description: >-
                            How high a card's biggest answer text is drawn, in
                            pixels on the 1600-pixel slide; null for a text box
                            or a card with no answer text
                      required:
                        - element
                        - clipped
                        - overflowPx
                        - textPx
                      additionalProperties: false
                    description: >-
                      Each card and text box as the drawing measured it after
                      paint. How small a card can go depends on its look, so
                      this, not a fraction, says whether it fits
                required:
                  - png
                  - width
                  - height
                  - revision
                  - elements
                  - overlaps
                  - warnings
                  - coversPageText
                  - measured
                additionalProperties: false
        '401':
          description: No usable key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The key lacks the scope, or the plan does not sell it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Nothing by that id within this key's reach.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Over the key's hourly limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: What went wrong, in a sentence
        fix:
          description: What to do about it, when we can tell
          type: string
      required:
        - error
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        An API key from Settings › API, sent as `Authorization: Bearer ptr_…`.
        Shown once when made; only a hash is stored.

````