{
  "openapi": "3.1.0",
  "info": {
    "title": "PixilUI public API",
    "version": "1.0.0",
    "summary": "Read the component catalog, the shadcn registry and public counts.",
    "description": "The same data the pixilui CLI and the MCP server read. No key needed. Agents that can run commands get more from the MCP server (https://mcp.pixilui.com/mcp) or npx pixilui@latest mcp.",
    "contact": {
      "name": "PixilUI",
      "url": "https://pixilui.com",
      "email": "hello@pixilui.com"
    },
    "license": {
      "name": "MIT (free items)",
      "identifier": "MIT"
    }
  },
  "servers": [
    {
      "url": "https://pixilui.com"
    }
  ],
  "security": [],
  "externalDocs": {
    "description": "MCP and agents",
    "url": "https://pixilui.com/docs/agents#connect-the-mcp-server"
  },
  "paths": {
    "/catalog.json": {
      "get": {
        "operationId": "getCatalog",
        "summary": "Every item with its meta",
        "description": "Free and Pro items, their styles and counts; without the props tables and demo knobs (those are on each item's page and in get_item over MCP).",
        "responses": {
          "200": {
            "description": "The catalog",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Catalog"
                }
              }
            }
          }
        }
      }
    },
    "/r/registry.json": {
      "get": {
        "operationId": "getRegistry",
        "summary": "The shadcn registry index",
        "description": "The free items as a shadcn registry, the index `npx shadcn@latest add @pixilui/<name>` resolves from.",
        "responses": {
          "200": {
            "description": "The registry index",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Registry"
                }
              }
            }
          }
        }
      }
    },
    "/r/{name}.json": {
      "get": {
        "operationId": "getRegistryItem",
        "summary": "One registry item with its files",
        "description": "A free item (or the foundation, a style or the skill) as a shadcn registry item, with each file's content and install target.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "The item slug, for example approval-card, foundation or style-lively.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]*$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The registry item",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegistryItem"
                }
              }
            }
          },
          "404": {
            "description": "No free item by that name"
          }
        }
      }
    },
    "/api/stats": {
      "get": {
        "operationId": "getStats",
        "summary": "The prices now",
        "description": "The price step open now for Pro lifetime and Team (its price, licenses left at it, the license count it runs to and the price after it), and whether checkout is open. Cached for a minute; checkout decides the price again.",
        "responses": {
          "200": {
            "description": "The price and switches",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Stats"
                }
              }
            }
          }
        }
      }
    },
    "/api/waitlist/count": {
      "get": {
        "operationId": "getWaitlistCount",
        "summary": "How many people are on the launch waitlist",
        "description": "Subscribed entries only. Counted at most every five minutes; 10 requests a minute per address.",
        "responses": {
          "200": {
            "description": "The count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "count"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Whether the API is up",
        "responses": {
          "200": {
            "description": "Up",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Catalog": {
        "type": "object",
        "required": [
          "name",
          "namespace",
          "homepage",
          "version",
          "items"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "namespace": {
            "type": "string",
            "examples": [
              "@pixilui"
            ]
          },
          "homepage": {
            "type": "string",
            "format": "uri"
          },
          "version": {
            "type": "string"
          },
          "styles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Style"
            }
          },
          "counts": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            },
            "description": "Components by tier, counted as the site counts them (the foundation is not a component)."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogItem"
            }
          }
        }
      },
      "Style": {
        "type": "object",
        "required": [
          "name",
          "label"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "default": {
            "type": "boolean"
          },
          "registryItem": {
            "type": "string",
            "examples": [
              "@pixilui/style-lively"
            ]
          }
        }
      },
      "CatalogItem": {
        "type": "object",
        "required": [
          "slug",
          "title",
          "type",
          "category",
          "tier",
          "status",
          "description"
        ],
        "properties": {
          "slug": {
            "type": "string",
            "examples": [
              "approval-card"
            ]
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "foundation",
              "ui",
              "block",
              "screen"
            ]
          },
          "kind": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "tier": {
            "type": "string",
            "enum": [
              "free",
              "pro"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "ready",
              "deprecated"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": {
            "type": "string"
          },
          "since": {
            "type": "string"
          },
          "dependencies": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "npm packages the item needs."
          },
          "registryDependencies": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Other items it installs with."
          },
          "whenToUse": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "whenNotToUse": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "keyboard": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "accessibility": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "motion": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "responsive": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "performance": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "aiNotes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "related": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "signature": {
            "type": "string"
          },
          "exportName": {
            "type": "string"
          },
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "path",
                "type",
                "target"
              ],
              "properties": {
                "path": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "target": {
                  "type": "string"
                }
              }
            }
          },
          "install": {
            "type": "object",
            "additionalProperties": true,
            "description": "Install commands for the item."
          }
        },
        "additionalProperties": true
      },
      "Registry": {
        "type": "object",
        "required": [
          "name",
          "homepage",
          "items"
        ],
        "properties": {
          "$schema": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "homepage": {
            "type": "string",
            "format": "uri"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RegistryItem"
            }
          }
        }
      },
      "RegistryItem": {
        "type": "object",
        "description": "A shadcn registry item (https://ui.shadcn.com/schema/registry-item.json).",
        "required": [
          "name",
          "type"
        ],
        "properties": {
          "$schema": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "examples": [
              "registry:ui",
              "registry:block",
              "registry:item",
              "registry:theme"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "dependencies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "registryDependencies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "path",
                "type"
              ],
              "properties": {
                "path": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "target": {
                  "type": "string"
                },
                "content": {
                  "type": "string",
                  "description": "Present on /r/{name}.json, not in the index."
                }
              }
            }
          },
          "css": {
            "type": "object",
            "additionalProperties": true
          },
          "cssVars": {
            "type": "object",
            "additionalProperties": true
          },
          "docs": {
            "type": "string"
          },
          "meta": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "OpenStep": {
        "type": "object",
        "description": "The price step open now: its price, licenses left at it and the license count it runs to (null on the list price), and the price after it.",
        "required": [
          "priceUsd",
          "left",
          "upTo",
          "nextPriceUsd"
        ],
        "properties": {
          "priceUsd": {
            "type": "number"
          },
          "left": {
            "type": [
              "number",
              "null"
            ]
          },
          "upTo": {
            "type": [
              "number",
              "null"
            ]
          },
          "nextPriceUsd": {
            "type": [
              "number",
              "null"
            ]
          }
        }
      },
      "Stats": {
        "type": "object",
        "required": [
          "proLifetime",
          "team",
          "proLaunched",
          "launchPhase"
        ],
        "properties": {
          "proLifetime": {
            "$ref": "#/components/schemas/OpenStep"
          },
          "team": {
            "$ref": "#/components/schemas/OpenStep"
          },
          "proLaunched": {
            "type": "boolean"
          },
          "launchPhase": {
            "type": "string",
            "enum": [
              "waitlist",
              "launched"
            ]
          }
        }
      }
    }
  }
}
