Skip to main content
Model ID
black-forest-labs/flux-virtual-try-on
See pricing & more on mynth.io.
import Mynth from "@mynthio/sdk";

const mynth = new Mynth();

const task = await mynth.image.generate({
  prompt: "A person wearing a red jacket",
  model: "black-forest-labs/flux-virtual-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": "black-forest-labs/flux-virtual-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" }
      }
    ]
  }'