{
  "openapi": "3.1.0",
  "info": {
    "title": "dibbed.dev API",
    "version": "1.0.0",
    "description": "Free, no-auth HTTP API. POST an image to /api/icons and get back a ZIP containing favicon.ico, PNG favicons, PWA manifest icons, Android mipmaps, and an iOS Xcode AppIcon set.",
    "contact": {
      "email": "help@dibbed.dev",
      "url": "https://dibbed.dev/api"
    }
  },
  "servers": [
    {
      "url": "https://dibbed.dev"
    }
  ],
  "paths": {
    "/api/icons": {
      "post": {
        "summary": "Generate an icon pack from an image",
        "description": "Send raw image bytes (PNG, JPEG, or WebP) as the request body — max 10 MB and 1024×1024 px (icons are generated at 1024 max, so larger sources gain nothing; resize first or use the in-browser generator). Responds with a ZIP archive.",
        "parameters": [
          {
            "name": "platforms",
            "in": "query",
            "required": false,
            "description": "Comma-separated sets to include: web, pwa, android, ios. Unknown values are ignored.",
            "schema": {
              "type": "string",
              "default": "web",
              "example": "web,pwa,android,ios"
            }
          },
          {
            "name": "bg",
            "in": "query",
            "required": false,
            "description": "Hex background color (without #) used where transparency is not allowed: iOS icons and maskable PWA icons.",
            "schema": {
              "type": "string",
              "default": "ffffff",
              "example": "0ea5e9"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "image/png": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "image/jpeg": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "image/webp": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "icons.zip — the generated icon pack",
            "headers": {
              "Content-Disposition": {
                "schema": {
                  "type": "string",
                  "example": "attachment; filename=\"icons.zip\""
                }
              }
            },
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Empty body, or no valid platform in ?platforms="
          },
          "405": {
            "description": "Method is not POST (body is plain-text usage help)"
          },
          "413": {
            "description": "Image larger than 10 MB or 1024×1024 px"
          },
          "422": {
            "description": "Body is not a decodable PNG, JPEG, or WebP"
          }
        }
      }
    },
    "/api/check": {
      "get": {
        "summary": "Full name-availability check",
        "description": "Checks a name across all 33 surfaces (14 domain TLDs, USPTO, GitHub/npm/PyPI/crates.io, app stores, social handles) and returns every result plus a brand-strength verdict and, for weak names, alternative suggestions. Results are cached ~6h.",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "description": "The name to check (1-64 characters).",
            "schema": {
              "type": "string",
              "example": "acme"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Full check payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Missing or too-long ?name="
          },
          "502": {
            "description": "Upstream checks failed — retry shortly"
          }
        }
      }
    },
    "/api/check/{category}": {
      "get": {
        "summary": "One category of the name check",
        "description": "A single category as JSON — these are the units the dibbed.dev results page streams from. Individually cached, so they respond fast and the full check assembles from them.",
        "parameters": [
          {
            "name": "category",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "domains",
                "apps",
                "dev",
                "socials",
                "trademark"
              ]
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "acme"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Category results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Missing or too-long ?name="
          },
          "404": {
            "description": "Unknown category"
          },
          "502": {
            "description": "Upstream checks failed — retry shortly"
          }
        }
      }
    }
  }
}