{"servers":[{"url":"https://sleek.design/api/v1"}],"info":{"title":"Sleek","version":"1.0.0","description":"Generate mobile app UI designs with AI. The Sleek API turns a text prompt into mobile app screens and the components behind them: start an AI design run and poll it to completion, read the generated components as HTML, render screenshots, and browse featured design references. Built for automation and AI coding agents like Claude Code, Cursor, Codex, or any AI agent. Authenticate with a Bearer API key: create one at https://sleek.design/agents/setup. Free accounts can try the API with their one-time trial credits (about one design run); sustained use requires the Pro plan or higher ($69/month, or $30/month billed yearly at $360/year, including 20,000 monthly AI credits). Agent onboarding instructions: https://sleek.design/agents.md","contact":{"name":"Sleek","url":"https://sleek.design"}},"externalDocs":{"url":"https://sleek.design/api/v1/docs","description":"Interactive API reference"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"openapi":"3.1.1","paths":{"/projects":{"get":{"operationId":"listProjects","summary":"List projects","tags":["Projects"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","slug","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["total","limit","offset"]}},"required":["data","pagination"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"post":{"operationId":"createProject","summary":"Create a project","tags":["Projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","slug","createdAt","updatedAt"]}},"required":["data"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/projects/{projectId}":{"get":{"operationId":"findProject","summary":"Get a project","tags":["Projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","slug","createdAt","updatedAt"]}},"required":["data"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}},"delete":{"operationId":"deleteProject","summary":"Delete a project","tags":["Projects"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/projects/{projectId}/components":{"get":{"operationId":"listComponents","summary":"List a project's components","tags":["Components"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"allowEmptyValue":true,"allowReserved":true},{"name":"inlineIcons","in":"query","required":false,"schema":{"type":"boolean","default":false},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"screenId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The id of the screen this component renders on the canvas. It is the value target.screenId takes when you edit this screen with a chat message, and the same screenId run results report. Null when the component is not placed on a canvas."},"name":{"type":"string"},"activeVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"number"},"code":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","version","code","createdAt"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","screenId","name","activeVersion","versions","createdAt","updatedAt"]}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["total","limit","offset"]}},"required":["data","pagination"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/projects/{projectId}/components/{componentId}":{"get":{"operationId":"findComponent","summary":"Get a component","tags":["Components"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"componentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"inlineIcons","in":"query","required":false,"schema":{"type":"boolean","default":false},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"screenId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The id of the screen this component renders on the canvas. It is the value target.screenId takes when you edit this screen with a chat message, and the same screenId run results report. Null when the component is not placed on a canvas."},"name":{"type":"string"},"activeVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"number"},"code":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","version","code","createdAt"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","screenId","name","activeVersion","versions","createdAt","updatedAt"]}},"required":["data"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/references":{"get":{"operationId":"listReferences","summary":"List design references","tags":["References"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"previewImageUrls":{"type":"array","items":{"type":"string"}}},"required":["id","name","previewImageUrls"]}},"pagination":{"type":"object","properties":{"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["total","limit","offset"]}},"required":["data","pagination"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/projects/{projectId}/chat/messages":{"post":{"operationId":"sendProjectChatMessage","summary":"Send a chat message (start a design run)","tags":["Chat"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"wait","in":"query","schema":{"type":"string","description":"When true, wait for the run to finish and respond 200; otherwise respond 202 immediately. Accepts true/false, 1/0, yes/no, on/off."},"allowEmptyValue":true,"allowReserved":true},{"name":"idempotency-key","in":"header","schema":{"type":"string","maxLength":255,"description":"Optional idempotency key. A retried request with the same key returns the original run instead of starting a new one."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"text":{"type":"string","minLength":1}},"required":["text"]},"imageUrls":{"type":"array","items":{"type":"string","format":"uri"},"default":[]},"target":{"type":"object","properties":{"screenId":{"type":"string","minLength":1,"description":"The screen to edit, identified by its screenId as returned by the components endpoints and by run results. It is not the component id."}},"required":["screenId"]},"models":{"type":"object","properties":{"mainAgent":{"type":"string"},"mainAgentSetup":{"type":"string"}},"description":"Experiment-only per-phase model overrides. Honored only when the server runs with ENABLE_MODEL_OVERRIDE=true; inert in production."},"source":{"type":"string","minLength":1,"maxLength":64},"referenceId":{"type":"string","minLength":1,"maxLength":64}},"required":["message"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"runId":{"type":"string"},"status":{"enum":["queued","running","completed","failed"],"type":"string"},"statusUrl":{"type":"string"},"result":{"type":"object","properties":{"assistantText":{"type":"string"},"operations":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"const":"screen_created"},"screenId":{"type":"string"},"screenName":{"type":"string"},"componentId":{"type":"string"}},"required":["type","screenId","screenName","componentId"]},{"type":"object","properties":{"type":{"const":"screen_updated"},"screenId":{"type":"string"},"componentId":{"type":"string"}},"required":["type","screenId","componentId"]},{"type":"object","properties":{"type":{"const":"theme_updated"}},"required":["type"]}]}}},"required":["assistantText","operations"],"description":"Best-effort apply semantics: failed runs can include operations already applied before failure."},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"url":{"type":"string","description":"Where the caller's user can resolve this error (e.g. top up credits). Relay it to the user."}},"required":["code","message"]}},"required":["runId","status","statusUrl"]}},"required":["data"]}}}},"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"runId":{"type":"string"},"status":{"enum":["queued","running","completed","failed"],"type":"string"},"statusUrl":{"type":"string"},"result":{"type":"object","properties":{"assistantText":{"type":"string"},"operations":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"const":"screen_created"},"screenId":{"type":"string"},"screenName":{"type":"string"},"componentId":{"type":"string"}},"required":["type","screenId","screenName","componentId"]},{"type":"object","properties":{"type":{"const":"screen_updated"},"screenId":{"type":"string"},"componentId":{"type":"string"}},"required":["type","screenId","componentId"]},{"type":"object","properties":{"type":{"const":"theme_updated"}},"required":["type"]}]}}},"required":["assistantText","operations"],"description":"Best-effort apply semantics: failed runs can include operations already applied before failure."},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"url":{"type":"string","description":"Where the caller's user can resolve this error (e.g. top up credits). Relay it to the user."}},"required":["code","message"]}},"required":["runId","status","statusUrl"]}},"required":["data"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/projects/{projectId}/chat/runs/{runId}":{"get":{"operationId":"getProjectChatRun","summary":"Get a chat run","tags":["Chat"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"runId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"runId":{"type":"string"},"status":{"enum":["queued","running","completed","failed"],"type":"string"},"statusUrl":{"type":"string"},"result":{"type":"object","properties":{"assistantText":{"type":"string"},"operations":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"const":"screen_created"},"screenId":{"type":"string"},"screenName":{"type":"string"},"componentId":{"type":"string"}},"required":["type","screenId","screenName","componentId"]},{"type":"object","properties":{"type":{"const":"screen_updated"},"screenId":{"type":"string"},"componentId":{"type":"string"}},"required":["type","screenId","componentId"]},{"type":"object","properties":{"type":{"const":"theme_updated"}},"required":["type"]}]}}},"required":["assistantText","operations"],"description":"Best-effort apply semantics: failed runs can include operations already applied before failure."},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"url":{"type":"string","description":"Where the caller's user can resolve this error (e.g. top up credits). Relay it to the user."}},"required":["code","message"]}},"required":["runId","status","statusUrl"]}},"required":["data"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/projects/{projectId}/chat/runs/{runId}/cancel":{"post":{"operationId":"cancelProjectChatRun","summary":"Cancel a chat run","tags":["Chat"],"parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"runId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"runId":{"type":"string"},"status":{"enum":["queued","running","completed","failed"],"type":"string"},"statusUrl":{"type":"string"},"result":{"type":"object","properties":{"assistantText":{"type":"string"},"operations":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"const":"screen_created"},"screenId":{"type":"string"},"screenName":{"type":"string"},"componentId":{"type":"string"}},"required":["type","screenId","screenName","componentId"]},{"type":"object","properties":{"type":{"const":"screen_updated"},"screenId":{"type":"string"},"componentId":{"type":"string"}},"required":["type","screenId","componentId"]},{"type":"object","properties":{"type":{"const":"theme_updated"}},"required":["type"]}]}}},"required":["assistantText","operations"],"description":"Best-effort apply semantics: failed runs can include operations already applied before failure."},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"url":{"type":"string","description":"Where the caller's user can resolve this error (e.g. top up credits). Relay it to the user."}},"required":["code","message"]}},"required":["runId","status","statusUrl"]}},"required":["data"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/screenshots":{"post":{"operationId":"takeScreenshot","summary":"Render a component screenshot","tags":["Rendering"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"componentIds":{"type":"array","minItems":1,"items":{"type":"string","minLength":1}},"projectId":{"type":"string","minLength":1},"componentVersionOverrides":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string","minLength":1}},"themeVersionOverrides":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string","minLength":1}},"format":{"enum":["png","webp"],"type":"string","default":"png"},"scale":{"type":"integer","minimum":1,"maximum":3,"default":2},"gap":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":40},"padding":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":40},"paddingX":{"type":"integer","minimum":0,"maximum":9007199254740991},"paddingY":{"type":"integer","minimum":0,"maximum":9007199254740991},"paddingTop":{"type":"integer","minimum":0,"maximum":9007199254740991},"paddingRight":{"type":"integer","minimum":0,"maximum":9007199254740991},"paddingBottom":{"type":"integer","minimum":0,"maximum":9007199254740991},"paddingLeft":{"type":"integer","minimum":0,"maximum":9007199254740991},"background":{"type":"string","default":"transparent"},"showDots":{"type":"boolean","default":false},"radius":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":48},"fullHeight":{"type":"boolean","default":false,"description":"Expand each frame to the full height of its content before capturing, so scrollable screens are rendered fully extended rather than cut off at the bottom of the frame. Frames are capped at 4x the default frame height."}},"required":["componentIds","projectId"]}}}},"responses":{"200":{"description":"The rendered image","content":{"image/png":{"schema":{"type":"string","contentMediaType":"image/png"}},"image/webp":{"schema":{"type":"string","contentMediaType":"image/webp"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/share-cards":{"post":{"operationId":"createShareCard","summary":"Render a share card","tags":["Rendering"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"componentIds":{"type":"array","minItems":1,"maxItems":4,"items":{"type":"string","minLength":1}},"projectId":{"type":"string","minLength":1},"componentVersionOverrides":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string","minLength":1}},"themeVersionOverrides":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string","minLength":1}},"layout":{"enum":["stack","row"],"type":"string","default":"stack"},"background":{"enum":["midnight","ember","paper","violet","ocean"],"type":"string","default":"midnight"},"title":{"type":"string","maxLength":80}},"required":["componentIds","projectId"]}}}},"responses":{"200":{"description":"The rendered share card","content":{"image/png":{"schema":{"type":"string","contentMediaType":"image/png"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/device/start":{"post":{"operationId":"deviceStart","summary":"Start device authorization","description":"Begin the device-authorization flow. Returns a device code to poll with and a user code plus verification URL to show your user, who signs in and approves the key in their browser.","tags":["Device"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","minLength":1,"maxLength":64}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deviceCode":{"type":"string"},"userCode":{"type":"string"},"verificationUrl":{"type":"string"},"expiresIn":{"type":"number"},"interval":{"type":"number"}},"required":["deviceCode","userCode","verificationUrl","expiresIn","interval"]}},"required":["data"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[]}},"/device/poll":{"post":{"operationId":"devicePoll","summary":"Poll device authorization","description":"Poll a device authorization with its device code. Returns pending until the user approves, then the API key exactly once, or expired once the code lapses.","tags":["Device"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceCode":{"type":"string","minLength":1}},"required":["deviceCode"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"status":{"const":"pending"}},"required":["status"]},{"type":"object","properties":{"status":{"const":"approved"},"key":{"type":"string"},"keyId":{"type":"string"},"name":{"type":"string"}},"required":["status","key","keyId","name"]},{"type":"object","properties":{"status":{"const":"expired"}},"required":["status"]}]}},"required":["data"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string","default":"Too many requests"},"data":{"type":"object","properties":{"url":{"type":"string","description":"Where to resolve this error (send your user here)."}},"required":["url"]}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"INTERNAL_SERVER_ERROR"},"status":{"const":500},"message":{"type":"string","default":"Internal server error"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"security":[]}}}}