POST /image/upload (or mynth.image.upload()) when you need Mynth-hosted URLs for input images. Pass those URLs — or any public image URL — in inputs on POST /image/generate.
If your images are already publicly reachable over HTTP(S), skip upload and put the URLs in inputs directly. This page is not about delivering generated images to your own storage — that is the optional destination field on generate (see Image Generation Request).
Pricing
Upload is free. Mynth does not charge forPOST /image/upload.
Generation still bills per successful output image. Some models also charge per input image on each successful output (perImage + perInput × inputs.length). Check the model page for perInput pricing.
Pass a public URL (no upload)
The simplest path: put a URL string ininputs.
Upload local files with the SDK
mynth.image.upload() accepts a File / Blob, or an array of them, and returns CDN URLs.
File / Blob values in inputs on generate. The SDK uploads them first, then sends URL inputs to the API:
Upload with REST
Multipart form field name:images (repeated) or images[].
200):
Upload limits
Validation failures return HTTP
400 with code: "VALIDATION_ERROR". Examples:
Request body over 100 MB returns HTTP
413:
Set input roles (as)
Most models treat inputs as generic references. Some need roles. Set optional as on each structured input:
as, Mynth assigns the first undeclared input as source and the rest as reference. For try-on models, undeclared visual roles can be classified by the worker when the model allows it; pose must be declared when you use it.
Per-model input rules
Support is model-specific:- whether inputs are allowed at all
- maximum count (and per-role min/max)
- which roles are accepted
inputs entries. Individual models enforce lower caps (for example 1, 3, 10, or 16). If the model does not support inputs, or the roles/counts do not match its contract, the request fails validation (VALIDATION_ERROR), for example:
How inputs fit generation
- Obtain public HTTP(S) URLs for each input (upload local files, or use URLs you already host).
- Send them in
inputsonPOST /image/generate(URL strings or structured objects). - Mynth validates inputs against the selected model’s contract, then runs image-to-image (or role-based) generation.
- Successful outputs are billed with any model-specific per-input charge.
/inputs/...). It does not start generation, create a task, or reserve balance.