See pricing & more on mynth.io.
Capabilities
| |
|---|
| Modes | Image-to-image |
| Inputs | 1 person + 1–11 garments + optional pose |
| Native auto size | Yes |
| Magic prompt | Supported |
Requires 1 person image and 1–11 garment images (max 13 total). Optional pose must be
declared explicitly (as: "pose"). person and garment can use as: "auto".
Generate
import Mynth from "@mynthio/sdk";
const mynth = new Mynth();
const task = await mynth.image.generate({
prompt: "A person wearing a red jacket",
model: "prunaai/p-image-try-on",
inputs: [
{
type: "image",
as: "person",
source: { type: "url", url: "https://example.com/person.jpg" },
},
{
type: "image",
as: "garment",
source: { type: "url", url: "https://example.com/jacket.jpg" },
},
],
});
console.log(task.urls);
curl https://api.mynth.io/image/generate \
-X POST \
-H "Authorization: Bearer $MYNTH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A person wearing a red jacket",
"model": "prunaai/p-image-try-on",
"inputs": [
{
"type": "image",
"as": "person",
"source": { "type": "url", "url": "https://example.com/person.jpg" }
},
{
"type": "image",
"as": "garment",
"source": { "type": "url", "url": "https://example.com/jacket.jpg" }
}
]
}'
Declare pose explicitly — it is not auto-classified:
inputs: [
{
type: "image",
as: "person",
source: { type: "url", url: "https://example.com/person.jpg" },
},
{
type: "image",
as: "garment",
source: { type: "url", url: "https://example.com/jacket.jpg" },
},
{
type: "image",
as: "pose",
source: { type: "url", url: "https://example.com/pose.jpg" },
},
],
Auto size
This model supports native auto size. Output size is derived from the person image.
size: "auto";
// or
size: {
type: "auto";
}
See Control size.