{
  "status": "info",
  "service": "https://puppet.vexio.in - Headless Browser Service",
  "description": "Service for rendering webpages and capturing screenshots",
  "version": "1.0.0",
  "endpoints": [
    {
      "name": "Page Content",
      "path": "/page?url=https://example.com",
      "description": "Fetches the HTML content of the specified URL using a browser",
      "features": [
        "Reuses existing browser sessions when available",
        "Creates new sessions when needed",
        "Optimized for reliability with connection retries",
        "Optional AI-powered markdown conversion of page content",
        "Optional AI-powered concise text summary of page content"
      ],
      "parameters": {
        "url": "Required. The URL to fetch content from",
        "minify": "Optional. Set to 'false' to disable HTML minification (default: true)",
        "metadata": "Optional. Set to 'false' to exclude metadata from response (default: true)",
        "upload": "Optional. Set to 'false' to include HTML content directly instead of uploading to storage (default: true)",
        "markdown": "Optional. Set to 'true' to include a markdown summary of the page content (default: false)",
        "streamMarkdown": "Optional. Set to 'true' to stream the markdown response as plain text (requires markdown=true, default: false)",
        "summary": "Optional. Set to 'true' to include a concise text summary of the page content (default: false)",
        "streamSummary": "Optional. Set to 'true' to stream the text summary response as plain text (requires summary=true, default: false)"
      },
      "response": "Returns JSON with HTML content or URL, optional metadata, optional markdown summary, and optional text summary"
    },
    {
      "name": "Screenshot",
      "path": "/screenshot?url=https://example.com",
      "description": "Captures a screenshot of a webpage using headless browser",
      "features": [
        "Full page screenshots",
        "Multiple formats (JPEG, PNG)",
        "Various viewport sizes",
        "Storage options"
      ],
      "parameters": {
        "url": "Required. The URL to capture",
        "json": "Optional. Set to 'false' to return image directly instead of JSON (default: true)",
        "fullPage": "Optional. Set to 'true' to capture entire page (default: false)",
        "viewportSize": "Optional. Select viewport size (default: desktop-medium)",
        "type": "Optional. Image format: 'jpeg' or 'png' (default: jpeg)",
        "upload": "Optional. Set to 'true' to upload to storage and return URL (default: false)"
      },
      "response": "Returns JSON with screenshot data or direct image response"
    },
    {
      "name": "Snapshot",
      "path": "/snapshot?url=https://example.com",
      "description": "Captures both HTML content and screenshots of a webpage in a single request",
      "features": [
        "Combined functionality of Page and Screenshot APIs",
        "Efficient single-request operation for both content types",
        "Customizable output formats",
        "Supports all options from both Page and Screenshot APIs"
      ],
      "parameters": {
        "url": "Required. The URL to capture",
        "format": "Optional. Output format: 'html', 'screenshot', or 'both' (default: both)",
        "minify": "Optional. Set to 'false' to disable HTML minification (default: true)",
        "metadata": "Optional. Set to 'false' to exclude metadata from response (default: true)",
        "upload": "Optional. Set to 'false' to include content directly instead of uploading to storage (default: true)",
        "fullPage": "Optional. Set to 'true' to capture entire page in screenshot (default: false)",
        "viewportSize": "Optional. Select viewport size (default: desktop-medium)",
        "imageType": "Optional. Image format: 'jpeg' or 'png' (default: jpeg)",
        "raw": "Optional. Set to 'true' to return image directly (only for format=screenshot, upload=false)"
      },
      "response": "Returns JSON with HTML content, screenshot data, or both, based on format parameter"
    },
    {
      "name": "Markdown Conversion",
      "path": "/markdown?q=Your text query here",
      "description": "Converts a text query into a summarized markdown format using AI",
      "features": [
        "AI-powered text summarization",
        "Well-structured markdown formatting",
        "Customizable model selection"
      ],
      "parameters": {
        "q": "Required. The text query to summarize and convert to markdown",
        "model": "Optional. The AI model to use (default: @cf/meta/llama-3.1-70b-instruct)",
        "alternativeModel": "Optional. Set to 'true' to use a model better suited for longer outputs",
        "modelType": "Optional. Which alternative model to use: 'claude', 'mistral', or 'llama-large' (default: 'claude')"
      },
      "response": "Returns JSON with the markdown-formatted summary of the query"
    },
    {
      "name": "Search Completion",
      "path": "/completion?text=your partial query",
      "description": "Provides intelligent search query completions with shopping focus and temporal awareness",
      "features": [
        "Shopping-oriented completions",
        "Time and date-aware suggestions",
        "Partial word completion",
        "Seasonal relevance",
        "Fast response times",
        "Natural language continuations",
        "Configurable number of suggestions"
      ],
      "parameters": {
        "text": "Required. The partial search query to complete",
        "length": "Optional. Number of completions to return (1-10, default: 5)",
        "model": "Optional. The AI model to use (default: @cf/meta/llama-3.1-8b-instruct-fast)"
      },
      "response": "Returns JSON with the specified number of completion suggestions that naturally continue the input query"
    }
  ],
  "examples": [
    "https://puppet.vexio.in/page?url=https://example.com",
    "https://puppet.vexio.in/page?url=https://example.com&minify=false&metadata=true",
    "https://puppet.vexio.in/page?url=https://example.com&markdown=true",
    "https://puppet.vexio.in/page?url=https://example.com&summary=true",
    "https://puppet.vexio.in/page?url=https://example.com&summary=true&streamSummary=true",
    "https://puppet.vexio.in/page?url=https://example.com&markdown=true&streamMarkdown=true",
    "https://puppet.vexio.in/screenshot?url=https://example.com",
    "https://puppet.vexio.in/screenshot?url=https://example.com&fullPage=true&type=png",
    "https://puppet.vexio.in/snapshot?url=https://example.com&format=both",
    "https://puppet.vexio.in/snapshot?url=https://example.com&format=screenshot&imageType=png&fullPage=true",
    "https://puppet.vexio.in/markdown?q=What is the capital of France and what is its population?",
    "https://puppet.vexio.in/markdown?q=Explain quantum computing&model=@cf/anthropic/claude-3-haiku-20240307",
    "https://puppet.vexio.in/markdown?q=Explain quantum computing in detail&alternativeModel=true&modelType=claude",
    "https://puppet.vexio.in/completion?text=blue+swea",
    "https://puppet.vexio.in/completion?text=where+to+buy",
    "https://puppet.vexio.in/completion?text=best+deal+on",
    "https://puppet.vexio.in/completion?text=gaming+lap&length=8"
  ]
}