{"openapi":"3.1.0","info":{"title":"MintRender API","version":"1.0.0","description":"Template plus data gives a finished image (PNG, JPEG, WebP, SVG) or PDF. Docs: https://mintrender.com/docs"},"servers":[{"url":"https://mintrender.com"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"An API key: `mr_live_…` or `mr_test_…` (test keys render with a watermark and cost nothing)."}},"schemas":{"Scene_Layer":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"name":{"type":"string","maxLength":100},"x":{"default":0,"type":"number","minimum":-100000,"maximum":100000},"y":{"default":0,"type":"number","minimum":-100000,"maximum":100000},"w":{"type":"number","minimum":0,"maximum":100000},"h":{"type":"number","minimum":0,"maximum":100000},"rotation":{"default":0,"type":"number","minimum":-360,"maximum":360},"opacity":{"default":1,"type":"number","minimum":0,"maximum":1},"visible":{"default":true,"type":"boolean"},"locked":{"default":false,"type":"boolean"},"shadow":{"type":"object","properties":{"x":{"default":0,"type":"number","minimum":-1000,"maximum":1000},"y":{"default":4,"type":"number","minimum":-1000,"maximum":1000},"blur":{"default":8,"type":"number","minimum":0,"maximum":500},"color":{"default":"#00000040","type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"}},"additionalProperties":false},"blur":{"default":0,"type":"number","minimum":0,"maximum":250},"blend":{"default":"normal","type":"string","enum":["normal","multiply","screen","overlay","darken","lighten"]},"param":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"type":{"type":"string","const":"text"},"text":{"default":"","type":"string","maxLength":10000},"font":{"default":"Inter","type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,63}$"},"fallbackFonts":{"default":[],"maxItems":4,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,63}$"}},"weight":{"default":400,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"italic":{"default":false,"type":"boolean"},"size":{"default":32,"type":"number","minimum":1,"maximum":1000},"minSize":{"type":"number","minimum":1,"maximum":1000},"maxSize":{"type":"number","minimum":1,"maximum":1000},"fit":{"default":"none","type":"string","enum":["none","shrink","grow"]},"lineHeight":{"default":1.2,"type":"number","minimum":0.5,"maximum":5},"letterSpacing":{"default":0,"type":"number","minimum":-100,"maximum":1000},"color":{"default":"#000000","type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"},"align":{"default":"left","type":"string","enum":["left","center","right"]},"valign":{"default":"top","type":"string","enum":["top","middle","bottom"]},"maxLines":{"type":"integer","minimum":1,"maximum":1000},"uppercase":{"default":false,"type":"boolean"},"markup":{"default":false,"type":"boolean"}},"required":["id","w","h","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"name":{"type":"string","maxLength":100},"x":{"default":0,"type":"number","minimum":-100000,"maximum":100000},"y":{"default":0,"type":"number","minimum":-100000,"maximum":100000},"w":{"type":"number","minimum":0,"maximum":100000},"h":{"type":"number","minimum":0,"maximum":100000},"rotation":{"default":0,"type":"number","minimum":-360,"maximum":360},"opacity":{"default":1,"type":"number","minimum":0,"maximum":1},"visible":{"default":true,"type":"boolean"},"locked":{"default":false,"type":"boolean"},"shadow":{"type":"object","properties":{"x":{"default":0,"type":"number","minimum":-1000,"maximum":1000},"y":{"default":4,"type":"number","minimum":-1000,"maximum":1000},"blur":{"default":8,"type":"number","minimum":0,"maximum":500},"color":{"default":"#00000040","type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"}},"additionalProperties":false},"blur":{"default":0,"type":"number","minimum":0,"maximum":250},"blend":{"default":"normal","type":"string","enum":["normal","multiply","screen","overlay","darken","lighten"]},"param":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"type":{"type":"string","const":"image"},"src":{"default":"","type":"string","maxLength":2048,"pattern":"^($|asset:[A-Za-z0-9_]{1,64}$|https?:\\/\\/\\S+$)"},"fit":{"default":"cover","type":"string","enum":["cover","contain","fill"]},"focal":{"default":{"x":0.5,"y":0.5},"type":"object","properties":{"x":{"default":0.5,"type":"number","minimum":0,"maximum":1},"y":{"default":0.5,"type":"number","minimum":0,"maximum":1}},"additionalProperties":false},"radius":{"default":0,"anyOf":[{"type":"number","minimum":0,"maximum":100000},{"type":"array","prefixItems":[{"type":"number","minimum":0,"maximum":100000},{"type":"number","minimum":0,"maximum":100000},{"type":"number","minimum":0,"maximum":100000},{"type":"number","minimum":0,"maximum":100000}],"items":false,"minItems":4,"maxItems":4}]},"filters":{"type":"object","properties":{"grayscale":{"default":0,"type":"number","minimum":0,"maximum":1},"brightness":{"default":1,"type":"number","minimum":0,"maximum":4},"contrast":{"default":1,"type":"number","minimum":0,"maximum":4},"blur":{"default":0,"type":"number","minimum":0,"maximum":250}},"additionalProperties":false}},"required":["id","w","h","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"name":{"type":"string","maxLength":100},"x":{"default":0,"type":"number","minimum":-100000,"maximum":100000},"y":{"default":0,"type":"number","minimum":-100000,"maximum":100000},"w":{"type":"number","minimum":0,"maximum":100000},"h":{"type":"number","minimum":0,"maximum":100000},"rotation":{"default":0,"type":"number","minimum":-360,"maximum":360},"opacity":{"default":1,"type":"number","minimum":0,"maximum":1},"visible":{"default":true,"type":"boolean"},"locked":{"default":false,"type":"boolean"},"shadow":{"type":"object","properties":{"x":{"default":0,"type":"number","minimum":-1000,"maximum":1000},"y":{"default":4,"type":"number","minimum":-1000,"maximum":1000},"blur":{"default":8,"type":"number","minimum":0,"maximum":500},"color":{"default":"#00000040","type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"}},"additionalProperties":false},"blur":{"default":0,"type":"number","minimum":0,"maximum":250},"blend":{"default":"normal","type":"string","enum":["normal","multiply","screen","overlay","darken","lighten"]},"param":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"type":{"type":"string","const":"shape"},"shape":{"default":"rect","type":"string","enum":["rect","ellipse","line","polygon"]},"fill":{"anyOf":[{"type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"linear"},"angle":{"default":0,"type":"number","minimum":-360,"maximum":360},"stops":{"minItems":2,"maxItems":16,"type":"array","items":{"type":"object","properties":{"offset":{"type":"number","minimum":0,"maximum":1},"color":{"type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"}},"required":["offset","color"],"additionalProperties":false}}},"required":["type","stops"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"radial"},"cx":{"default":0.5,"type":"number","minimum":0,"maximum":1},"cy":{"default":0.5,"type":"number","minimum":0,"maximum":1},"r":{"default":0.5,"type":"number","minimum":0,"maximum":2},"stops":{"minItems":2,"maxItems":16,"type":"array","items":{"type":"object","properties":{"offset":{"type":"number","minimum":0,"maximum":1},"color":{"type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"}},"required":["offset","color"],"additionalProperties":false}}},"required":["type","stops"],"additionalProperties":false}]}]},"stroke":{"type":"object","properties":{"color":{"type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"},"width":{"default":1,"type":"number","minimum":0,"maximum":1000},"dash":{"maxItems":8,"type":"array","items":{"type":"number","minimum":0,"maximum":1000}}},"required":["color"],"additionalProperties":false},"radius":{"default":0,"anyOf":[{"type":"number","minimum":0,"maximum":100000},{"type":"array","prefixItems":[{"type":"number","minimum":0,"maximum":100000},{"type":"number","minimum":0,"maximum":100000},{"type":"number","minimum":0,"maximum":100000},{"type":"number","minimum":0,"maximum":100000}],"items":false,"minItems":4,"maxItems":4}]},"points":{"maxItems":500,"type":"array","items":{"type":"array","prefixItems":[{"type":"number","minimum":-10,"maximum":10},{"type":"number","minimum":-10,"maximum":10}],"items":false,"minItems":2,"maxItems":2}}},"required":["id","w","h","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"name":{"type":"string","maxLength":100},"x":{"default":0,"type":"number","minimum":-100000,"maximum":100000},"y":{"default":0,"type":"number","minimum":-100000,"maximum":100000},"w":{"type":"number","minimum":0,"maximum":100000},"h":{"type":"number","minimum":0,"maximum":100000},"rotation":{"default":0,"type":"number","minimum":-360,"maximum":360},"opacity":{"default":1,"type":"number","minimum":0,"maximum":1},"visible":{"default":true,"type":"boolean"},"locked":{"default":false,"type":"boolean"},"shadow":{"type":"object","properties":{"x":{"default":0,"type":"number","minimum":-1000,"maximum":1000},"y":{"default":4,"type":"number","minimum":-1000,"maximum":1000},"blur":{"default":8,"type":"number","minimum":0,"maximum":500},"color":{"default":"#00000040","type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"}},"additionalProperties":false},"blur":{"default":0,"type":"number","minimum":0,"maximum":250},"blend":{"default":"normal","type":"string","enum":["normal","multiply","screen","overlay","darken","lighten"]},"param":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"type":{"type":"string","const":"chart"},"chart":{"type":"object","properties":{"kind":{"type":"string","enum":["bar","line","area","pie","doughnut","sparkline","progress","number","scatter","histogram","boxplot","dotplot"]},"series":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"values":{"default":[],"maxItems":1000,"type":"array","items":{"type":"number","minimum":-1000000000000000,"maximum":1000000000000000}},"points":{"maxItems":1000,"type":"array","items":{"type":"array","prefixItems":[{"type":"number","minimum":-1000000000000000,"maximum":1000000000000000},{"type":"number","minimum":-1000000000000000,"maximum":1000000000000000}],"items":false,"minItems":2,"maxItems":2}},"color":{"type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"}},"additionalProperties":false}},"labels":{"default":[],"maxItems":1000,"type":"array","items":{"type":"string","maxLength":100}},"orientation":{"default":"vertical","type":"string","enum":["vertical","horizontal"]},"stacked":{"default":false,"type":"boolean"},"axis":{"default":true,"type":"boolean"},"grid":{"default":true,"type":"boolean"},"valueLabels":{"default":false,"type":"boolean"},"legend":{"default":false,"type":"boolean"},"colors":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"}},"value":{"type":"number","minimum":-1000000000000000,"maximum":1000000000000000},"max":{"type":"number","exclusiveMinimum":0,"maximum":1000000000000000},"progressStyle":{"default":"bar","type":"string","enum":["bar","ring"]},"previous":{"type":"number","minimum":-1000000000000000,"maximum":1000000000000000},"format":{"default":{"decimals":0,"prefix":"","suffix":"","compact":false},"type":"object","properties":{"decimals":{"default":0,"type":"integer","minimum":0,"maximum":6},"prefix":{"default":"","type":"string","maxLength":8},"suffix":{"default":"","type":"string","maxLength":8},"compact":{"default":false,"type":"boolean"}},"additionalProperties":false},"binCount":{"type":"integer","minimum":1,"maximum":200},"binWidth":{"type":"number","exclusiveMinimum":0},"dotSize":{"default":6,"type":"number","minimum":1,"maximum":100},"dotShape":{"default":"circle","type":"string","enum":["circle","square","diamond"]},"trendLine":{"default":false,"type":"boolean"},"showMean":{"default":false,"type":"boolean"},"font":{"default":"Inter","type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,63}$"},"fontSize":{"default":14,"type":"number","minimum":4,"maximum":200},"textColor":{"default":"#334155","type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"},"gridColor":{"default":"#e2e8f0","type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"}},"required":["kind"],"additionalProperties":false}},"required":["id","w","h","type","chart"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"name":{"type":"string","maxLength":100},"x":{"default":0,"type":"number","minimum":-100000,"maximum":100000},"y":{"default":0,"type":"number","minimum":-100000,"maximum":100000},"w":{"type":"number","minimum":0,"maximum":100000},"h":{"type":"number","minimum":0,"maximum":100000},"rotation":{"default":0,"type":"number","minimum":-360,"maximum":360},"opacity":{"default":1,"type":"number","minimum":0,"maximum":1},"visible":{"default":true,"type":"boolean"},"locked":{"default":false,"type":"boolean"},"shadow":{"type":"object","properties":{"x":{"default":0,"type":"number","minimum":-1000,"maximum":1000},"y":{"default":4,"type":"number","minimum":-1000,"maximum":1000},"blur":{"default":8,"type":"number","minimum":0,"maximum":500},"color":{"default":"#00000040","type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"}},"additionalProperties":false},"blur":{"default":0,"type":"number","minimum":0,"maximum":250},"blend":{"default":"normal","type":"string","enum":["normal","multiply","screen","overlay","darken","lighten"]},"param":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"type":{"type":"string","const":"qr"},"value":{"default":"","type":"string","maxLength":2000},"ecc":{"default":"M","type":"string","enum":["L","M","Q","H"]},"color":{"default":"#000000","type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"},"background":{"default":"#ffffff","type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"},"margin":{"default":2,"type":"integer","minimum":0,"maximum":10},"logo":{"type":"string","maxLength":2048,"pattern":"^($|asset:[A-Za-z0-9_]{1,64}$|https?:\\/\\/\\S+$)"}},"required":["id","w","h","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"name":{"type":"string","maxLength":100},"x":{"default":0,"type":"number","minimum":-100000,"maximum":100000},"y":{"default":0,"type":"number","minimum":-100000,"maximum":100000},"w":{"type":"number","minimum":0,"maximum":100000},"h":{"type":"number","minimum":0,"maximum":100000},"rotation":{"default":0,"type":"number","minimum":-360,"maximum":360},"opacity":{"default":1,"type":"number","minimum":0,"maximum":1},"visible":{"default":true,"type":"boolean"},"locked":{"default":false,"type":"boolean"},"shadow":{"type":"object","properties":{"x":{"default":0,"type":"number","minimum":-1000,"maximum":1000},"y":{"default":4,"type":"number","minimum":-1000,"maximum":1000},"blur":{"default":8,"type":"number","minimum":0,"maximum":500},"color":{"default":"#00000040","type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"}},"additionalProperties":false},"blur":{"default":0,"type":"number","minimum":0,"maximum":250},"blend":{"default":"normal","type":"string","enum":["normal","multiply","screen","overlay","darken","lighten"]},"param":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"type":{"type":"string","const":"barcode"},"format":{"default":"code128","type":"string","enum":["code128","ean13"]},"value":{"default":"","type":"string","maxLength":80},"color":{"default":"#000000","type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"},"background":{"default":"#ffffff","type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"},"showText":{"default":true,"type":"boolean"},"font":{"default":"Inter","type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,63}$"}},"required":["id","w","h","type"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"name":{"type":"string","maxLength":100},"x":{"default":0,"type":"number","minimum":-100000,"maximum":100000},"y":{"default":0,"type":"number","minimum":-100000,"maximum":100000},"w":{"type":"number","minimum":0,"maximum":100000},"h":{"type":"number","minimum":0,"maximum":100000},"rotation":{"default":0,"type":"number","minimum":-360,"maximum":360},"opacity":{"default":1,"type":"number","minimum":0,"maximum":1},"visible":{"default":true,"type":"boolean"},"locked":{"default":false,"type":"boolean"},"shadow":{"type":"object","properties":{"x":{"default":0,"type":"number","minimum":-1000,"maximum":1000},"y":{"default":4,"type":"number","minimum":-1000,"maximum":1000},"blur":{"default":8,"type":"number","minimum":0,"maximum":500},"color":{"default":"#00000040","type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"}},"additionalProperties":false},"blur":{"default":0,"type":"number","minimum":0,"maximum":250},"blend":{"default":"normal","type":"string","enum":["normal","multiply","screen","overlay","darken","lighten"]},"param":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"type":{"type":"string","const":"group"},"clip":{"default":false,"type":"boolean"},"radius":{"default":0,"anyOf":[{"type":"number","minimum":0,"maximum":100000},{"type":"array","prefixItems":[{"type":"number","minimum":0,"maximum":100000},{"type":"number","minimum":0,"maximum":100000},{"type":"number","minimum":0,"maximum":100000},{"type":"number","minimum":0,"maximum":100000}],"items":false,"minItems":4,"maxItems":4}]},"layers":{"type":"array","items":{"$ref":"#/components/schemas/Scene_Layer"}}},"required":["id","w","h","type","layers"],"additionalProperties":false}]},"Scene":{"type":"object","properties":{"version":{"type":"number","const":1},"width":{"type":"integer","minimum":1,"maximum":10000},"height":{"type":"integer","minimum":1,"maximum":10000},"background":{"type":"object","properties":{"color":{"type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"},"gradient":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"linear"},"angle":{"default":0,"type":"number","minimum":-360,"maximum":360},"stops":{"minItems":2,"maxItems":16,"type":"array","items":{"type":"object","properties":{"offset":{"type":"number","minimum":0,"maximum":1},"color":{"type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"}},"required":["offset","color"],"additionalProperties":false}}},"required":["type","stops"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"radial"},"cx":{"default":0.5,"type":"number","minimum":0,"maximum":1},"cy":{"default":0.5,"type":"number","minimum":0,"maximum":1},"r":{"default":0.5,"type":"number","minimum":0,"maximum":2},"stops":{"minItems":2,"maxItems":16,"type":"array","items":{"type":"object","properties":{"offset":{"type":"number","minimum":0,"maximum":1},"color":{"type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"}},"required":["offset","color"],"additionalProperties":false}}},"required":["type","stops"],"additionalProperties":false}]},"image":{"type":"string","maxLength":2048,"pattern":"^($|asset:[A-Za-z0-9_]{1,64}$|https?:\\/\\/\\S+$)"},"fit":{"default":"cover","type":"string","enum":["cover","contain","fill"]}},"additionalProperties":false},"fonts":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9 ]{0,63}(:[1-9]00i?(,[1-9]00i?)*)?$"}},"sizes":{"default":[],"maxItems":19,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,31}$"},"width":{"type":"integer","minimum":1,"maximum":10000},"height":{"type":"integer","minimum":1,"maximum":10000},"layers":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"additionalProperties":{"type":"object","properties":{"x":{"type":"number","minimum":-100000,"maximum":100000},"y":{"type":"number","minimum":-100000,"maximum":100000},"w":{"type":"number","minimum":0,"maximum":100000},"h":{"type":"number","minimum":0,"maximum":100000},"rotation":{"type":"number","minimum":-360,"maximum":360},"visible":{"type":"boolean"},"size":{"type":"number","minimum":1,"maximum":1000}},"additionalProperties":false}}},"required":["name","width","height"],"additionalProperties":false}},"pages":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"background":{"type":"object","properties":{"color":{"type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"},"gradient":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"linear"},"angle":{"default":0,"type":"number","minimum":-360,"maximum":360},"stops":{"minItems":2,"maxItems":16,"type":"array","items":{"type":"object","properties":{"offset":{"type":"number","minimum":0,"maximum":1},"color":{"type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"}},"required":["offset","color"],"additionalProperties":false}}},"required":["type","stops"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"radial"},"cx":{"default":0.5,"type":"number","minimum":0,"maximum":1},"cy":{"default":0.5,"type":"number","minimum":0,"maximum":1},"r":{"default":0.5,"type":"number","minimum":0,"maximum":2},"stops":{"minItems":2,"maxItems":16,"type":"array","items":{"type":"object","properties":{"offset":{"type":"number","minimum":0,"maximum":1},"color":{"type":"string","pattern":"^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|transparent)$"}},"required":["offset","color"],"additionalProperties":false}}},"required":["type","stops"],"additionalProperties":false}]},"image":{"type":"string","maxLength":2048,"pattern":"^($|asset:[A-Za-z0-9_]{1,64}$|https?:\\/\\/\\S+$)"},"fit":{"default":"cover","type":"string","enum":["cover","contain","fill"]}},"additionalProperties":false},"layers":{"maxItems":2000,"type":"array","items":{"$ref":"#/components/schemas/Scene_Layer"}}},"required":["layers"],"additionalProperties":false}}},"required":["version","width","height","pages"],"additionalProperties":false},"TemplateSummary":{"type":"object","properties":{"id":{"type":"string","example":"tpl_3k2jQ8xLm0P4nB7vR2sT"},"name":{"type":"string"},"sizes":{"type":"array","items":{"type":"string"},"example":["main","square"]},"params":{"type":"array","items":{"$ref":"#/components/schemas/Param"}},"newest_version":{"type":"integer"},"published_version":{"type":["integer","null"]},"thumbnail":{"type":["string","null"],"description":"A small WebP of the published version (page 1, at most 400 px on the long side). Null before the first publish, and for a short time after a publish while it is made.","example":"https://files.mintrender.com/t/ws_9xQ2mL7kP4nB8vR3sT1a/tpl_3k2jQ8xLm0P4nB7vR2sT/1.webp"},"created":{"type":"string"},"updated":{"type":"string"}},"required":["id","name","sizes","params","newest_version","published_version","thumbnail","created","updated"]},"Param":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["text","image","shape","chart","qr","barcode","group"]},"pages":{"type":"array","items":{"type":"integer"}},"default":{}},"required":["name","type","pages"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"invalid_param"},"message":{"type":"string","example":"must be a hex colour like #0f172a, or transparent"},"field":{"type":"string","example":"data.title.color"},"request_id":{"type":"string","example":"req_8Fk2LmQ9xP"}},"required":["code","message","request_id"]}},"required":["error"]},"Template":{"allOf":[{"$ref":"#/components/schemas/TemplateSummary"},{"type":"object","properties":{"draft":{"type":"object","additionalProperties":{},"$ref":"#/components/schemas/Scene"},"versions":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer"},"created":{"type":"string"}},"required":["version","created"]}}},"required":["draft","versions"]}]},"Asset":{"type":"object","properties":{"id":{"type":"string","example":"img_9Lk2mQ8xP0aB4nC7vR2s"},"kind":{"type":"string","enum":["image","csv"]},"name":{"type":["string","null"]},"mime":{"type":"string","example":"image/png"},"bytes":{"type":"integer"},"sha256":{"type":"string"},"width":{"type":["integer","null"]},"height":{"type":["integer","null"]},"src":{"type":"string","description":"Use this in a scene or in `data`","example":"asset:img_9Lk2mQ8xP0aB4nC7vR2s"},"source_url":{"type":["string","null"]},"created":{"type":"string"}},"required":["id","kind","name","mime","bytes","sha256","width","height","src","source_url","created"]},"Render":{"type":"object","properties":{"id":{"type":"string","example":"rnd_9x7Lm2Qp8sT4vB0nC6kR"},"status":{"type":"string","enum":["queued","rendering","succeeded","failed","canceled"]},"outputs":{"type":"array","items":{"$ref":"#/components/schemas/Output"}},"credits":{"type":"integer"},"cached":{"type":"boolean"},"took_ms":{"type":["integer","null"]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"field":{"type":"string"}},"required":["code","message"]},"metadata":{"type":"object","additionalProperties":{}},"created":{"type":"string"}},"required":["id","status","outputs","credits","cached","took_ms","created"]},"Output":{"type":"object","properties":{"size":{"type":"string"},"url":{"type":"string","example":"https://files.mintrender.com/r/ws_…/a1b2….png"},"width":{"type":"integer"},"height":{"type":"integer"},"bytes":{"type":"integer"},"format":{"type":"string","enum":["png","jpg","webp","svg","pdf"]},"pages":{"type":"integer"}},"required":["size","url","width","height","bytes","format"]},"RenderRequest":{"type":"object","properties":{"template":{"type":"string","example":"tpl_3k2jQ8xLm0P4nB7vR2sT"},"version":{"type":"integer","exclusiveMinimum":0,"description":"Default: the newest published version"},"data":{"type":"object","additionalProperties":{},"example":{"title":"Ten ways to sell more","logo":"https://example.com/l.png"}},"ignore_unknown":{"type":"boolean","description":"Skip data keys that match no param instead of a 400"},"format":{"type":"string","enum":["png","jpg","webp","svg","pdf"],"default":"png"},"sizes":{"type":"array","items":{"type":"string","maxLength":32},"minItems":1,"maxItems":20,"default":["main"]},"scale":{"type":"number","minimum":0.1,"maximum":4,"default":1},"quality":{"type":"integer","minimum":1,"maximum":100,"default":90},"mode":{"type":"string","enum":["sync","async"],"default":"sync"},"webhook_url":{"type":"string","maxLength":2048,"format":"uri"},"metadata":{"type":"object","additionalProperties":{},"description":"Your own values, returned with the render (at most 4 KB)"}},"required":["template"]},"BatchRequest":{"type":"object","properties":{"template":{"type":"string"},"version":{"type":"integer","exclusiveMinimum":0},"format":{"type":"string","enum":["png","jpg","webp","svg","pdf"],"default":"png"},"sizes":{"type":"array","items":{"type":"string","maxLength":32},"minItems":1,"maxItems":20,"default":["main"]},"scale":{"type":"number","minimum":0.1,"maximum":4,"default":1},"quality":{"type":"integer","minimum":1,"maximum":100,"default":90},"rows":{"type":"array","items":{"type":"object","additionalProperties":{}},"maxItems":10000,"example":[{"name":"Ada"},{"name":"Grace"}]},"csv_asset":{"type":"string","description":"An uploaded CSV (asset id); the header row gives the param names","example":"csv_8Fk2LmQ9xP0aB4nC7vR2"},"csv_url":{"type":"string","format":"uri","description":"A public CSV link, for example a Google Sheet published as CSV"},"ignore_unknown":{"type":"boolean"},"zip":{"type":"boolean","default":false,"description":"Also build one ZIP of all files"},"webhook_url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["template"]},"Batch":{"type":"object","properties":{"id":{"type":"string","example":"bat_2Lk9mQ8xP0aB4nC7vR2s"},"status":{"type":"string","enum":["queued","running","zipping","completed","failed","canceled"]},"rows":{"type":"integer"},"done":{"type":"integer"},"failed":{"type":"integer"},"zip_url":{"type":["string","null"]},"renders":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer"},"id":{"type":"string"},"status":{"type":"string"}},"required":["row","id","status"]}},"created":{"type":"string"}},"required":["id","status","rows","done","failed","zip_url","renders","created"]},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["render.succeeded","render.failed","batch.completed"]}},"disabled":{"type":"boolean"},"created":{"type":"string"}},"required":["id","url","events","disabled","created"]},"Delivery":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"event":{"type":"string"},"render_id":{"type":["string","null"]},"batch_id":{"type":["string","null"]},"attempt":{"type":"integer"},"status_code":{"type":["integer","null"]},"error":{"type":["string","null"]},"done":{"type":"boolean"},"next_try":{"type":["string","null"]},"created":{"type":"string"}},"required":["id","url","event","render_id","batch_id","attempt","status_code","error","done","next_try","created"]},"Usage":{"type":"object","properties":{"period":{"type":"string","example":"2026-10","description":"A calendar month (\"2026-10\") on Free; on a paid plan, the start of this month of the billing cycle (\"2026-11-14T10:22:05Z\")"},"period_ends":{"type":"string","example":"2026-11-01T00:00:00.000Z","description":"When new credits come"},"plan":{"type":"string"},"credits_included":{"type":"integer"},"credits_used":{"type":"integer"},"credits_left":{"type":"integer"},"overage":{"type":"object","properties":{"enabled":{"type":"boolean"},"used":{"type":"integer"},"cap":{"type":"integer"}},"required":["enabled","used","cap"]},"renders":{"type":"object","properties":{"by_format":{"type":"object","additionalProperties":{"type":"integer"}},"by_source":{"type":"object","additionalProperties":{"type":"integer"}},"cached":{"type":"integer"},"failed":{"type":"integer"}},"required":["by_format","by_source","cached","failed"]}},"required":["period","period_ends","plan","credits_included","credits_used","credits_left","overage","renders"]},"PreviewRequest":{"type":"object","properties":{"template":{"type":"string"},"scene":{"type":"object","additionalProperties":{},"$ref":"#/components/schemas/Scene"},"data":{"type":"object","additionalProperties":{}},"size":{"type":"string","maxLength":32,"default":"main"},"format":{"type":"string","enum":["png","jpg","webp"],"default":"png"},"cf-turnstile-response":{"type":"string","maxLength":4096}}},"SignedLink":{"type":"object","properties":{"url":{"type":"string","example":"https://img.mintrender.com/tpl_3k2j/main.png?title=Hello&s=Qm9y…"},"published":{"type":"boolean","description":"Links answer only when the template has a published version"}},"required":["url","published"]}},"parameters":{}},"paths":{"/healthz":{"get":{"summary":"Health check","tags":["System"],"responses":{"200":{"description":"The API is up","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}}}}},"/v1/templates":{"get":{"summary":"List templates","tags":["Templates"],"security":[{"bearer":[]}],"responses":{"200":{"description":"The workspace's templates, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/TemplateSummary"}}},"required":["templates"]}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a template from a scene","tags":["Templates"],"security":[{"bearer":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scene":{"type":"object","additionalProperties":{},"$ref":"#/components/schemas/Scene"}},"required":["name","scene"]}}}},"responses":{"201":{"description":"The new template (a draft; publish it to render it)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"description":"The request is not valid; `field` names the problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A plan limit is reached: `no_credits` (no credits left in this period) or `plan_limit` (templates, members or stored files)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/templates/generate":{"post":{"summary":"Make a draft template from a description (AI)","tags":["Templates"],"security":[{"bearer":[]}],"description":"The AI template maker (spec 11.3). The result is a draft that the validator accepts; it is never published by itself. Limits: the plan's AI templates a month, and a daily cap for the whole service.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","minLength":3,"maxLength":500,"example":"an OG image for a cooking blog, dark, big title, logo bottom left"},"size":{"type":"string","maxLength":11,"default":"1200x630","example":"1200x630"},"name":{"type":"string","minLength":1,"maxLength":100}},"required":["description"]}}}},"responses":{"201":{"description":"The new draft template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"description":"The request is not valid; `field` names the problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A plan limit is reached: `no_credits` (no credits left in this period) or `plan_limit` (templates, members or stored files)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request cannot be done; `code` says why (for example an Idempotency-Key used with a different body)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"A service we use failed; try again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Not available now: a set-up step is missing, or a daily limit is reached; `code` says which","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"A service we use took too long; try again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/templates/{id}":{"get":{"summary":"Get a template, its params and versions","tags":["Templates"],"security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","example":"tpl_3k2jQ8xLm0P4nB7vR2sT"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a template","tags":["Templates"],"security":[{"bearer":[]}],"description":"Signed links and renders of it stop at once (404). Files already made stay until they expire. The template no longer counts toward the plan's limit.","parameters":[{"schema":{"type":"string","example":"tpl_3k2jQ8xLm0P4nB7vR2sT"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"]}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/templates/{id}/draft":{"put":{"summary":"Save the draft scene","tags":["Templates"],"security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","example":"tpl_3k2jQ8xLm0P4nB7vR2sT"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scene":{"type":"object","additionalProperties":{},"$ref":"#/components/schemas/Scene"},"name":{"type":"string","minLength":1,"maxLength":100}},"required":["scene"]}}}},"responses":{"200":{"description":"The template with the new draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"400":{"description":"The request is not valid; `field` names the problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/templates/{id}/publish":{"post":{"summary":"Publish the draft as a new version","tags":["Templates"],"security":[{"bearer":[]}],"description":"Signed links and renders without a `version` use the newest published version.","parameters":[{"schema":{"type":"string","example":"tpl_3k2jQ8xLm0P4nB7vR2sT"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The new version","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"}},"required":["id","version"]}}}},"400":{"description":"The request is not valid; `field` names the problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/templates/{id}/duplicate":{"post":{"summary":"Copy a template (its draft)","tags":["Templates"],"security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","example":"tpl_3k2jQ8xLm0P4nB7vR2sT"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}}}}}},"responses":{"201":{"description":"The copy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A plan limit is reached: `no_credits` (no credits left in this period) or `plan_limit` (templates, members or stored files)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/assets":{"post":{"summary":"Upload an image or CSV","tags":["Assets"],"security":[{"bearer":[]}],"description":"Send `multipart/form-data` with a `file` (and an optional `name`), or JSON `{\"url\": \"https://…\"}` to fetch it. Images: PNG, JPEG, GIF, WebP, SVG up to 20 MB and 16 megapixels (bigger ones are refused with `image_too_large`; the editor makes them smaller before it uploads them). CSV: UTF-8 up to 5 MB. A workspace stores up to 500 MB of files on Free and 10 GB on paid plans.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"name":{"type":"string","maxLength":200}}}},"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"name":{"type":"string","maxLength":200}},"required":["url"]}}}},"responses":{"201":{"description":"The stored asset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Asset"}}}},"400":{"description":"The request is not valid; `field` names the problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A plan limit is reached: `no_credits` (no credits left in this period) or `plan_limit` (templates, members or stored files)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List assets","tags":["Assets"],"security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","enum":["image","csv"]},"required":false,"name":"kind","in":"query"}],"responses":{"200":{"description":"Newest first, at most 500","content":{"application/json":{"schema":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/Asset"}}},"required":["assets"]}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/assets/{id}/uses":{"get":{"summary":"Templates that use an asset","tags":["Assets"],"security":[{"bearer":[]}],"description":"For a confirm step before a delete: the templates whose draft or a saved version uses the asset. A delete is refused (409) while a saved version uses it.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"At most 100","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"draft":{"type":"boolean","description":"The draft uses it"},"versions":{"type":"boolean","description":"A saved version uses it"}},"required":["id","name","draft","versions"]}}},"required":["templates"]}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/assets/{id}":{"delete":{"summary":"Delete an asset","tags":["Assets"],"security":[{"bearer":[]}],"description":"Refused (409 `in_use`) while a saved version of a template that is not deleted uses it. GET /v1/assets/{id}/uses lists the templates.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"]}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/render":{"post":{"summary":"Render a template","tags":["Render"],"security":[{"bearer":[]}],"description":"Renders each size as one file. 1 image or 1 PDF page = 1 credit; files that already exist for the same input answer at once (`cached: true`) and cost nothing. `mode: async` (or a PDF over 10 pages, or more than 5 sizes) answers 202 with a job to poll. `?inline=1` (one output) streams the bytes.","parameters":[{"schema":{"type":"string","enum":["0","1"]},"required":false,"name":"inline","in":"query"},{"schema":{"type":"string","maxLength":255,"description":"Send the same key again within 24 hours to get the first answer without a second charge"},"required":false,"description":"Send the same key again within 24 hours to get the first answer without a second charge","name":"idempotency-key","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderRequest"}}}},"responses":{"200":{"description":"The finished render (with ?inline=1: the file itself)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Render"}}}},"202":{"description":"Queued as a job","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued"]},"poll":{"type":"string"}},"required":["id","status","poll"]}}}},"400":{"description":"The request is not valid; `field` names the problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A plan limit is reached: `no_credits` (no credits left in this period) or `plan_limit` (templates, members or stored files)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request cannot be done; `code` says why (for example an Idempotency-Key used with a different body)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/renders/{id}":{"delete":{"summary":"Cancel a queued job","tags":["Render"],"security":[{"bearer":[]}],"description":"Only a job that has not started can be canceled; its credits come back.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The canceled job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Render"}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"Get a render or job","tags":["Render"],"security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The render","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Render"}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batch":{"post":{"summary":"Render many rows","tags":["Bulk"],"security":[{"bearer":[]}],"description":"Up to 10,000 rows of data (from `rows`, an uploaded CSV or a CSV link). Credits for every row are reserved at once; failed rows give theirs back. Poll GET /v1/batch/{id}, or give a webhook_url.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRequest"}}}},"responses":{"202":{"description":"Queued","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["running"]},"rows":{"type":"integer"},"poll":{"type":"string"}},"required":["id","status","rows","poll"]}}}},"400":{"description":"The request is not valid; `field` names the problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A plan limit is reached: `no_credits` (no credits left in this period) or `plan_limit` (templates, members or stored files)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request cannot be done; `code` says why (for example an Idempotency-Key used with a different body)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batch/{id}":{"get":{"summary":"Get a batch: counts and each row's render","tags":["Bulk"],"security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1000},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"The batch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batch/{id}/zip":{"get":{"summary":"Download a batch's ZIP","tags":["Bulk"],"security":[{"bearer":[]}],"description":"The ZIP of a batch sent with `zip: true`, once the batch shows a `zip_url`. 404 while it is not ready, and after it expires with the batch's files (the last of its renders): `zip_url` is then null again.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The ZIP file","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks":{"post":{"summary":"Add a webhook","tags":["Webhooks"],"security":[{"bearer":[]}],"description":"Events are POSTed as JSON with `MR-Signature: t={unix},v1={hex HMAC-SHA256(secret, t + \".\" + body)}`. The secret is shown only in this answer.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["render.succeeded","render.failed","batch.completed"]},"minItems":1,"default":["render.succeeded","render.failed","batch.completed"]}},"required":["url"]}}}},"responses":{"201":{"description":"The webhook and its secret","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","properties":{"secret":{"type":"string"}},"required":["secret"]}]}}}},"400":{"description":"The request is not valid; `field` names the problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List webhooks","tags":["Webhooks"],"security":[{"bearer":[]}],"responses":{"200":{"description":"Webhooks","content":{"application/json":{"schema":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}},"required":["webhooks"]}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/{id}":{"delete":{"summary":"Delete a webhook","tags":["Webhooks"],"security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"]}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/deliveries":{"get":{"summary":"Recent webhook deliveries (every try)","tags":["Webhooks"],"security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"render","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Newest first","content":{"application/json":{"schema":{"type":"object","properties":{"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/Delivery"}}},"required":["deliveries"]}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/deliveries/{id}/resend":{"post":{"summary":"Send a delivery again","tags":["Webhooks"],"security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The new delivery (tried now; retried like any other)","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage":{"get":{"summary":"Credits and renders this period","tags":["Account"],"security":[{"bearer":[]}],"responses":{"200":{"description":"Usage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/preview":{"post":{"summary":"A free low-res preview with a watermark","tags":["Render"],"description":"Send a `scene` (no key needed; free tools and the docs use this) or, with an API key, a `template`. The answer is the image itself, at most 600 px on its long side. 30 a minute.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewRequest"}}}},"responses":{"200":{"description":"The image","content":{"image/png":{"schema":{}},"image/jpeg":{"schema":{}},"image/webp":{"schema":{}}}},"400":{"description":"The request is not valid; `field` names the problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/assets/{id}/file":{"get":{"summary":"Download an asset's file","tags":["Assets"],"security":[{"bearer":[]}],"description":"The uploaded file itself, with its own type (a cleaned SVG for SVG uploads).","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The file","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/links":{"post":{"summary":"Make a signed link","tags":["Render"],"security":[{"bearer":[]}],"description":"A link that renders the template when it is opened (spec 7.2). Data values are strings; at most 2,048 characters each.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"string","maxLength":64,"example":"tpl_3k2j"},"size":{"type":"string","maxLength":32,"default":"main"},"format":{"type":"string","enum":["png","jpg","webp","svg","pdf"],"default":"png"},"data":{"type":"object","additionalProperties":{"type":"string","maxLength":2048},"default":{},"description":"Values are strings in a link","example":{"title":"Hello"}}},"required":["template"]}}}},"responses":{"200":{"description":"The link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedLink"}}}},"400":{"description":"The request is not valid; `field` names the problem","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No API key, or the key is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"The workspace is frozen (`frozen`), or a reviewer workspace has ended (`expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Not available now: a set-up step is missing, or a daily limit is reached; `code` says which","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{}}