{
  "openapi": "3.0.3",
  "info": {
    "title": "OGImage API",
    "description": "Generate beautiful Open Graph images for social media sharing. Supports multiple themes, patterns, and customization options.",
    "version": "1.0.0",
    "contact": {
      "name": "aiyaiyai",
      "url": "https://aiyaiyai.click",
      "email": "hello@aiyaiyai.click"
    }
  },
  "servers": [
    {
      "url": "https://ogimage-sandy.vercel.app",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/og": {
      "get": {
        "operationId": "generateOgImage",
        "summary": "Generate an Open Graph image",
        "description": "Creates a 1200x630 PNG image suitable for og:image meta tags. Returns the image directly.",
        "parameters": [
          {
            "name": "title",
            "in": "query",
            "required": false,
            "description": "Main text displayed on the image",
            "schema": {
              "type": "string",
              "default": "Hello World",
              "maxLength": 100
            }
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "description": "Secondary text below the title",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "theme",
            "in": "query",
            "required": false,
            "description": "Color theme for the image",
            "schema": {
              "type": "string",
              "enum": ["light", "dark", "gradient", "ocean", "sunset", "forest", "midnight"],
              "default": "light"
            }
          },
          {
            "name": "pattern",
            "in": "query",
            "required": false,
            "description": "Background pattern overlay",
            "schema": {
              "type": "string",
              "enum": ["none", "dots", "grid", "diagonal"],
              "default": "none"
            }
          },
          {
            "name": "logo",
            "in": "query",
            "required": false,
            "description": "URL to a logo image (displayed above title)",
            "schema": {
              "type": "string",
              "format": "uri"
            }
          },
          {
            "name": "fontSize",
            "in": "query",
            "required": false,
            "description": "Font size for the title in pixels",
            "schema": {
              "type": "integer",
              "default": 72,
              "minimum": 24,
              "maximum": 120
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Generated PNG image",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        }
      }
    }
  },
  "x-ai-hints": {
    "usage": "Use this API to generate social media preview images. The image URL can be used directly in og:image meta tags.",
    "examples": [
      {
        "description": "Simple dark theme image",
        "url": "/api/og?title=My+Blog+Post&theme=dark"
      },
      {
        "description": "Gradient with pattern and description",
        "url": "/api/og?title=Product+Launch&description=Coming+Soon&theme=gradient&pattern=dots"
      }
    ]
  }
}
