{
  "openapi": "3.1.0",
  "info": {
    "title": "Instant White Light API",
    "version": "1.0.0",
    "description": "URL-first light API. Opening a link is the product. /api/v1/open 302-redirects to the fullscreen light UI.",
    "contact": {
      "url": "https://whitescreen.grok.me"
    }
  },
  "servers": [
    {
      "url": "https://whitescreen.grok.me"
    }
  ],
  "paths": {
    "/api/v1": {
      "get": {
        "operationId": "getCatalog",
        "summary": "Action catalog",
        "responses": {
          "200": {
            "description": "JSON catalog of actions and parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/open": {
      "get": {
        "operationId": "openLight",
        "summary": "Open light (302 redirect)",
        "parameters": [
          {
            "name": "c",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Color key"
          },
          {
            "name": "b",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Brightness 5-100"
          },
          {
            "name": "f",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Fullscreen 1/true"
          },
          {
            "name": "w",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Wake lock 1/true"
          },
          {
            "name": "preset",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Preset id"
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to light UI"
          }
        }
      }
    }
  }
}