{
  "openapi": "3.1.0",
  "info": {
    "title": "GitBrand public API",
    "version": "1.0.0",
    "summary": "Read published brand assets and guidance for public brands on GitBrand.",
    "description": "GitBrand stores brand repositories (logos, colors, fonts, files, FAQ and brand voice) and publishes them at one link. This API exposes the published version of public repositories to developers and AI agents: a structured record, a Markdown brief, an asset API that renders logos on the fly, and an MCP server per brand. Private, unlisted-with-password and unpublished repositories return 404. Rate limits are generous for reading; abusive clients receive 429. Errors are JSON with `error.code`, `error.message` and `error.hint`.",
    "termsOfService": "https://gitbrand.com/terms",
    "contact": {
      "name": "GitBrand",
      "url": "https://gitbrand.com/contact",
      "email": "hi@gitbrand.com"
    },
    "license": {
      "name": "Content belongs to each brand owner",
      "url": "https://gitbrand.com/terms"
    },
    "x-logo": {
      "url": "https://gitbrand.com/assets/brand/gitbrand-symbol-primary.svg"
    }
  },
  "externalDocs": {
    "description": "Documentation, llms.txt and MCP details",
    "url": "https://gitbrand.com/docs#use-with-ai"
  },
  "servers": [
    {
      "url": "https://gitbrand.com"
    }
  ],
  "tags": [
    {
      "name": "Brand record",
      "description": "Whole-brand reads for agents and integrations."
    },
    {
      "name": "Assets",
      "description": "Individual logos, colors, fonts and files, with rendering options."
    },
    {
      "name": "Discovery",
      "description": "Indexes that help agents find brands and this API."
    },
    {
      "name": "MCP",
      "description": "Model Context Protocol server, one per brand."
    }
  ],
  "paths": {
    "/api/v1/repos/{slug}": {
      "get": {
        "operationId": "getBrand",
        "tags": [
          "Brand record"
        ],
        "summary": "Get the full brand record",
        "description": "Returns the published brand as JSON: name, description, website, logos with download URLs, colors with HEX/RGB and roles, fonts, files, FAQ, brand voice (tagline, mission, tone, principles, do/don't) and the URLs of every other surface. Use this first when you need everything about a brand.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The repository link name, as in gitbrand.com/{slug}. Case-insensitive.",
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{1,128}$",
              "example": "acme"
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "description": "Pin a published version by its 7-character id. Omit for the latest version.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]{7}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The brand record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "schema"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BrandRecord"
                    },
                    "schema": {
                      "type": "string",
                      "description": "Schema version of the record."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The repository does not exist, is private, is password-protected, has not been published, or has AI access turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Retry with exponential backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          }
        }
      }
    },
    "/{slug}/brand.json": {
      "get": {
        "operationId": "getBrandJson",
        "tags": [
          "Brand record"
        ],
        "summary": "Get the brand record (bare)",
        "description": "The same record as getBrand, without the envelope. Handy as a static-looking URL for tools that expect brand.json.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The repository link name, as in gitbrand.com/{slug}. Case-insensitive.",
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{1,128}$",
              "example": "acme"
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "description": "Pin a published version by its 7-character id. Omit for the latest version.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]{7}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The brand record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandRecord"
                }
              }
            }
          },
          "404": {
            "description": "The repository does not exist, is private, is password-protected, has not been published, or has AI access turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Retry with exponential backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          }
        }
      }
    },
    "/{slug}.md": {
      "get": {
        "operationId": "getBrandMarkdown",
        "tags": [
          "Brand record"
        ],
        "summary": "Get a Markdown brand brief",
        "description": "A readable brief of the brand: identity, palette, typography, logos, files, FAQ and voice. Best for pasting into an LLM context window.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The repository link name, as in gitbrand.com/{slug}. Case-insensitive.",
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{1,128}$",
              "example": "acme"
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "description": "Pin a published version by its 7-character id. Omit for the latest version.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]{7}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Markdown brief.",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "The repository does not exist, is private, is password-protected, has not been published, or has AI access turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Retry with exponential backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          }
        }
      }
    },
    "/{slug}/llms.txt": {
      "get": {
        "operationId": "getBrandLlmsTxt",
        "tags": [
          "Brand record"
        ],
        "summary": "Get the brand llms.txt index",
        "description": "A short llms.txt for one brand, linking to its other surfaces.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The repository link name, as in gitbrand.com/{slug}. Case-insensitive.",
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{1,128}$",
              "example": "acme"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "llms.txt body.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "The repository does not exist, is private, is password-protected, has not been published, or has AI access turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Retry with exponential backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          }
        }
      }
    },
    "/{slug}/llms-full.txt": {
      "get": {
        "operationId": "getBrandLlmsFull",
        "tags": [
          "Brand record"
        ],
        "summary": "Get the brand llms-full.txt",
        "description": "The verbose llms.txt with the full brand brief inlined.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The repository link name, as in gitbrand.com/{slug}. Case-insensitive.",
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{1,128}$",
              "example": "acme"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "llms-full.txt body.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "The repository does not exist, is private, is password-protected, has not been published, or has AI access turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Retry with exponential backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          }
        }
      }
    },
    "/brand/{slug}/{ref}.json": {
      "get": {
        "operationId": "getAssetManifest",
        "tags": [
          "Assets"
        ],
        "summary": "List the assets of a version",
        "description": "Every logo, color, font and file of a published version with its link name, ready-made asset API URLs and the rendered formats available for each logo.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The repository link name, as in gitbrand.com/{slug}. Case-insensitive.",
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{1,128}$",
              "example": "acme"
            }
          },
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "Which published version: `main` for the latest, or a 7-character version id (for example `8c5ofd1`) that never changes.",
            "schema": {
              "type": "string",
              "pattern": "^(main|[a-z0-9]{7})$",
              "example": "main"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The asset manifest.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetManifest"
                }
              }
            }
          },
          "401": {
            "description": "The owner protected the asset API; send `Authorization: Bearer <token>`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          },
          "404": {
            "description": "The repository does not exist, is private, is password-protected, has not been published, or has AI access turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Retry with exponential backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          }
        }
      }
    },
    "/brand/{slug}/{key}/{ref}": {
      "get": {
        "operationId": "getAsset",
        "tags": [
          "Assets"
        ],
        "summary": "Download or render one asset",
        "description": "Returns the file behind a link name. Logos can be converted (SVG to PNG, JPG or WebP), resized, padded and given a background; colors can be returned as JSON, HEX, CSS or SCSS; fonts and files are returned as-is. Use `ref=main` for the latest published version. Responses are cacheable; a version id URL never changes. Originals larger than 4 MB (logos, fonts, files) answer with a 302 redirect to the stored file, which downloads under the same `{slug}-{key}.{ext}` name, so follow redirects (`curl -L`). A rendered logo above 4 MB returns 422 `too_large`.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The repository link name, as in gitbrand.com/{slug}. Case-insensitive.",
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{1,128}$",
              "example": "acme"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "description": "The asset link name shown in the editor and in the manifest, for example `logo-standard` or `primary`.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "example": "logo-standard"
            }
          },
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "Which published version: `main` for the latest, or a 7-character version id (for example `8c5ofd1`) that never changes.",
            "schema": {
              "type": "string",
              "pattern": "^(main|[a-z0-9]{7})$",
              "example": "main"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "Logos: output format (see `formats` in the manifest for what each logo supports). Colors: text format. Fonts: `file` or `css`.",
            "schema": {
              "type": "string",
              "enum": [
                "svg",
                "png",
                "jpg",
                "webp",
                "json",
                "hex",
                "css",
                "scss",
                "file"
              ]
            }
          },
          {
            "name": "width",
            "in": "query",
            "description": "Logos: width in pixels. Height follows unless set.",
            "schema": {
              "type": "integer",
              "description": "Pixels",
              "minimum": 1,
              "maximum": 4096
            }
          },
          {
            "name": "height",
            "in": "query",
            "description": "Logos: height in pixels.",
            "schema": {
              "type": "integer",
              "description": "Pixels",
              "minimum": 1,
              "maximum": 4096
            }
          },
          {
            "name": "fit",
            "in": "query",
            "description": "Logos: how the logo fills the box when both width and height are set.",
            "schema": {
              "type": "string",
              "enum": [
                "contain",
                "cover",
                "fill",
                "inside"
              ]
            }
          },
          {
            "name": "background",
            "in": "query",
            "description": "Logos: fill for transparent areas as a 3 or 6-digit hex (ffffff) or `transparent`. jpg defaults to white.",
            "schema": {
              "type": "string",
              "pattern": "^(#?[0-9a-fA-F]{3}|#?[0-9a-fA-F]{6}|transparent)$"
            }
          },
          {
            "name": "padding",
            "in": "query",
            "description": "Logos: space around the logo in pixels.",
            "schema": {
              "type": "integer",
              "description": "Pixels",
              "minimum": 0,
              "maximum": 512
            }
          },
          {
            "name": "quality",
            "in": "query",
            "description": "Logos: jpg/webp quality.",
            "schema": {
              "type": "integer",
              "description": "Percent",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "download",
            "in": "query",
            "description": "Send as an attachment. Every response already names its file `{slug}-{key}.{ext}` in Content-Disposition (redirects for files over 4 MB too), so `curl -LOJ` saves it under that name.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The asset bytes, or a color in the requested text format.",
            "content": {
              "image/svg+xml": {
                "schema": {
                  "type": "string"
                }
              },
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ColorValue"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "text/css": {
                "schema": {
                  "type": "string"
                }
              },
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "302": {
            "description": "Google fonts redirect to their Google Fonts stylesheet; originals over 4 MB redirect to storage as a download with the same file name."
          },
          "400": {
            "description": "A rendering option is out of range or does not apply to this asset kind.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          },
          "401": {
            "description": "The owner protected the asset API; send `Authorization: Bearer <token>`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          },
          "404": {
            "description": "The repository does not exist, is private, is password-protected, has not been published, or has AI access turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Retry with exponential backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          }
        }
      }
    },
    "/brand/{slug}/{ref}.css": {
      "get": {
        "operationId": "getBrandTokensCss",
        "tags": [
          "Assets"
        ],
        "summary": "Colors and fonts as CSS variables",
        "description": "One stylesheet for a version: every color as `--{key}`, `--brand-{role}` aliases (switched in a prefers-color-scheme: dark block for dark-theme colors), `@font-face` rules for uploaded fonts, `@import` for Google Fonts and `--{key}` font families.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The repository link name, as in gitbrand.com/{slug}. Case-insensitive.",
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{1,128}$",
              "example": "acme"
            }
          },
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "Which published version: `main` for the latest, or a 7-character version id (for example `8c5ofd1`) that never changes.",
            "schema": {
              "type": "string",
              "pattern": "^(main|[a-z0-9]{7})$",
              "example": "main"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The stylesheet.",
            "content": {
              "text/css": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "The owner protected the asset API; send `Authorization: Bearer <token>`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          },
          "404": {
            "description": "The repository does not exist, is private, is password-protected, has not been published, or has AI access turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Retry with exponential backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          }
        }
      }
    },
    "/mcp/{slug}": {
      "post": {
        "operationId": "mcpBrandServer",
        "tags": [
          "MCP"
        ],
        "summary": "Model Context Protocol server for one brand",
        "description": "JSON-RPC 2.0 over HTTP (Streamable HTTP transport, stateless, protocol versions 2025-06-18, 2025-03-26 and 2024-11-05). Supports `initialize`, `ping`, `tools/list` and `tools/call` with the tools `get_brand`, `get_brand_brief`, `get_palette`, `get_logos`, `get_fonts`, `get_files` and `get_download_plan` (shell commands that save the assets locally). Notifications are answered with 202. Point an MCP client at this URL; no authentication is needed.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The repository link name, as in gitbrand.com/{slug}. Case-insensitive.",
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{1,128}$",
              "example": "acme"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A JSON-RPC response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            }
          },
          "202": {
            "description": "Accepted: the request only carried notifications."
          },
          "404": {
            "description": "The repository does not exist, is private, is password-protected, has not been published, or has AI access turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable. Retry with exponential backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "The same error as Markdown, when requested with Accept: text/markdown."
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "getLlmsTxt",
        "tags": [
          "Discovery"
        ],
        "summary": "Site index for agents, with when-to-use guidance",
        "responses": {
          "200": {
            "description": "llms.txt body.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/sitemap-brands.xml": {
      "get": {
        "operationId": "getBrandsSitemap",
        "tags": [
          "Discovery"
        ],
        "summary": "Sitemap of public, listed brand pages",
        "description": "One URL per public brand that opted into listing, with its last publish date. Slugs in this file work with every operation above.",
        "responses": {
          "200": {
            "description": "Sitemap XML.",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getOpenApi",
        "tags": [
          "Discovery"
        ],
        "summary": "This specification",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "assetApiToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Only for repositories whose owner protected the asset API. Tokens are created in the repository settings."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable machine-readable code, for example not_found, invalid_slug, method_not_allowed, unavailable."
              },
              "message": {
                "type": "string",
                "description": "Human-readable summary."
              },
              "hint": {
                "type": "string",
                "description": "What to try next."
              },
              "docs": {
                "type": "string",
                "description": "Documentation URL.",
                "format": "uri"
              },
              "llms": {
                "type": "string",
                "description": "llms.txt URL.",
                "format": "uri"
              }
            }
          }
        }
      },
      "Rgb": {
        "type": "object",
        "required": [
          "r",
          "g",
          "b"
        ],
        "properties": {
          "r": {
            "type": "integer",
            "description": "Red",
            "minimum": 0,
            "maximum": 255
          },
          "g": {
            "type": "integer",
            "description": "Green",
            "minimum": 0,
            "maximum": 255
          },
          "b": {
            "type": "integer",
            "description": "Blue",
            "minimum": 0,
            "maximum": 255
          }
        }
      },
      "LogoFormats": {
        "type": "object",
        "description": "Asset API URL per format this logo can be served in. svg only when the original is SVG; empty when the file is stored outside GitBrand.",
        "properties": {
          "svg": {
            "type": "string",
            "description": "SVG URL.",
            "format": "uri"
          },
          "png": {
            "type": "string",
            "description": "PNG URL.",
            "format": "uri"
          },
          "jpg": {
            "type": "string",
            "description": "JPG URL.",
            "format": "uri"
          },
          "webp": {
            "type": "string",
            "description": "WEBP URL.",
            "format": "uri"
          }
        }
      },
      "BrandLogo": {
        "type": "object",
        "required": [
          "id",
          "key",
          "type",
          "name",
          "url",
          "darkBackground",
          "formats"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable id."
          },
          "key": {
            "type": "string",
            "description": "Link name used in the asset API."
          },
          "type": {
            "type": "string",
            "description": "Kind, for example logo-standard, logo-white, icon-standard."
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "url": {
            "type": "string",
            "description": "Direct URL of the original file.",
            "format": "uri"
          },
          "api": {
            "type": "string",
            "description": "Asset API URL in the original format. Absent for files stored elsewhere.",
            "format": "uri"
          },
          "darkBackground": {
            "type": "boolean",
            "description": "True when the logo is made for dark backgrounds."
          },
          "format": {
            "type": "string",
            "enum": [
              "svg",
              "png",
              "jpg",
              "webp"
            ],
            "description": "Original format."
          },
          "formats": {
            "$ref": "#/components/schemas/LogoFormats"
          },
          "filename": {
            "type": "string",
            "description": "Suggested local file name for the original format."
          }
        }
      },
      "BrandColor": {
        "type": "object",
        "required": [
          "id",
          "key",
          "type",
          "name",
          "hex",
          "api",
          "rgb"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable id."
          },
          "key": {
            "type": "string",
            "description": "Link name used in the asset API."
          },
          "type": {
            "type": "string",
            "description": "Kind."
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "hex": {
            "type": "string",
            "description": "Lowercase #rrggbb.",
            "pattern": "^#[0-9a-f]{6}$"
          },
          "role": {
            "type": "string",
            "description": "Semantic role such as primary, secondary, accent, background, text."
          },
          "theme": {
            "type": "string",
            "enum": [
              "shared",
              "light",
              "dark"
            ]
          },
          "rgb": {
            "$ref": "#/components/schemas/Rgb"
          },
          "api": {
            "type": "string",
            "description": "Asset API URL for this color.",
            "format": "uri"
          }
        }
      },
      "BrandFont": {
        "type": "object",
        "required": [
          "id",
          "key",
          "type",
          "name",
          "url",
          "source"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable id."
          },
          "key": {
            "type": "string",
            "description": "Link name."
          },
          "type": {
            "type": "string",
            "description": "Kind, for example font-heading or font-body."
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "url": {
            "type": "string",
            "description": "Font file or Google Fonts URL.",
            "format": "uri"
          },
          "source": {
            "type": "string",
            "enum": [
              "upload",
              "google",
              "external"
            ],
            "description": "upload: a file on GitBrand. google: a Google Fonts stylesheet, not a file. external: another host."
          },
          "api": {
            "type": "string",
            "description": "Asset API URL: the file, or a redirect to Google Fonts.",
            "format": "uri"
          },
          "css": {
            "type": "string",
            "description": "Ready CSS: @font-face for uploads, @import for Google Fonts.",
            "format": "uri"
          },
          "filename": {
            "type": "string",
            "description": "Suggested local file name (uploads only)."
          },
          "fontFamily": {
            "type": "string",
            "description": "Family name."
          },
          "fontSubfamily": {
            "type": "string",
            "description": "Style, for example Bold."
          },
          "postScriptName": {
            "type": "string",
            "description": "PostScript name."
          },
          "designer": {
            "type": "string",
            "description": "Designer or foundry."
          },
          "weight": {
            "type": "integer",
            "description": "CSS font weight."
          },
          "italic": {
            "type": "boolean"
          }
        }
      },
      "BrandResource": {
        "type": "object",
        "required": [
          "id",
          "key",
          "type",
          "name",
          "url"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable id."
          },
          "key": {
            "type": "string",
            "description": "Link name."
          },
          "type": {
            "type": "string",
            "description": "Kind."
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "url": {
            "type": "string",
            "description": "Direct file URL.",
            "format": "uri"
          },
          "api": {
            "type": "string",
            "description": "Asset API URL. Absent for files stored elsewhere.",
            "format": "uri"
          },
          "filename": {
            "type": "string",
            "description": "Suggested local file name."
          },
          "ext": {
            "type": "string",
            "description": "File extension."
          },
          "group": {
            "type": "string",
            "description": "Section on the brand page."
          }
        }
      },
      "BrandFaq": {
        "type": "object",
        "required": [
          "id",
          "question",
          "answer"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable id."
          },
          "question": {
            "type": "string",
            "description": "Question."
          },
          "answer": {
            "type": "string",
            "description": "Answer, Markdown when answerFormat is markdown."
          },
          "answerFormat": {
            "type": "string",
            "enum": [
              "markdown"
            ]
          }
        }
      },
      "BrandRecord": {
        "type": "object",
        "required": [
          "schema",
          "slug",
          "name",
          "url",
          "canonical",
          "logos",
          "colors",
          "fonts",
          "resources",
          "faq",
          "ref",
          "instructions",
          "endpoints"
        ],
        "properties": {
          "schema": {
            "type": "string",
            "description": "Schema version."
          },
          "slug": {
            "type": "string",
            "description": "Link name."
          },
          "name": {
            "type": "string",
            "description": "Brand name."
          },
          "url": {
            "type": "string",
            "description": "Brand website."
          },
          "canonical": {
            "type": "string",
            "description": "Public page on GitBrand. Cite this URL.",
            "format": "uri"
          },
          "description": {
            "type": "string",
            "description": "Short description."
          },
          "tagline": {
            "type": "string",
            "description": "Tagline."
          },
          "mission": {
            "type": "string",
            "description": "Mission statement."
          },
          "positioning": {
            "type": "string",
            "description": "Positioning."
          },
          "audience": {
            "type": "string",
            "description": "Target audience."
          },
          "voice": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Voice attributes."
          },
          "tone": {
            "type": "string",
            "description": "Tone guidance."
          },
          "principles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Brand principles."
          },
          "dos": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Things to do."
          },
          "donts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Things to avoid."
          },
          "pronunciation": {
            "type": "string",
            "description": "How to say the name."
          },
          "logos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrandLogo"
            }
          },
          "colors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrandColor"
            }
          },
          "fonts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrandFont"
            }
          },
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrandResource"
            }
          },
          "faq": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrandFaq"
            }
          },
          "updatedAt": {
            "type": "string",
            "description": "Last publish time.",
            "format": "date-time"
          },
          "version": {
            "type": "object",
            "properties": {
              "number": {
                "type": "integer"
              },
              "shortId": {
                "type": "string",
                "description": "7-character version id."
              },
              "publishedAt": {
                "type": "string",
                "description": "Publish time.",
                "format": "date-time"
              }
            }
          },
          "ref": {
            "type": "string",
            "description": "Version the asset URLs point at: main or a 7-character version id."
          },
          "instructions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "How to fetch, save and use the assets. Show these to the model with the record."
          },
          "endpoints": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "format": "uri"
            },
            "description": "URLs of the other surfaces for this brand: page, json, markdown, llmsTxt, llmsFull, api, mcp, manifest and tokens (CSS variables)."
          }
        }
      },
      "ColorValue": {
        "type": "object",
        "description": "A color from the asset API with format=json.",
        "properties": {
          "key": {
            "type": "string",
            "description": "Link name."
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "hex": {
            "type": "string",
            "description": "#rrggbb."
          },
          "rgb": {
            "$ref": "#/components/schemas/Rgb"
          },
          "role": {
            "type": "string",
            "description": "Semantic role."
          }
        }
      },
      "AssetManifest": {
        "type": "object",
        "required": [
          "schema",
          "slug",
          "name",
          "version",
          "urls",
          "logos",
          "colors",
          "fonts",
          "resources"
        ],
        "properties": {
          "schema": {
            "type": "string",
            "description": "Manifest schema version."
          },
          "slug": {
            "type": "string",
            "description": "Link name."
          },
          "name": {
            "type": "string",
            "description": "Brand name."
          },
          "description": {
            "type": "string",
            "description": "Description."
          },
          "website": {
            "type": "string",
            "description": "Brand website."
          },
          "version": {
            "type": "object",
            "properties": {
              "number": {
                "type": "integer"
              },
              "id": {
                "type": "string",
                "description": "Version id."
              },
              "publishedAt": {
                "type": "string",
                "description": "Publish time.",
                "format": "date-time"
              }
            }
          },
          "urls": {
            "type": "object",
            "properties": {
              "html": {
                "type": "string",
                "description": "Public page."
              },
              "latest": {
                "type": "string",
                "description": "Manifest for main."
              },
              "this": {
                "type": "string",
                "description": "Manifest for this version."
              },
              "tokens": {
                "type": "string",
                "description": "Colors and fonts of this version as CSS variables."
              }
            }
          },
          "logos": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "Link name."
                },
                "name": {
                  "type": "string",
                  "description": "Display name."
                },
                "type": {
                  "type": "string",
                  "description": "Kind."
                },
                "darkBackground": {
                  "type": "boolean"
                },
                "format": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Original format, or null when stored elsewhere."
                },
                "formats": {
                  "$ref": "#/components/schemas/LogoFormats"
                },
                "filename": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Suggested local file name, or null."
                },
                "url": {
                  "type": "string",
                  "description": "Direct file URL."
                }
              }
            }
          },
          "colors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "Link name."
                },
                "name": {
                  "type": "string",
                  "description": "Display name."
                },
                "hex": {
                  "type": "string",
                  "description": "#rrggbb."
                },
                "role": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Role, or null."
                },
                "theme": {
                  "type": "string",
                  "description": "shared, light or dark."
                },
                "api": {
                  "type": "string",
                  "description": "Asset API URL."
                }
              }
            }
          },
          "fonts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "Link name."
                },
                "name": {
                  "type": "string",
                  "description": "Display name."
                },
                "family": {
                  "type": "string",
                  "description": "Family."
                },
                "weight": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "italic": {
                  "type": "boolean"
                },
                "source": {
                  "type": "string",
                  "description": "upload, google or external."
                },
                "api": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Asset API URL, or null."
                },
                "css": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "CSS URL, or null."
                },
                "filename": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Suggested local file name, or null."
                },
                "url": {
                  "type": "string",
                  "description": "Direct URL."
                }
              }
            }
          },
          "resources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "Link name."
                },
                "name": {
                  "type": "string",
                  "description": "Display name."
                },
                "ext": {
                  "type": "string",
                  "description": "Extension."
                },
                "api": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Asset API URL, or null when stored elsewhere."
                },
                "filename": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Suggested local file name, or null."
                },
                "url": {
                  "type": "string",
                  "description": "Direct URL."
                }
              }
            }
          },
          "brand": {
            "type": "object",
            "description": "Brand voice fields.",
            "additionalProperties": true
          }
        }
      },
      "JsonRpcRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              }
            ]
          },
          "method": {
            "type": "string",
            "enum": [
              "initialize",
              "notifications/initialized",
              "tools/list",
              "tools/call",
              "ping"
            ]
          },
          "params": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "JsonRpcResponse": {
        "type": "object",
        "required": [
          "jsonrpc"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "result": {
            "type": "object",
            "additionalProperties": true
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}