{"openapi":"3.1.0","info":{"title":"Tintdex API","version":"0.1.0","description":"Public JSON API for searching terminal color schemes, generating configs, and adjusting palettes. No authentication."},"servers":[{"url":"https://tintdex.afengim.com","description":"This Tintdex instance"}],"tags":[{"name":"Schemes","description":"Search and scheme details"},{"name":"Configs","description":"Rendered terminal and editor configs"},{"name":"Palettes","description":"OKLCH adjustments"},{"name":"Taxonomy","description":"Formats, categories, families, terminals"}],"paths":{"/api/v1/schemes":{"get":{"operationId":"searchSchemes","tags":["Schemes"],"summary":"Search color schemes","description":"Filter by query, tone, tags and family. Paginate with limit and offset.","parameters":[{"name":"q","in":"query","schema":{"type":"string","maxLength":100}},{"name":"tone","in":"query","schema":{"type":"string","enum":["dark","light"]}},{"name":"tags","in":"query","schema":{"type":"string"},"description":"Comma-separated category slugs, at most 11."},{"name":"family","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["name","contrast-desc","contrast-asc"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"locale","in":"query","required":false,"schema":{"type":"string","enum":["zh-CN","zh-HK","zh-TW","ja","en"],"default":"en"},"description":"Language for summary, description, install hint and prompt text. Default en."}],"responses":{"200":{"description":"Search page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"},"examples":{"dracula":{"value":{"total":1,"limit":20,"offset":0,"items":[{"slug":"dracula","name":"Dracula"}]}}}}}},"400":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","detail"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/schemes/{slug}":{"get":{"operationId":"getScheme","tags":["Schemes"],"summary":"Get a scheme","description":"Full palette, stats, similar schemes and links.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"locale","in":"query","required":false,"schema":{"type":"string","enum":["zh-CN","zh-HK","zh-TW","ja","en"],"default":"en"},"description":"Language for summary, description, install hint and prompt text. Default en."}],"responses":{"200":{"description":"Scheme detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemeDetail"}}}},"400":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","detail"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","detail"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/schemes/{slug}/configs/{format}":{"get":{"operationId":"getConfig","tags":["Configs"],"summary":"Render a config file","description":"JSON metadata or raw text (`output=text`). Optional `p` applies a customized palette.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"path","required":true,"schema":{"type":"string"}},{"name":"p","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-fA-F]{132}$"},"description":"Optional 132-character hex encoding of a customized 22-color palette."},{"name":"locale","in":"query","required":false,"schema":{"type":"string","enum":["zh-CN","zh-HK","zh-TW","ja","en"],"default":"en"},"description":"Language for summary, description, install hint and prompt text. Default en."},{"name":"output","in":"query","schema":{"type":"string","enum":["json","text"],"default":"json"}}],"responses":{"200":{"description":"Config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigResult"}},"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","detail"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","detail"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/schemes/{slug}/configs/{format}/prompt":{"get":{"operationId":"getSetupPrompt","tags":["Configs"],"summary":"Setup prompt for a terminal or editor","description":"Plain-text prompt matching the Export panel copy-prompt button. Terminal and editor formats only.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"path","required":true,"schema":{"type":"string"}},{"name":"p","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-fA-F]{132}$"},"description":"Optional 132-character hex encoding of a customized 22-color palette."},{"name":"locale","in":"query","required":false,"schema":{"type":"string","enum":["zh-CN","zh-HK","zh-TW","ja","en"],"default":"en"},"description":"Language for summary, description, install hint and prompt text. Default en."}],"responses":{"200":{"description":"Prompt text","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","detail"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","detail"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/palettes/adjust":{"post":{"operationId":"adjustPalette","tags":["Palettes"],"summary":"Adjust a palette in OKLCH","description":"Provide either slug or p. Saturation maps to chroma (0–200).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustBody"}}}},"responses":{"200":{"description":"Adjusted palette","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustResult"}}}},"400":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","detail"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","detail"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","detail"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/formats":{"get":{"operationId":"listFormats","tags":["Taxonomy"],"summary":"List export formats","parameters":[{"name":"locale","in":"query","required":false,"schema":{"type":"string","enum":["zh-CN","zh-HK","zh-TW","ja","en"],"default":"en"},"description":"Language for summary, description, install hint and prompt text. Default en."}],"responses":{"200":{"description":"Formats","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FormatItem"}}}}},"400":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","detail"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/categories":{"get":{"operationId":"listCategories","tags":["Taxonomy"],"summary":"List categories","parameters":[{"name":"locale","in":"query","required":false,"schema":{"type":"string","enum":["zh-CN","zh-HK","zh-TW","ja","en"],"default":"en"},"description":"Language for summary, description, install hint and prompt text. Default en."}],"responses":{"200":{"description":"Categories"},"400":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","detail"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/families":{"get":{"operationId":"listFamilies","tags":["Taxonomy"],"summary":"List families","parameters":[{"name":"locale","in":"query","required":false,"schema":{"type":"string","enum":["zh-CN","zh-HK","zh-TW","ja","en"],"default":"en"},"description":"Language for summary, description, install hint and prompt text. Default en."}],"responses":{"200":{"description":"Families"},"400":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","detail"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/terminals":{"get":{"operationId":"listTerminals","tags":["Taxonomy"],"summary":"List terminals","parameters":[{"name":"locale","in":"query","required":false,"schema":{"type":"string","enum":["zh-CN","zh-HK","zh-TW","ja","en"],"default":"en"},"description":"Language for summary, description, install hint and prompt text. Default en."}],"responses":{"200":{"description":"Terminals"},"400":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"type":"object","required":["type","title","status","detail"],"properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}}},"components":{"schemas":{"SearchResult":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"isDark":{"type":"boolean"},"family":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"background":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"foreground":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"summary":{"type":"string"},"url":{"type":"string"},"thumbnail":{"type":"string"}},"required":["slug","name","isDark","tags","background","foreground","summary","url","thumbnail"],"additionalProperties":false}}},"required":["total","limit","offset","items"],"additionalProperties":false},"SchemeDetail":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"palette":{"type":"object","properties":{"background":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"foreground":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"cursor":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"cursorText":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"selection":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"selectionText":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"ansi":{"minItems":16,"maxItems":16,"type":"array","items":{"type":"string","pattern":"^#[0-9a-f]{6}$"}}},"required":["background","foreground","cursor","cursorText","selection","selectionText","ansi"],"additionalProperties":false},"stats":{"type":"object","properties":{"isDark":{"type":"boolean"},"backgroundLightness":{"type":"number"},"foregroundContrast":{"type":"number"},"ansiContrastAvg":{"type":"number"},"ansiContrastMin":{"type":"number"},"chromaAvg":{"type":"number"},"lightnessAvg":{"type":"number"},"temperature":{"type":"string","enum":["warm","cool","neutral"]}},"required":["isDark","backgroundLightness","foregroundContrast","ansiContrastAvg","ansiContrastMin","chromaAvg","lightnessAvg","temperature"],"additionalProperties":false},"tags":{"type":"array","items":{"type":"string"}},"family":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"}},"source":{"type":"object","properties":{"id":{"type":"string"},"license":{"type":"string"},"fileUrl":{"type":"string"},"homepage":{"type":"string"},"name":{"type":"string"}},"required":["id","license","fileUrl"],"additionalProperties":false},"summary":{"type":"string"},"description":{"type":"array","items":{"type":"string"}},"similar":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"isDark":{"type":"boolean"},"family":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"background":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"foreground":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"summary":{"type":"string"},"url":{"type":"string"},"thumbnail":{"type":"string"}},"required":["slug","name","isDark","tags","background","foreground","summary","url","thumbnail"],"additionalProperties":false}},"url":{"type":"string"},"og":{"type":"string"},"thumbnail":{"type":"string"},"raw":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["slug","name","palette","stats","tags","aliases","source","summary","description","similar","url","og","thumbnail","raw"],"additionalProperties":false},"ConfigResult":{"type":"object","properties":{"filename":{"type":"string"},"mime":{"type":"string"},"content":{"type":"string"},"palette":{"type":"object","properties":{"background":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"foreground":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"cursor":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"cursorText":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"selection":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"selectionText":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"ansi":{"minItems":16,"maxItems":16,"type":"array","items":{"type":"string","pattern":"^#[0-9a-f]{6}$"}}},"required":["background","foreground","cursor","cursorText","selection","selectionText","ansi"],"additionalProperties":false},"p":{"type":"string"},"shareUrl":{"type":"string"},"install":{"type":"object","properties":{"hint":{"type":"string"},"platforms":{"type":"array","items":{"type":"string","enum":["macOS","Linux","Windows"]}},"download":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string"},"command":{"type":"string"}},"required":["command"],"additionalProperties":false}},"activation":{"type":"object","properties":{"mode":{"type":"string","enum":["theme-dir+config-line","merge-json","gui-import","append-and-reload","select-in-settings"]},"configFiles":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string"},"path":{"type":"string"}},"required":["platform","path"],"additionalProperties":false}},"snippet":{"type":"string"}},"required":["mode","configFiles"],"additionalProperties":false},"agentCanComplete":{"type":"boolean"},"check":{"type":"string"},"verify":{"type":"string"}},"required":["hint","platforms","download","activation","agentCanComplete","verify"],"additionalProperties":false}},"required":["filename","mime","content","palette","shareUrl"],"additionalProperties":false},"AdjustBody":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"p":{"type":"string","pattern":"^[0-9a-f]{132}$"},"hue":{"default":0,"type":"number","minimum":-180,"maximum":180},"saturation":{"default":100,"type":"number","minimum":0,"maximum":200},"lightness":{"default":0,"type":"number","minimum":-50,"maximum":50},"contrast":{"default":100,"type":"number","minimum":50,"maximum":150},"overrides":{"type":"object","propertyNames":{"type":"string","enum":["background","foreground","cursor","cursorText","selection","selectionText","black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"]},"additionalProperties":{"type":"string","pattern":"^#[0-9a-f]{6}$"}},"locale":{"default":"en","type":"string","enum":["zh-CN","zh-HK","zh-TW","ja","en"]}},"required":["hue","saturation","lightness","contrast","locale"],"additionalProperties":false},"AdjustResult":{"type":"object","properties":{"palette":{"type":"object","properties":{"background":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"foreground":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"cursor":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"cursorText":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"selection":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"selectionText":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"ansi":{"minItems":16,"maxItems":16,"type":"array","items":{"type":"string","pattern":"^#[0-9a-f]{6}$"}}},"required":["background","foreground","cursor","cursorText","selection","selectionText","ansi"],"additionalProperties":false},"p":{"type":"string"},"shareUrl":{"type":"string"},"foregroundContrast":{"type":"number"},"ansiContrastAvg":{"type":"number"}},"required":["palette","p","shareUrl","foregroundContrast","ansiContrastAvg"],"additionalProperties":false},"FormatItem":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["Terminal","Editor","Web","Data"]},"mime":{"type":"string"},"platforms":{"type":"array","items":{"type":"string","enum":["macOS","Linux","Windows"]}},"installHint":{"type":"string"},"hasSetupPrompt":{"type":"boolean"}},"required":["id","label","kind","mime","platforms","installHint","hasSetupPrompt"],"additionalProperties":false}}}}