openapi: 3.0.3
info:
    title: webshot
    description: The Webshot Service is the single source of truth for...
    version: 1.0.0
servers:
    - url: https://webshot.platform.arb.inc
paths:
    /:
        get:
            summary: Get basic service information
            description: Returns a plain text welcome message with the service name and creation date.
            operationId: getRoot
            responses:
                '200':
                    description: Successfully retrieved welcome message.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: Welcome to the webshot service. Created on October 14, 2025 by Al Beebe
            tags:
                - /
    /screenshots/create:
        post:
            summary: Make a screenshot from a web page
            description: Takes a URL and optional size info, then returns a PNG image.
            operationId: createScreenshot
            security:
                - bearerAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            required:
                                - url
                            properties:
                                url:
                                    type: string
                                    description: Webpage URL to capture.
                                    example: "https://example.com"
                                width:
                                    type: integer
                                    description: Optional viewport width in pixels (0 or unset means full page). If provided, height must also be provided.
                                    minimum: 0
                                    maximum: 5000
                                    example: 1280
                                height:
                                    type: integer
                                    description: Optional viewport height in pixels (0 or unset means full page). If provided, width must also be provided.
                                    minimum: 0
                                    maximum: 5000
                                    example: 720
            responses:
                '200':
                    description: Screenshot PNG stream.
                    content:
                        image/png:
                            schema:
                                type: string
                                format: binary
                                description: Binary PNG image.
                                example: "iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQ..."
                '502':
                    description: Could not load the webpage to capture.
                    content:
                        text/plain:
                            schema:
                                type: string
                                example: "Unable to load webpage"
            tags:
                - screenshots
components:
    securitySchemes:
        bearerAuth:
            type: http
            description: access token
            scheme: bearer
            bearerFormat: JWT
tags:
    - name: /
    - name: screenshots
