> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mynth.io/llms.txt
> Use this file to discover all available pages before exploring further.

# P-Image Try-On

> Use the P-Image Try-On model with the Mynth SDK or REST API.

```text Model ID theme={"theme":"kanagawa-dragon"}
prunaai/p-image-try-on
```

See pricing & more on [mynth.io](https://mynth.io/models/prunaai%2Fp-image-try-on).

<CodeGroup>
  ```ts Mynth SDK theme={"theme":"kanagawa-dragon"}
  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);
  ```

  ```bash REST API theme={"theme":"kanagawa-dragon"}
  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" }
        }
      ]
    }'
  ```
</CodeGroup>
