{"openapi":"3.1.1","info":{"title":"Arclen UI Registry and Download API","version":"1.0.0","description":"Read-only component discovery, source packages, agent briefs and standalone HTML downloads. Free components are public. Pro payloads require server-verified Arclen UI entitlement. Browser sign-in, billing and account mutations are outside this integration contract. No fixed public request quota is promised; avoid repeated downloads and back off on 429 or 503.","contact":{"name":"Arclen UI support","url":"https://arclenui.dev/contact","email":"support@arclen.io"}},"servers":[{"url":"https://arclenui.dev","description":"Production"}],"externalDocs":{"description":"Arclen UI API documentation","url":"https://arclenui.dev/docs/api"},"tags":[{"name":"Components","description":"Discover and retrieve component packages."}],"paths":{"/r/registry.json":{"get":{"operationId":"listFreeComponents","summary":"List free components","description":"Find free component slugs, names, descriptions and categories. No authentication required. Pro catalogue summaries are available in /llms.txt.","tags":["Components"],"security":[],"responses":{"200":{"description":"Free registry index.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistryIndex"}}}}}}},"/r/{slug}.json":{"get":{"operationId":"getComponentRegistry","summary":"Get React component source","description":"Read source files, dependencies and settings metadata. Binary files use encoding: base64; the Arclen UI CLI decodes these. Never overwrite user-edited files without their consent.","tags":["Components"],"parameters":[{"name":"slug","in":"path","required":true,"description":"Published component slug. Discover free slugs with listFreeComponents and Pro slugs in /llms.txt.","schema":{"type":"string","pattern":"^[a-z][a-z0-9-]*$"},"example":"signal-field"},{"name":"settings","in":"query","required":false,"description":"URL-encoded JSON object of component settings, up to 150000 decoded characters. Read keys, defaults and constraints from the registry item meta.settings. Omitted keys retain defaults. This is JSON, not the CLI base64url encoding.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"example":{"speed":0.2}}}}],"security":[{},{"agentToken":[]},{"browserSession":[]}],"responses":{"200":{"description":"Component payload. Pro access is checked before sending any licensed source.","headers":{"Cache-Control":{"schema":{"type":"string"},"description":"private, no-store"},"Vary":{"schema":{"type":"string"},"description":"Authorization, Cookie"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistryItem"}}}},"400":{"description":"Invalid settings. Correct keys, value types or bounds before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Pro component requires an identified caller. Follow the hint to sign in or configure agent access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Caller is identified but does not have Arclen UI Pro access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Component or requested registry filename does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Package or entitlement verification temporarily unavailable. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/r/{slug}.md":{"get":{"operationId":"getComponentBrief","summary":"Get an agent brief","description":"Read installation and component guidance in Markdown. Pro briefs require the same entitlement as source downloads.","tags":["Components"],"parameters":[{"name":"slug","in":"path","required":true,"description":"Published component slug. Discover free slugs with listFreeComponents and Pro slugs in /llms.txt.","schema":{"type":"string","pattern":"^[a-z][a-z0-9-]*$"},"example":"signal-field"},{"name":"settings","in":"query","required":false,"description":"URL-encoded JSON object of component settings, up to 150000 decoded characters. Read keys, defaults and constraints from the registry item meta.settings. Omitted keys retain defaults. This is JSON, not the CLI base64url encoding.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"example":{"speed":0.2}}}}],"security":[{},{"agentToken":[]},{"browserSession":[]}],"responses":{"200":{"description":"Component payload. Pro access is checked before sending any licensed source.","headers":{"Cache-Control":{"schema":{"type":"string"},"description":"private, no-store"},"Vary":{"schema":{"type":"string"},"description":"Authorization, Cookie"}},"content":{"text/markdown":{"schema":{"type":"string","description":"Component instructions in Markdown."}}}},"400":{"description":"Invalid settings. Correct keys, value types or bounds before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Pro component requires an identified caller. Follow the hint to sign in or configure agent access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Caller is identified but does not have Arclen UI Pro access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Component or requested registry filename does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Package or entitlement verification temporarily unavailable. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/download/{slug}":{"get":{"operationId":"downloadComponentHtml","summary":"Download standalone HTML","description":"Get a ZIP with HTML, CSS, JavaScript and assets. With format=html, receive inlined HTML as text/plain for source delivery. Do not assume an application/json success body.","tags":["Components"],"parameters":[{"name":"slug","in":"path","required":true,"description":"Published component slug. Discover free slugs with listFreeComponents and Pro slugs in /llms.txt.","schema":{"type":"string","pattern":"^[a-z][a-z0-9-]*$"},"example":"signal-field"},{"name":"settings","in":"query","required":false,"description":"URL-encoded JSON object of component settings, up to 150000 decoded characters. Read keys, defaults and constraints from the registry item meta.settings. Omitted keys retain defaults. This is JSON, not the CLI base64url encoding.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"example":{"speed":0.2}}}},{"name":"format","in":"query","required":false,"description":"Use html for inlined HTML text; omit for a ZIP. The existing endpoint treats any value other than html as ZIP.","schema":{"type":"string","default":"zip","examples":["zip","html"]}}],"security":[{},{"agentToken":[]},{"browserSession":[]}],"responses":{"200":{"description":"Component payload. Pro access is checked before sending any licensed source.","headers":{"Cache-Control":{"schema":{"type":"string"},"description":"private, no-store"},"Vary":{"schema":{"type":"string"},"description":"Authorization, Cookie"}},"content":{"application/zip":{"schema":{"type":"string","format":"binary","description":"ZIP archive of the standalone component."}},"text/plain":{"schema":{"type":"string","description":"Inlined HTML source, when format=html."}}}},"400":{"description":"Invalid settings. Correct keys, value types or bounds before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Pro component requires an identified caller. Follow the hint to sign in or configure agent access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Caller is identified but does not have Arclen UI Pro access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Component or requested registry filename does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Package or entitlement verification temporarily unavailable. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"agentToken":{"type":"http","scheme":"bearer","description":"Only for Pro. Agent token availability is controlled by deployment configuration; check /agents before provisioning. Never place a token in a URL."},"browserSession":{"type":"apiKey","in":"cookie","name":"arclen-ui-session","description":"HTTP-only session from the normal Arclen sign-in flow. Agents must not extract browser credentials."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"Short error label retained for existing clients."},"code":{"type":"string","enum":["NOT_FOUND","INVALID_SETTINGS","UNAUTHORIZED","FORBIDDEN","UNAVAILABLE"],"description":"Stable machine-readable failure code."},"message":{"type":"string","description":"Human-readable explanation."},"hint":{"type":"string","description":"Suggested recovery action."},"docs":{"type":"string","format":"uri","description":"Official integration documentation."}},"required":["error","code","message","hint","docs"]},"ComponentSummary":{"type":"object","properties":{"name":{"type":"string","description":"Stable component slug."},"type":{"type":"string","const":"registry:component"},"title":{"type":"string","description":"Display name."},"description":{"type":"string","description":"What the component does."},"categories":{"type":"array","items":{"type":"string"}}},"required":["name","type","title","description","categories"]},"RegistryIndex":{"type":"object","properties":{"$schema":{"type":"string","format":"uri"},"name":{"type":"string","const":"arclen-ui"},"homepage":{"type":"string","format":"uri"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ComponentSummary"}}},"required":["$schema","name","homepage","items"]},"Setting":{"type":"object","properties":{"key":{"type":"string","description":"Key accepted by the settings query object."},"kind":{"type":"string","enum":["select","text","string-list","number","boolean","color","image"]},"label":{"type":"string","description":"Control label."},"default":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number"},"maxLength":{"type":"integer","minimum":0},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"]}}},"required":["key","kind","label","default"]},"RegistryFile":{"type":"object","properties":{"path":{"type":"string","description":"Relative package path; reject traversal when writing files."},"type":{"type":"string","const":"registry:component"},"target":{"type":"string","description":"Suggested relative installation target."},"content":{"type":"string","description":"File source text, or base64 bytes when encoding is base64."},"encoding":{"type":"string","const":"base64","description":"Absent for text files. Binary assets must be decoded."}},"required":["path","type","target","content"]},"RegistryItem":{"type":"object","properties":{"$schema":{"type":"string","format":"uri"},"name":{"type":"string","description":"Component slug."},"type":{"type":"string","const":"registry:component"},"title":{"type":"string","description":"Display name."},"description":{"type":"string","description":"Component purpose."},"dependencies":{"type":"array","items":{"type":"string"}},"registryDependencies":{"type":"array","items":{"type":"string"}},"files":{"type":"array","items":{"$ref":"#/components/schemas/RegistryFile"}},"docs":{"type":"string","description":"Installation guidance."},"meta":{"type":"object","properties":{"version":{"type":"string","description":"Published component version."},"tier":{"type":"string","enum":["free","pro"]},"settings":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}}},"required":["version","tier","settings"]}},"required":["$schema","name","type","title","description","dependencies","registryDependencies","files","docs","meta"]}}}}