{"openapi":"3.0.3","info":{"title":"Studio Skills API","version":"0.1.0","description":"Studio Bench design skills exposed as callable tools. Each /tools/{operationId} endpoint takes structured JSON, renders an HTML artifact (or transforms an existing one), and returns the canonical ToolResponse envelope. Deterministic template renders — no LLM inside the tool.","contact":{"name":"EpochCore LLC","email":"support@epochcoreqcs.com","url":"https://epochcoreqcs.com"}},"servers":[{"url":"https://agents.q-routed.com","description":"Studio Skills production"}],"paths":{"/tools/make_deck":{"post":{"operationId":"make_deck","summary":"Render a slide deck HTML artifact from a structured outline","description":"Takes a title and an ordered slides array; returns artifact_id + html_url. Pure deterministic template render.","tags":["Studio Skills"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"Deck title (used in cover + chrome)"},"slides":{"type":"array","minItems":1,"items":{"type":"object","properties":{"title":{"type":"string"},"body":{"description":"string OR array of bullet strings"},"layout":{"type":"string","enum":["cover","content","quote"]}},"required":["title"]}}},"required":["title","slides"]},"example":{"title":"Q3 Board Update","slides":[{"title":"Q3 results","layout":"cover"},{"title":"Three wins","body":["Charlotte pilots up 3x","API revenue green","PPTX in QA"]}]}}}},"responses":{"200":{"description":"Successful tool invocation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"400":{"description":"Invalid request body or parameters"},"401":{"description":"Unauthorized — missing or invalid x-api-key"},"404":{"description":"Tool not found"},"500":{"description":"Internal server error"},"503":{"description":"Tool exists but is not yet wired in this version"}}}},"/tools/make_video":{"post":{"operationId":"make_video","summary":"Render a timeline-based animation HTML artifact","description":"Builds a self-contained animation with scrubber, play/pause, and time-gated sprites.","tags":["Studio Skills"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"duration_s":{"type":"number","minimum":1,"maximum":600,"description":"Total runtime in seconds"},"scenes":{"type":"array","minItems":1,"items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"html":{"type":"string","description":"Inline HTML to render as the sprite"},"x":{"type":"number","description":"X position (percent 0-100)"},"y":{"type":"number","description":"Y position (percent 0-100)"}},"required":["start","end","html"]}}},"required":["duration_s","scenes"]},"example":{"duration_s":12,"scenes":[{"start":0,"end":4,"html":"<strong>Open.</strong>"},{"start":4,"end":8,"html":"<em>Reveal the insight.</em>"},{"start":8,"end":12,"html":"Close."}]}}}},"responses":{"200":{"description":"Successful tool invocation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"400":{"description":"Invalid request body or parameters"},"401":{"description":"Unauthorized — missing or invalid x-api-key"},"404":{"description":"Tool not found"},"500":{"description":"Internal server error"},"503":{"description":"Tool exists but is not yet wired in this version"}}}},"/tools/make_prototype":{"post":{"operationId":"make_prototype","summary":"Render an interactive multi-screen prototype HTML artifact","description":"Each screen lists components (input/cta/static); CTA buttons can specify next-screen index. Built-in left rail navigation.","tags":["Studio Skills"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"flow_name":{"type":"string"},"screens":{"type":"array","minItems":1,"items":{"type":"object","properties":{"name":{"type":"string"},"sub":{"type":"string"},"components":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["input","cta","static"]},"label":{"type":"string"},"placeholder":{"type":"string"},"next":{"type":"integer"}},"required":["type","label"]}}},"required":["name","components"]}},"initial_state":{"type":"object","additionalProperties":true}},"required":["flow_name","screens"]},"example":{"flow_name":"Onboarding","screens":[{"name":"Sign up","components":[{"type":"input","label":"Email"},{"type":"cta","label":"Continue","next":1}]},{"name":"Welcome","components":[{"type":"static","label":"You're in."}]}],"initial_state":{"step":0}}}}},"responses":{"200":{"description":"Successful tool invocation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"400":{"description":"Invalid request body or parameters"},"401":{"description":"Unauthorized — missing or invalid x-api-key"},"404":{"description":"Tool not found"},"500":{"description":"Internal server error"},"503":{"description":"Tool exists but is not yet wired in this version"}}}},"/tools/make_tweakable":{"post":{"operationId":"make_tweakable","summary":"Wrap an existing artifact with a floating tweak panel","description":"Takes a source artifact_id and a list of controls (segmented/slider/swatch); returns a new artifact_id wrapping the source in an iframe with the panel pinned bottom-right.","tags":["Studio Skills"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"artifact_id":{"type":"string","description":"Source artifact_id to wrap"},"controls":{"type":"array","minItems":1,"items":{"type":"object","properties":{"label":{"type":"string"},"type":{"type":"string","enum":["segmented","slider","swatch"]},"options":{"type":"array","items":{"type":"string"}},"min":{"type":"number"},"max":{"type":"number"},"value":{"type":"number"},"target":{"type":"string","description":"Optional CSS selector or var to drive"}},"required":["label","type"]}}},"required":["artifact_id","controls"]},"example":{"artifact_id":"art_abc123","controls":[{"label":"Voice","type":"segmented","options":["Italic","Mono","Bold"]},{"label":"Accent","type":"swatch","options":["#FF5B1F","#5B7BFF","#2DD4A3"]}]}}}},"responses":{"200":{"description":"Successful tool invocation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"400":{"description":"Invalid request body or parameters"},"401":{"description":"Unauthorized — missing or invalid x-api-key"},"404":{"description":"Tool not found"},"500":{"description":"Internal server error"},"503":{"description":"Tool exists but is not yet wired in this version"}}}},"/tools/make_frontend_design":{"post":{"operationId":"make_frontend_design","summary":"Render a design-direction explorer (palette + type pairing)","description":"Produces an HTML page committing to one direction (editorial/terminal/poster) with the given palette and type pair.","tags":["Studio Skills"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"direction":{"type":"string","enum":["editorial","terminal","poster"]},"type_pair":{"type":"object","properties":{"heading":{"type":"string"},"body":{"type":"string"}}},"palette":{"type":"object","properties":{"bg":{"type":"string"},"fg":{"type":"string"},"accent":{"type":"string"}}},"note":{"type":"string"}},"required":["direction"]},"example":{"direction":"editorial","type_pair":{"heading":"Instrument Serif","body":"Inter"},"palette":{"bg":"#0B0C0F","fg":"#F2EFE6","accent":"#FF5B1F"}}}}},"responses":{"200":{"description":"Successful tool invocation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"400":{"description":"Invalid request body or parameters"},"401":{"description":"Unauthorized — missing or invalid x-api-key"},"404":{"description":"Tool not found"},"500":{"description":"Internal server error"},"503":{"description":"Tool exists but is not yet wired in this version"}}}},"/tools/make_wireframe":{"post":{"operationId":"make_wireframe","summary":"Render a low-fi wireframe board (N columns, optional variants)","description":"Builds a multi-column wireframe artifact; each column = one screen; block types: 'b', 'tall', 'short', 'dash', 'cta'.","tags":["Studio Skills"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"flow_name":{"type":"string"},"screens":{"type":"array","minItems":1,"items":{"type":"object","properties":{"name":{"type":"string"},"blocks":{"type":"array","items":{"type":"string","enum":["b","tall","short","dash","cta"]}}},"required":["name","blocks"]}},"variants":{"type":"integer","minimum":1,"maximum":8,"default":1}},"required":["flow_name","screens"]},"example":{"flow_name":"Checkout","screens":[{"name":"Cart","blocks":["tall","b","short","cta"]},{"name":"Pay","blocks":["b","b","tall","cta"]},{"name":"Done","blocks":["tall","dash"]}],"variants":1}}}},"responses":{"200":{"description":"Successful tool invocation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"400":{"description":"Invalid request body or parameters"},"401":{"description":"Unauthorized — missing or invalid x-api-key"},"404":{"description":"Tool not found"},"500":{"description":"Internal server error"},"503":{"description":"Tool exists but is not yet wired in this version"}}}},"/tools/export_to_pdf":{"post":{"operationId":"export_to_pdf","summary":"Render an artifact to PDF via the Hew (headless-edge-worker) service","description":"Fetches the HTML artifact from R2, posts to Hew /tools/pdf_capture, returns the render_id + result_url.","tags":["Studio Skills"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"artifact_id":{"type":"string"},"page_size":{"type":"string","enum":["A4","Letter","Slide16x9"],"default":"Slide16x9"}},"required":["artifact_id"]},"example":{"artifact_id":"art_abc123","page_size":"Slide16x9"}}}},"responses":{"200":{"description":"Successful tool invocation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"400":{"description":"Invalid request body or parameters"},"401":{"description":"Unauthorized — missing or invalid x-api-key"},"404":{"description":"Tool not found"},"500":{"description":"Internal server error"},"503":{"description":"Tool exists but is not yet wired in this version"}}}},"/tools/export_to_pptx_png":{"post":{"operationId":"export_to_pptx_png","summary":"Per-slide screenshots from Hew, returned as a manifest (PPTX assembly deferred)","description":"Calls Hew once per slide to produce PNGs. v1 returns the screenshot manifest; PPTX assembly is a follow-up step.","tags":["Studio Skills"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"artifact_id":{"type":"string"},"slides":{"type":"array","minItems":1,"items":{"type":"integer","minimum":0},"description":"Slide indices to capture"}},"required":["artifact_id","slides"]},"example":{"artifact_id":"art_abc123","slides":[0,1,2,3]}}}},"responses":{"200":{"description":"Successful tool invocation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"400":{"description":"Invalid request body or parameters"},"401":{"description":"Unauthorized — missing or invalid x-api-key"},"404":{"description":"Tool not found"},"500":{"description":"Internal server error"},"503":{"description":"Tool exists but is not yet wired in this version"}}}},"/tools/export_to_pptx_edit":{"post":{"operationId":"export_to_pptx_edit","summary":"Native-editable PPTX (NOT YET WIRED — returns 503)","description":"v1 stub. Returns 503 + X-Skills-Hint: pending-pptx-native. Use export_to_pptx_png or export_to_pdf in the meantime.","tags":["Studio Skills"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"artifact_id":{"type":"string"}},"required":["artifact_id"]},"example":{"artifact_id":"art_abc123"}}}},"responses":{"200":{"description":"Successful tool invocation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"400":{"description":"Invalid request body or parameters"},"401":{"description":"Unauthorized — missing or invalid x-api-key"},"404":{"description":"Tool not found"},"500":{"description":"Internal server error"},"503":{"description":"Tool exists but is not yet wired in this version"}}}},"/tools/export_to_standalone_html":{"post":{"operationId":"export_to_standalone_html","summary":"Inline fonts/images/scripts into a single self-contained .html file","description":"v1 strips external Google Fonts <link> tags and emits an offline-safe HTML. Returns a new artifact_id.","tags":["Studio Skills"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"artifact_id":{"type":"string"},"inline":{"type":"array","items":{"type":"string","enum":["fonts","images","scripts"]},"default":["fonts","images","scripts"]}},"required":["artifact_id"]},"example":{"artifact_id":"art_abc123","inline":["fonts","images","scripts"]}}}},"responses":{"200":{"description":"Successful tool invocation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"400":{"description":"Invalid request body or parameters"},"401":{"description":"Unauthorized — missing or invalid x-api-key"},"404":{"description":"Tool not found"},"500":{"description":"Internal server error"},"503":{"description":"Tool exists but is not yet wired in this version"}}}},"/tools/export_to_canva":{"post":{"operationId":"export_to_canva","summary":"Send artifact to Canva (NOT YET WIRED — returns 503)","description":"v1 stub. Returns 503 + X-Skills-Hint: pending-canva-connect. Awaits Canva Connect OAuth provisioning.","tags":["Studio Skills"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"artifact_id":{"type":"string"}},"required":["artifact_id"]},"example":{"artifact_id":"art_abc123"}}}},"responses":{"200":{"description":"Successful tool invocation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"400":{"description":"Invalid request body or parameters"},"401":{"description":"Unauthorized — missing or invalid x-api-key"},"404":{"description":"Tool not found"},"500":{"description":"Internal server error"},"503":{"description":"Tool exists but is not yet wired in this version"}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"EpochCore API key for authentication"}},"schemas":{"ToolResponse":{"type":"object","properties":{"ok":{"type":"boolean","description":"Whether the tool invocation succeeded"},"tool":{"type":"string","description":"Name of the tool that was invoked"},"agent":{"type":"string","description":"Name of the agent — always 'studio-skills'"},"result":{"type":"object","additionalProperties":true,"description":"Tool-specific result payload"},"metadata":{"type":"object","properties":{"model":{"type":"string"},"version":{"type":"string"}}}},"required":["ok","tool","agent","result"]},"ErrorResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"tool":{"type":"string"},"agent":{"type":"string"},"error":{"type":"string"},"version":{"type":"string"}},"required":["ok","error"]}}}}