{
    "name": "LHT logo API",
    "description": "Generate a transparent PNG or lossless WebP of the LHT logo. Logo-only images are square. An optional wordmark produces a single-line layout with automatic height. Original proportions are preserved.",
    "endpoint": "https://lhtpics.com/api/logo",
    "methods": [
        "GET",
        "HEAD"
    ],
    "authentication": "None required.",
    "parameters": {
        "variant": {
            "usage": "Choose one bare query flag, e.g. ?outline. Do not use variant=outline.",
            "default": "solid",
            "options": {
                "solid": "Solid logo",
                "outline": "Outline logo",
                "shaded": "Shaded logo",
                "two-tone": "Two separately colored logo elements"
            }
        },
        "color1": {
            "description": "Primary color: exactly six hexadecimal digits, without #.",
            "default": "e8c047"
        },
        "color2": {
            "description": "Optional second color, also six hex digits. Creates a left-to-right gradient for solid, outline and shaded. For two-tone, color1 colors the first element and color2 colors the second. Original shading is retained.",
            "default": "Same as color1"
        },
        "wordmark": {
            "description": "Optional text to the right of the logo. Values are case-insensitive; rendered as LHT or LuckyHash.",
            "options": [
                "LHT",
                "LuckyHash"
            ],
            "default": null
        },
        "wordmarkColor": {
            "description": "Solid six-digit hex color for the wordmark, without #. No gradient.",
            "default": "Same as color1"
        },
        "format": {
            "description": "Output image format. WebP uses lossless compression. Both formats preserve transparency. Case-insensitive.",
            "options": [
                "png",
                "webp"
            ],
            "default": "png"
        },
        "size": {
            "description": "Output width in pixels. Maximum 2048 without a wordmark (square), or 4096 with a wordmark (automatic height).",
            "minimum": 64,
            "maximum": 4096,
            "maximum_without_wordmark": 2048,
            "maximum_with_wordmark": 4096,
            "default": 2048
        }
    },
    "examples": {
        "large_wordmark": "https://lhtpics.com/api/logo?solid&color1=e8c047&wordmark=LuckyHash&size=4096",
        "luckyhash_wordmark": "https://lhtpics.com/api/logo?solid&color1=e8c047&wordmark=LuckyHash&wordmarkColor=e8c047&size=2048",
        "lht_wordmark": "https://lhtpics.com/api/logo?two-tone&color1=e8c047&color2=d99a28&wordmark=LHT&wordmarkColor=e8c047&size=1024",
        "webp_wordmark": "https://lhtpics.com/api/logo?solid&color1=e8c047&wordmark=LuckyHash&format=webp&size=2048",
        "default_gold_logo": "https://lhtpics.com/api/logo",
        "solid": "https://lhtpics.com/api/logo?solid&color1=e8c047&size=1024",
        "outline_gradient": "https://lhtpics.com/api/logo?outline&color1=ffffff&color2=cccccc&size=2048",
        "shaded_gradient": "https://lhtpics.com/api/logo?shaded&color1=ff00aa&color2=6600ff&size=2048",
        "two_tone": "https://lhtpics.com/api/logo?two-tone&color1=e8c047&color2=d99a28&size=2048"
    },
    "responses": {
        "200": "image/png or image/webp according to format (HEAD returns headers only)",
        "304": "Unchanged image when a matching ETag is supplied",
        "400": "JSON error for invalid or unknown parameters",
        "405": "Method not allowed",
        "429": "Rate or render concurrency limit reached; see Retry-After",
        "503": "JSON error when generation is unavailable"
    },
    "caching": "Images have a one-day public cache lifetime and support ETag revalidation.",
    "rate_limits": {
        "status": "Enforced by the PHP API. Additional Cloudflare protections may apply.",
        "requests_per_minute_per_ip": 10,
        "window_seconds": 60,
        "global_uncached_renders_per_minute": 100,
        "maximum_concurrent_renders": 2,
        "scope": "GET and HEAD requests reaching /api/logo, including invalid parameters, HEAD and conditional requests, across all variants and options. /api/logo/help is excluded.",
        "guidance": "For multiple images, send requests one at a time and stay within the rate limits.",
        "retry_guidance": "HTTP 429 includes Retry-After in seconds and a JSON retryAfter value. Wait before retrying; if a proxy omits the header, wait 60 seconds."
    },
    "cross_origin": "Allowed, without credentials.",
    "note": "Generated from raster artwork; this endpoint does not return SVG files."
}