{"openapi": "3.1.0", "info": {"title": "NanoBase\u2122 API", "version": "2026-10-05", "description": "Loader envelope check, live ingredient search, INCI label builder and preservative guidance for formulas built on the NanoBase\u2122 Architecture. Read https://api.nanobaselabs.com/ai/primer first. NanoBase\u2122 composition, processing and equipment are protected trade secrets; queries seeking them are refused, logged and can suspend the key. Businesses sign up at https://api.nanobaselabs.com/register; use is governed by https://api.nanobaselabs.com/terms. Also available as a remote MCP server at https://api.nanobaselabs.com/mcp (Authorization: Bearer <key>)."}, "servers": [{"url": "https://api.nanobaselabs.com"}], "components": {"securitySchemes": {"key": {"type": "apiKey", "in": "header", "name": "x-nb-key"}}, "schemas": {"Line": {"type": "object", "description": "One formula line: an INCI ingredient {n,pct}, or a trade-name raw material broken into INCI components {pct,blend}.", "properties": {"n": {"type": "string"}, "pct": {"type": "number"}, "blend": {"type": "array", "items": {"type": "object", "properties": {"n": {"type": "string"}, "f": {"description": "fraction of the raw material, or \"trace\"", "oneOf": [{"type": "number"}, {"type": "string", "enum": ["trace"]}]}}}}}}}}, "security": [{"key": []}], "paths": {"/ai/primer": {"get": {"summary": "Agent primer: what NanoBase\u2122 is, formulating rules, workflow, protected-IP rules", "security": [], "responses": {"200": {"description": "text/markdown"}}}}, "/lib/search": {"get": {"summary": "Search the ingredient library (max 10, public fields)", "parameters": [{"name": "q", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2}}], "responses": {"200": {"description": "{total, results:[{n,c,up,...}]}"}}}}, "/check": {"post": {"summary": "Envelope check of a finished formula", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"base": {"type": "string", "enum": ["classic", "luxe", "clinical"]}, "basePct": {"type": "number"}, "ph": {"type": "number"}, "lines": {"type": "array", "items": {"$ref": "#/components/schemas/Line"}}}}}}}, "responses": {"200": {"description": "verdict, categories, remedies, maxLoads, lines, unmatched, usage"}}}}, "/ai/preservation": {"post": {"summary": "Preservative cap check and top-up guidance (no amounts)", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"variant": {"type": "string", "enum": ["classic", "luxe", "clinical"]}, "nbPct": {"type": "number"}, "lines": {"type": "array", "items": {"$ref": "#/components/schemas/Line"}}}}}}}, "responses": {"200": {"description": "selfPreserved, topUp, reasons, caps, advice"}}}}, "/inci/label": {"post": {"summary": "Finished INCI list, highest to lowest (order only, never amounts)", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"variant": {"type": "string", "enum": ["classic", "luxe", "clinical"]}, "nbPct": {"type": "number"}, "lines": {"type": "array", "items": {"$ref": "#/components/schemas/Line"}}}}}}}, "responses": {"200": {"description": "mode label: finished_inci, ordered, tail (NanoBase expanded, names only). mode composition: composition[{name,pct}], composition_sheet (NanoBase one line, with %)"}}}}, "/account": {"get": {"summary": "Your plan (free, standard or unlimited), paid-through date, runs used this month and Terms version", "responses": {"200": {"description": "{company, tier, paidThrough, month, runsUsed, runsLimit, termsVersion, upgrade, terms}"}}}}, "/terms": {"get": {"summary": "NanoBase\u2122 API Terms of Service (HTML)", "security": [], "responses": {"200": {"description": "text/html"}}}}}}