{"openapi":"3.1.0","info":{"title":"mnml API","version":"1.0.0","description":"Architecture rendering on the mnml engines. Every call spends credits from your prepaid API balance, topped up in dollars at developers.mnml.ai.","contact":{"name":"mnml developers","url":"https://developers.mnml.ai/contact"}},"servers":[{"url":"https://api.mnml.ai"}],"security":[{"apiKey":[]}],"tags":[{"name":"Meta"},{"name":"Account"},{"name":"Engines"},{"name":"Renders"},{"name":"Edits"},{"name":"Enhancements"},{"name":"Videos"},{"name":"Jobs"}],"paths":{"/v2/openapi.json":{"get":{"operationId":"getOpenApi","summary":"This API description, as OpenAPI 3.1.","tags":["Meta"],"security":[],"responses":{"200":{"description":"The OpenAPI document.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/v2/account":{"get":{"operationId":"getAccount","summary":"The key's account: balance, tier, this key's settings and the limits in force.","tags":["Account"],"responses":{"200":{"description":"The account.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":["string","null"]},"tier":{"type":"string","enum":["free","paid"]},"balance_usd":{"type":"number"},"credits":{"type":"object","properties":{"spendable":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Deprecated: read `balance_usd`. The same amount in API credits ($0.0099 each)."}},"required":["spendable"],"deprecated":true,"description":"Deprecated: read `balance_usd`. The same amount in API credits ($0.0099 each)."},"key":{"type":"object","properties":{"id":{"type":"string"},"allowed_origins":{"type":"array","items":{"type":"string"}},"daily_limit_usd":{"type":["number","null"]},"daily_credit_limit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"deprecated":true,"description":"Deprecated: read `daily_limit_usd`. The same amount in API credits ($0.0099 each)."}},"required":["id","allowed_origins","daily_limit_usd","daily_credit_limit"]},"limits":{"type":"object","properties":{"scope":{"type":"string","enum":["account","key"]},"requests_per_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reads_per_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"concurrent_jobs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"daily_usd":{"type":["number","null"]},"daily_credits":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"deprecated":true,"description":"Deprecated: read `daily_usd`. The same amount in API credits ($0.0099 each)."}},"required":["scope","requests_per_minute","reads_per_minute","concurrent_jobs","daily_usd","daily_credits"]}},"required":["id","email","name","tier","balance_usd","credits","key","limits"]}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/v2/engines":{"get":{"operationId":"listEngines","summary":"The engines this key can render on, with their credit prices.","tags":["Engines"],"responses":{"200":{"description":"Every engine, primary first.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"engines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tier":{"type":"string","enum":["primary","legacy"]},"default":{"type":"boolean"},"paid_only":{"type":"boolean"},"available":{"type":"boolean"},"prices":{"type":"object","properties":{"render_usd":{"type":"number"},"edit_usd":{"type":"number"},"render":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Deprecated: read `render_usd`. The same amount in API credits ($0.0099 each)."},"edit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Deprecated: read `edit_usd`. The same amount in API credits ($0.0099 each)."}},"required":["render_usd","edit_usd","render","edit"]},"capabilities":{"type":"object","properties":{"text_to_render":{"type":"boolean"},"masks":{"type":"boolean"},"edit_references":{"type":"boolean"},"max_references":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["text_to_render","masks","edit_references","max_references"]}},"required":["id","name","tier","default","paid_only","available","prices","capabilities"]}},"video_models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"default":{"type":"boolean"},"available":{"type":"boolean"},"prices":{"type":"array","items":{"type":"object","properties":{"duration_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"usd":{"type":"number"},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Deprecated: read `usd`. The same amount in API credits ($0.0099 each)."}},"required":["duration_seconds","usd","credits"]}}},"required":["id","name","default","available","prices"]}}},"required":["engines","video_models"]}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/v2/renders":{"post":{"operationId":"createRender","summary":"Start a render. Send the image in the same call: a link, base64, or the file itself as multipart form data. Charged at the engine price when it starts; a failed render is refunded.","tags":["Renders"],"parameters":[{"name":"wait","in":"query","required":false,"description":"Hold the answer up to this many seconds (1 to 90) while the render runs, and answer with the finished jobs in `jobs`. Still running when the time is up: a 202; read the job with GET /v2/jobs/{id}?wait=90 until it settles.","schema":{"type":"integer","minimum":0,"maximum":90}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"engine":{"type":"string","maxLength":40},"mode":{"type":"string","enum":["exterior","interior","masterplan","plan","landscape","product","text-to-render"]},"prompt":{"type":"string","minLength":1,"maxLength":4000},"image":{"description":"The image: a public https:// link, a data:image/…;base64, URI or base64 bytes, or (multipart) the file itself.","type":"string","minLength":1},"image_url":{"deprecated":true,"description":"Same as image.","type":"string","minLength":1},"job_id":{"description":"A finished job of yours: work on its output without downloading it.","type":"string","pattern":"^\\d{1,18}$"},"references":{"maxItems":15,"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"image":{"description":"The image: a public https:// link, a data:image/…;base64, URI or base64 bytes, or (multipart) the file itself.","type":"string","minLength":1},"image_url":{"deprecated":true,"description":"Same as image.","type":"string","minLength":1},"job_id":{"description":"A finished job of yours: work on its output without downloading it.","type":"string","pattern":"^\\d{1,18}$"},"mode":{"type":"string","enum":["auto","style","material","atmosphere","color","geometry"]}},"additionalProperties":false}]}},"settings":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":320}},"aspect_ratio":{"type":"string","enum":["auto","1:1","3:2","4:3","5:4","16:9","21:9","2:3","3:4","4:5","9:16"]},"count":{"type":"integer","minimum":1,"maximum":4},"seed":{"type":"integer","minimum":0,"maximum":9007199254740991},"webhook_url":{"description":"A public https:// URL to send this job’s settle event to, signed like every webhook.","type":"string","maxLength":2048,"format":"uri"}},"required":["prompt"],"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","properties":{"engine":{"type":"string","maxLength":40},"mode":{"type":"string","enum":["exterior","interior","masterplan","plan","landscape","product","text-to-render"]},"prompt":{"type":"string","minLength":1,"maxLength":4000},"image":{"anyOf":[{"type":"string","format":"binary"},{"description":"The image: a public https:// link, a data:image/…;base64, URI or base64 bytes, or (multipart) the file itself.","type":"string","minLength":1}]},"image_url":{"anyOf":[{"type":"string","format":"binary"},{"deprecated":true,"description":"Same as image.","type":"string","minLength":1}],"deprecated":true},"job_id":{"description":"A finished job of yours: work on its output without downloading it.","type":"string","pattern":"^\\d{1,18}$"},"references":{"maxItems":15,"type":"array","items":{"anyOf":[{"type":"string","format":"binary"},{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"image":{"description":"The image: a public https:// link, a data:image/…;base64, URI or base64 bytes, or (multipart) the file itself.","type":"string","minLength":1},"image_url":{"deprecated":true,"description":"Same as image.","type":"string","minLength":1},"job_id":{"description":"A finished job of yours: work on its output without downloading it.","type":"string","pattern":"^\\d{1,18}$"},"mode":{"type":"string","enum":["auto","style","material","atmosphere","color","geometry"]}},"additionalProperties":false}]}]}},"settings":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":320}},"aspect_ratio":{"type":"string","enum":["auto","1:1","3:2","4:3","5:4","16:9","21:9","2:3","3:4","4:5","9:16"]},"count":{"type":"integer","minimum":1,"maximum":4},"seed":{"type":"integer","minimum":0,"maximum":9007199254740991},"webhook_url":{"description":"A public https:// URL to send this job’s settle event to, signed like every webhook.","type":"string","maxLength":2048,"format":"uri"}},"required":["prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Finished, within ?wait: every job, with its outputs, is in jobs.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"ids":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["queued","processing","succeeded","failed","canceled"]},"charged_usd":{"type":"number"},"credits_charged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Deprecated: read `charged_usd`. The same amount in API credits ($0.0099 each)."},"replayed":{"type":"boolean"},"notes":{"type":"array","items":{"type":"string"}},"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","processing","succeeded","failed","canceled"]},"kind":{"type":"string"},"engine":{"type":["string","null"]},"outputs":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"media":{"type":"string","enum":["image","video"]},"expires_at":{"type":"string"}},"required":["url","media","expires_at"]}},"charged_usd":{"type":"number"},"refunded_usd":{"type":"number"},"credits_charged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Deprecated: read `charged_usd`. The same amount in API credits ($0.0099 each)."},"credits_refunded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Deprecated: read `refunded_usd`. The same amount in API credits ($0.0099 each)."},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["UNSAFE_CONTENT","NO_CHANGE","CANCELED","RENDER_FAILED"]},"message":{"type":"string"}},"required":["code","message"]},{"type":"null"}]},"created_at":{"type":"string"},"completed_at":{"type":["string","null"]}},"required":["id","status","kind","engine","outputs","charged_usd","refunded_usd","credits_charged","credits_refunded","error","created_at","completed_at"]}}},"required":["id","ids","status","charged_usd","credits_charged","replayed","notes"]}},"required":["success","data"]}}}},"202":{"description":"Started. Poll GET /v2/jobs/{id} for the result.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"ids":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["queued","processing","succeeded","failed","canceled"]},"charged_usd":{"type":"number"},"credits_charged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Deprecated: read `charged_usd`. The same amount in API credits ($0.0099 each)."},"replayed":{"type":"boolean"},"notes":{"type":"array","items":{"type":"string"}},"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","processing","succeeded","failed","canceled"]},"kind":{"type":"string"},"engine":{"type":["string","null"]},"outputs":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"media":{"type":"string","enum":["image","video"]},"expires_at":{"type":"string"}},"required":["url","media","expires_at"]}},"charged_usd":{"type":"number"},"refunded_usd":{"type":"number"},"credits_charged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Deprecated: read `charged_usd`. The same amount in API credits ($0.0099 each)."},"credits_refunded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Deprecated: read `refunded_usd`. The same amount in API credits ($0.0099 each)."},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["UNSAFE_CONTENT","NO_CHANGE","CANCELED","RENDER_FAILED"]},"message":{"type":"string"}},"required":["code","message"]},{"type":"null"}]},"created_at":{"type":"string"},"completed_at":{"type":["string","null"]}},"required":["id","status","kind","engine","outputs","charged_usd","refunded_usd","credits_charged","credits_refunded","error","created_at","completed_at"]}}},"required":["id","ids","status","charged_usd","credits_charged","replayed","notes"]}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/InsufficientCredits"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/v2/edits":{"post":{"operationId":"createEdit","summary":"Change one thing on an image and keep the rest, on the whole image or an area; or erase what an area covers. Charged when it starts; refunded if it fails.","tags":["Edits"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["edit","erase"]},"prompt":{"type":"string","minLength":1,"maxLength":4000},"image":{"description":"The image: a public https:// link, a data:image/…;base64, URI or base64 bytes, or (multipart) the file itself.","type":"string","minLength":1},"image_url":{"deprecated":true,"description":"Same as image.","type":"string","minLength":1},"job_id":{"description":"A finished job of yours: work on its output without downloading it.","type":"string","pattern":"^\\d{1,18}$"},"engine":{"type":"string","maxLength":40},"mode":{"type":"string","enum":["exterior","interior","masterplan","plan","landscape","product","text-to-render"]},"references":{"maxItems":15,"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"image":{"description":"The image: a public https:// link, a data:image/…;base64, URI or base64 bytes, or (multipart) the file itself.","type":"string","minLength":1},"image_url":{"deprecated":true,"description":"Same as image.","type":"string","minLength":1},"job_id":{"description":"A finished job of yours: work on its output without downloading it.","type":"string","pattern":"^\\d{1,18}$"},"mode":{"type":"string","enum":["auto","style","material","atmosphere","color","geometry"]}},"additionalProperties":false}]}},"region":{"type":"object","properties":{"box":{"description":"x, y of the top-left corner, width, height; all 0–1.","type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","minimum":0.001,"maximum":1},"height":{"type":"number","minimum":0.001,"maximum":1}},"required":["x","y","width","height"]},"polygon":{"description":"An outline of [x, y] points, 0–1.","minItems":3,"maxItems":64,"type":"array","items":{"minItems":2,"maxItems":2,"type":"array","items":{"type":"number","minimum":0,"maximum":1}}}},"description":"The area, in fractions of the image from the top-left."},"mask":{"type":"string","minLength":1},"webhook_url":{"description":"A public https:// URL to send this job’s settle event to, signed like every webhook.","type":"string","maxLength":2048,"format":"uri"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["edit","erase"]},"prompt":{"type":"string","minLength":1,"maxLength":4000},"image":{"anyOf":[{"type":"string","format":"binary"},{"description":"The image: a public https:// link, a data:image/…;base64, URI or base64 bytes, or (multipart) the file itself.","type":"string","minLength":1}]},"image_url":{"anyOf":[{"type":"string","format":"binary"},{"deprecated":true,"description":"Same as image.","type":"string","minLength":1}],"deprecated":true},"job_id":{"description":"A finished job of yours: work on its output without downloading it.","type":"string","pattern":"^\\d{1,18}$"},"engine":{"type":"string","maxLength":40},"mode":{"type":"string","enum":["exterior","interior","masterplan","plan","landscape","product","text-to-render"]},"references":{"maxItems":15,"type":"array","items":{"anyOf":[{"type":"string","format":"binary"},{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"image":{"description":"The image: a public https:// link, a data:image/…;base64, URI or base64 bytes, or (multipart) the file itself.","type":"string","minLength":1},"image_url":{"deprecated":true,"description":"Same as image.","type":"string","minLength":1},"job_id":{"description":"A finished job of yours: work on its output without downloading it.","type":"string","pattern":"^\\d{1,18}$"},"mode":{"type":"string","enum":["auto","style","material","atmosphere","color","geometry"]}},"additionalProperties":false}]}]}},"region":{"type":"object","properties":{"box":{"description":"x, y of the top-left corner, width, height; all 0–1.","type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","minimum":0.001,"maximum":1},"height":{"type":"number","minimum":0.001,"maximum":1}},"required":["x","y","width","height"]},"polygon":{"description":"An outline of [x, y] points, 0–1.","minItems":3,"maxItems":64,"type":"array","items":{"minItems":2,"maxItems":2,"type":"array","items":{"type":"number","minimum":0,"maximum":1}}}},"description":"The area, in fractions of the image from the top-left."},"mask":{"anyOf":[{"type":"string","format":"binary"},{"type":"string","minLength":1}]},"webhook_url":{"description":"A public https:// URL to send this job’s settle event to, signed like every webhook.","type":"string","maxLength":2048,"format":"uri"}},"additionalProperties":false}}}},"responses":{"202":{"description":"Started. Poll GET /v2/jobs/{id} for the result.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","processing","succeeded","failed","canceled"]},"charged_usd":{"type":"number"},"credits_charged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Deprecated: read `charged_usd`. The same amount in API credits ($0.0099 each)."},"replayed":{"type":"boolean"},"notes":{"type":"array","items":{"type":"string"}}},"required":["id","status","charged_usd","credits_charged","replayed","notes"]}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/InsufficientCredits"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/v2/enhancements":{"post":{"operationId":"createEnhancement","summary":"Upscale, enhance, cut out (bg-remove) or extend (outpaint) an image. Upscale, enhance and outpaint need an account that has paid.","tags":["Enhancements"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["upscale","enhance","bg-remove","outpaint"]},"image":{"description":"The image: a public https:// link, a data:image/…;base64, URI or base64 bytes, or (multipart) the file itself.","type":"string","minLength":1},"image_url":{"deprecated":true,"description":"Same as image.","type":"string","minLength":1},"job_id":{"description":"A finished job of yours: work on its output without downloading it.","type":"string","pattern":"^\\d{1,18}$"},"creativity":{"type":"integer","minimum":0,"maximum":100},"prompt":{"type":"string","minLength":1,"maxLength":4000},"aspect_ratio":{"type":"string","enum":["1:1","3:2","4:3","5:4","16:9","21:9","2:3","3:4","4:5","9:16"]},"webhook_url":{"description":"A public https:// URL to send this job’s settle event to, signed like every webhook.","type":"string","maxLength":2048,"format":"uri"}},"required":["kind"],"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["upscale","enhance","bg-remove","outpaint"]},"image":{"anyOf":[{"type":"string","format":"binary"},{"description":"The image: a public https:// link, a data:image/…;base64, URI or base64 bytes, or (multipart) the file itself.","type":"string","minLength":1}]},"image_url":{"anyOf":[{"type":"string","format":"binary"},{"deprecated":true,"description":"Same as image.","type":"string","minLength":1}],"deprecated":true},"job_id":{"description":"A finished job of yours: work on its output without downloading it.","type":"string","pattern":"^\\d{1,18}$"},"creativity":{"type":"integer","minimum":0,"maximum":100},"prompt":{"type":"string","minLength":1,"maxLength":4000},"aspect_ratio":{"type":"string","enum":["1:1","3:2","4:3","5:4","16:9","21:9","2:3","3:4","4:5","9:16"]},"webhook_url":{"description":"A public https:// URL to send this job’s settle event to, signed like every webhook.","type":"string","maxLength":2048,"format":"uri"}},"required":["kind"],"additionalProperties":false}}}},"responses":{"202":{"description":"Started. Poll GET /v2/jobs/{id} for the result.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","processing","succeeded","failed","canceled"]},"charged_usd":{"type":"number"},"credits_charged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Deprecated: read `charged_usd`. The same amount in API credits ($0.0099 each)."},"replayed":{"type":"boolean"},"notes":{"type":"array","items":{"type":"string"}}},"required":["id","status","charged_usd","credits_charged","replayed","notes"]}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/InsufficientCredits"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/v2/videos":{"post":{"operationId":"createVideo","summary":"Animate an image into a short clip: a camera move through or around it. Priced by model and length; accounts that have paid only.","tags":["Videos"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"description":"The image: a public https:// link, a data:image/…;base64, URI or base64 bytes, or (multipart) the file itself.","type":"string","minLength":1},"image_url":{"deprecated":true,"description":"Same as image.","type":"string","minLength":1},"job_id":{"description":"A finished job of yours: work on its output without downloading it.","type":"string","pattern":"^\\d{1,18}$"},"model":{"type":"string","maxLength":40},"duration_seconds":{"type":"integer","minimum":1,"maximum":60},"camera_movement":{"type":"string","maxLength":32},"motion":{"type":"string","maxLength":16},"prompt":{"type":"string","minLength":1,"maxLength":4000},"end_frame":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"image":{"description":"The image: a public https:// link, a data:image/…;base64, URI or base64 bytes, or (multipart) the file itself.","type":"string","minLength":1},"image_url":{"deprecated":true,"description":"Same as image.","type":"string","minLength":1},"job_id":{"description":"A finished job of yours: work on its output without downloading it.","type":"string","pattern":"^\\d{1,18}$"}},"additionalProperties":false}]},"cinematic":{"type":"boolean"},"webhook_url":{"description":"A public https:// URL to send this job’s settle event to, signed like every webhook.","type":"string","maxLength":2048,"format":"uri"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","properties":{"image":{"anyOf":[{"type":"string","format":"binary"},{"description":"The image: a public https:// link, a data:image/…;base64, URI or base64 bytes, or (multipart) the file itself.","type":"string","minLength":1}]},"image_url":{"anyOf":[{"type":"string","format":"binary"},{"deprecated":true,"description":"Same as image.","type":"string","minLength":1}],"deprecated":true},"job_id":{"description":"A finished job of yours: work on its output without downloading it.","type":"string","pattern":"^\\d{1,18}$"},"model":{"type":"string","maxLength":40},"duration_seconds":{"type":"integer","minimum":1,"maximum":60},"camera_movement":{"type":"string","maxLength":32},"motion":{"type":"string","maxLength":16},"prompt":{"type":"string","minLength":1,"maxLength":4000},"end_frame":{"anyOf":[{"type":"string","format":"binary"},{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"image":{"description":"The image: a public https:// link, a data:image/…;base64, URI or base64 bytes, or (multipart) the file itself.","type":"string","minLength":1},"image_url":{"deprecated":true,"description":"Same as image.","type":"string","minLength":1},"job_id":{"description":"A finished job of yours: work on its output without downloading it.","type":"string","pattern":"^\\d{1,18}$"}},"additionalProperties":false}]}]},"cinematic":{"type":"boolean"},"webhook_url":{"description":"A public https:// URL to send this job’s settle event to, signed like every webhook.","type":"string","maxLength":2048,"format":"uri"}},"additionalProperties":false}}}},"responses":{"202":{"description":"Started. A clip takes minutes; poll GET /v2/jobs/{id} for it.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","processing","succeeded","failed","canceled"]},"charged_usd":{"type":"number"},"credits_charged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Deprecated: read `charged_usd`. The same amount in API credits ($0.0099 each)."},"replayed":{"type":"boolean"},"notes":{"type":"array","items":{"type":"string"}}},"required":["id","status","charged_usd","credits_charged","replayed","notes"]}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"402":{"$ref":"#/components/responses/InsufficientCredits"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/v2/jobs/{id}":{"get":{"operationId":"getJob","summary":"Read a job: its status, its outputs as signed links that expire, what it was charged and refunded, and why it failed. A job and its outputs are kept 7 days.","tags":["Jobs"],"parameters":[{"name":"id","in":"path","required":true,"description":"The job id a create call answered with.","schema":{"type":"string","pattern":"^\\d{1,18}$"}},{"name":"wait","in":"query","required":false,"description":"Hold the answer up to this many seconds (1 to 90) until the job settles; it answers as soon as it does. Call again while status is queued or processing.","schema":{"type":"integer","minimum":0,"maximum":90}}],"responses":{"200":{"description":"The job.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","processing","succeeded","failed","canceled"]},"kind":{"type":"string"},"engine":{"type":["string","null"]},"outputs":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"media":{"type":"string","enum":["image","video"]},"expires_at":{"type":"string"}},"required":["url","media","expires_at"]}},"charged_usd":{"type":"number"},"refunded_usd":{"type":"number"},"credits_charged":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Deprecated: read `charged_usd`. The same amount in API credits ($0.0099 each)."},"credits_refunded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Deprecated: read `refunded_usd`. The same amount in API credits ($0.0099 each)."},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["UNSAFE_CONTENT","NO_CHANGE","CANCELED","RENDER_FAILED"]},"message":{"type":"string"}},"required":["code","message"]},{"type":"null"}]},"created_at":{"type":"string"},"completed_at":{"type":["string","null"]}},"required":["id","status","kind","engine","outputs","charged_usd","refunded_usd","credits_charged","credits_refunded","error","created_at","completed_at"]}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/v2/jobs/{id}/events":{"get":{"operationId":"streamJob","summary":"Follow a job as Server-Sent Events, for one that outlasts ?wait: a job event with the job as it stands and each time it changes, then one last event (done with the settled job, timeout after 10 minutes, or error) and the stream closes. Every event's data is JSON; done's and job's are the job as GET /v2/jobs/{id} reads it.","tags":["Jobs"],"parameters":[{"name":"id","in":"path","required":true,"description":"The job id a create call answered with.","schema":{"type":"string","pattern":"^\\d{1,18}$"}}],"responses":{"200":{"description":"The stream: `event: job`, then one of `event: done`, `event: timeout` or `event: error`. A `: ping` comment keeps it alive while nothing changes.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"text/event-stream":{"schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/v2/jobs/{id}/cancel":{"post":{"operationId":"cancelJob","summary":"Stop a queued or running job. Refunded at once if it had not started; otherwise refunded if nothing is delivered.","tags":["Jobs"],"parameters":[{"name":"id","in":"path","required":true,"description":"The job id a create call answered with.","schema":{"type":"string","pattern":"^\\d{1,18}$"}}],"responses":{"200":{"description":"What the cancel did.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","properties":{"id":{"type":"string"},"outcome":{"type":"string","enum":["refunded","requested","too-late","already-settled"]},"refunded_usd":{"type":"number"},"credits_refunded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"deprecated":true,"description":"Deprecated: read `refunded_usd`. The same amount in API credits ($0.0099 each)."}},"required":["id","outcome","refunded_usd","credits_refunded"]}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/Unauthenticated"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/v2/files/{id}":{"get":{"operationId":"getJobFile","summary":"A job's output, at the signed link GET /v2/jobs/{id} gave. No key: the signature is the credential, until it expires.","tags":["Jobs"],"security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"The job id a create call answered with.","schema":{"type":"string","pattern":"^\\d{1,18}$"}},{"name":"exp","in":"query","required":true,"description":"When the link expires (part of the link).","schema":{"type":"string"}},{"name":"sig","in":"query","required":true,"description":"The signature (part of the link).","schema":{"type":"string"}}],"responses":{"200":{"description":"The file: an image, watermarked on plans that mark downloads, or a video.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}},"video/mp4":{"schema":{"type":"string","format":"binary"}}}},"default":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"mk_live_…","description":"An API key from developers.mnml.ai/console/keys."}},"schemas":{"Error":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"request_id":{"type":"string"}},"required":["code","message"]}},"required":["success","error"]}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Your own key, 1 to 255 visible ASCII characters. A retry with the same key and request within 24 hours returns the first answer instead of running again.","schema":{"type":"string","minLength":1,"maxLength":255}}},"headers":{"RequestId":{"description":"This request, for support and the console log.","schema":{"type":"string"}},"RateLimitLimit":{"description":"Requests this key may make per minute.","schema":{"type":"integer"}},"RateLimitRemaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}},"RateLimitReset":{"description":"Seconds until the current minute resets.","schema":{"type":"integer"}},"RetryAfter":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"IdempotentReplayed":{"description":"Present, as `true`, when this is the stored answer to an earlier request.","schema":{"type":"string","enum":["true"]}}},"responses":{"Unauthenticated":{"description":"The API key is missing, malformed, unknown or revoked.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"A limit was reached: requests per minute, or a daily or concurrency limit.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InsufficientCredits":{"description":"The balance does not cover this call.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"The Idempotency-Key was reused for a different request, or is still in progress.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error":{"description":"Any other error, in the same envelope.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}