---
name: looksy-clothes-swap
description: Generate photorealistic virtual try-on images by swapping outfits onto any person photo using the Looksy AI Clothes Swap API. Supports two modes — image-to-image (person + garment photo) and image-to-prompt (person + text description like "red floral summer dress"). Use when a user wants to see themselves or anyone wearing a different outfit — dress, saree, kurta, swimwear, streetwear — from either a reference photo or a text description. Returns a high-quality result image URL.
license: MIT
version: 1.1.0
homepage: https://looksyai.in/openclaw/clothes-swap
source: https://looksyai.in/api/clothes-swap
---

# Looksy Clothes Swap Skill for OpenClaw

Use this skill whenever the user asks to try on an outfit, swap clothes in a photo, visualize a dress / saree / swimwear / kurta / streetwear on a specific person, or generate a virtual try-on image. This skill wraps the **Looksy Clothes Swap API** — a hosted REST endpoint that returns photorealistic try-on images in 20–40 seconds.

## At a glance — what this skill does and what it needs

- **What it does:** Takes a person photo URL plus **either** a clothing photo URL **or** a text prompt describing the outfit, and returns a photorealistic try-on result image URL.
- **Two modes (both cost the same 2 credits):**
  - **Mode A — image-to-image:** `person_image_url` + `clothing_image_url`. Best when you already have a product/garment photo.
  - **Mode B — image-to-prompt:** `person_image_url` + `prompt` (text description like *"red floral summer dress with white sneakers"*). Best when the user describes what they want in words instead of uploading a garment photo.
- **API endpoint it calls:** `POST https://api.looksyai.in/v1/clothes-swap` (sync) and `GET https://api.looksyai.in/v1/clothes-swap/{generation_id}` (async status).
- **Base URL:** `https://api.looksyai.in`
- **Auth required:** YES — the skill will not work without a **Looksy API key**. Read it from the `LOOKSY_API_KEY` environment variable and send it as `Authorization: Bearer $LOOKSY_API_KEY`.
- **Where to get the key:** The user must be on a Looksy **Monthly ($9.99/mo)** or **Yearly ($89.99/yr)** plan. Generate the key in the Looksy dashboard → Developer → Create key. The Weekly plan does **not** include API access.
- **Cost:** Flat **2 credits** per successful request (either mode). Failed calls (401, 402, 403, 422) do not consume credits.
- **Typical response time:** 20–40 seconds for a synchronous call.

---

## When to trigger this skill

Activate this skill when the user's message matches any of these intents:

- "Try this [dress / outfit / saree / bikini / shirt] on me / on her / on him"
- "Swap / change / replace the clothes in this photo"
- "Show me wearing this [outfit from URL / product]"
- "Virtual try-on", "outfit changer", "see myself in this"
- "Put [person] in [outfit]"
- "Can you make her wear [outfit]?"
- User pastes a photo of a person **and** a photo/URL of an outfit

Do NOT trigger for: plain photo edits, background removal, or unrelated styling tasks — use the dedicated Looksy tools instead.

---

## Inputs required

You always need `person_image_url`. Then pick **ONE** of `clothing_image_url` or `prompt` — whichever the user provides.

| Input | Description | When required |
|---|---|---|
| `person_image_url` | Public URL of the person photo (JPG/PNG/WebP) | **always** |
| `clothing_image_url` | Public URL of the outfit/garment photo — flat-lay, model shot, or product shot | **one of** — Mode A |
| `prompt` | Text description of the outfit (e.g. *"navy blazer with white sneakers"*, *"red saree with gold border"*). Max 500 chars. | **one of** — Mode B |
| `quality` | `"standard"` (default) or `"hd"` — both cost 2 credits | no |
| `mode` | `"sync"` (default, waits for result) or `"async"` (webhook) | no |
| `webhook_url` | Optional POST target for async completion | no |

### Picking the right mode

- If the user **sent or linked a garment photo** → use **Mode A** (`clothing_image_url`).
- If the user **described the outfit in words** → use **Mode B** (`prompt`).
- If they gave **both** → prefer Mode A (the image is more specific than a description). You can mention this choice in your reply.
- If they gave **neither** → ask the user: *"Do you have a photo of the outfit, or should I describe it for you?"*

If the user gives you raw image data or a local path, first upload it to a public image host or use your host's built-in file-URL helper, then pass the public URL.

---

## Authentication

Read the API key from the environment:

- `LOOKSY_API_KEY` — required. Obtain from the user's **Looksy Monthly or Yearly** plan dashboard (Developer → Create key).

If `LOOKSY_API_KEY` is missing, stop and tell the user:
> To use Clothes Swap you need a Looksy API key. Upgrade to the Monthly ($9.99/mo) or Yearly ($89.99/yr) plan at https://looksyai.in/#pricing, then generate a key in Developer → API Keys. Each successful call costs 2 credits.

---

## Core procedure

### 1. Call the API

Use a single HTTPS POST request. Default to `mode=sync` so the agent can return the result in one turn.

**Mode A — image-to-image (user has a garment photo):**

```bash
curl -X POST https://api.looksyai.in/v1/clothes-swap \
  -H "Authorization: Bearer $LOOKSY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "person_image_url":   "<PERSON_URL>",
    "clothing_image_url": "<CLOTHING_URL>",
    "quality": "hd",
    "mode": "sync"
  }'
```

**Mode B — image-to-prompt (user described the outfit in words):**

```bash
curl -X POST https://api.looksyai.in/v1/clothes-swap \
  -H "Authorization: Bearer $LOOKSY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "person_image_url": "<PERSON_URL>",
    "prompt":           "Red floral summer dress with white sneakers",
    "quality": "hd",
    "mode": "sync"
  }'
```

Pass exactly one of `clothing_image_url` or `prompt` in the same request — never both.

### 2. Handle the response

Success (HTTP 200):

```json
{
  "generation_id": "gen_0xB4F8A9C1",
  "status": "COMPLETED",
  "result_url": "https://cdn.looksyai.in/r/0xB4F8A9C1.png",
  "credits_charged": 2,
  "duration_ms": 27482
}
```

Return `result_url` to the user as an image preview and mention the credit usage ("2 credits used, 98 remaining" if you track that).

### 3. Handle errors

| HTTP | Meaning | How to respond |
|---|---|---|
| 401 | Missing or invalid `LOOKSY_API_KEY` | Ask the user to re-check their key; no credits charged |
| 402 | Plan does not include API access | Tell the user to upgrade to Monthly or Yearly |
| 403 | Content blocked by safety filter | Politely say the image couldn't be processed; no credits charged |
| 422 | Unreadable input image | Ask the user for a clearer photo or a valid public URL |
| 429 | Rate limit hit | Wait the `Retry-After` seconds, then retry with exponential backoff |
| 5xx | Transient server error | Retry once after 2s; if it fails again, apologize and suggest retry later |

Failed generations (401, 403, 422) do **not** consume credits — reassure the user.

### 4. Long-running / async mode

If the user is on a chat channel that doesn't tolerate blocking (e.g. Telegram/WhatsApp without typing-indicator patience):

```json
{
  "person_image_url":   "<PERSON_URL>",
  "clothing_image_url": "<CLOTHING_URL>",
  "mode": "async",
  "webhook_url": "<OPTIONAL_CALLBACK>"
}
```

The API returns `status: "QUEUED"` + a `generation_id`. Poll `GET https://api.looksyai.in/v1/clothes-swap/{generation_id}` every 3 seconds until `status` is `COMPLETED` or `FAILED` (max 2 minutes).

---

## Output guidelines

When returning the result to the user:

1. **Always** show the `result_url` image inline (or as a file attachment on channels that don't render images).
2. Mention credits used: _"Used 2 credits out of your Looksy plan."_
3. Offer two next actions: *"Try another outfit"* and *"Open in Looksy app to edit"* (link: `https://looksyai.in`).
4. Do NOT log or persist the image URL beyond the current session. Looksy result URLs may expire after 30 days.

If the generation fails, give a one-line human explanation and a next step — never dump raw JSON.

---

## Example sessions

### Session A — image-to-image

**User:** Can you try this red saree on her? [photo of woman] [photo of saree]

**Agent (you):**

```
→ Mode A · image-to-image
→ POST /v1/clothes-swap { person_image_url, clothing_image_url }
→ Generating HD try-on (~30s)…
```

> Here's the result! ✨
>
> [image: https://cdn.looksyai.in/r/0xAB3F.png]
>
> ✔ 2 credits used · Want another saree or a different person? Send another pair of images.

### Session B — image-to-prompt

**User:** Put her in a navy blazer with white sneakers [photo of woman]

**Agent (you):**

```
→ Mode B · image-to-prompt
→ POST /v1/clothes-swap { person_image_url, prompt: "navy blazer with white sneakers" }
→ Generating HD try-on (~30s)…
```

> Done! ✨
>
> [image: https://cdn.looksyai.in/r/0xCD2E.png]
>
> ✔ 2 credits used · Want to tweak the prompt? Try something more specific like *"tailored navy double-breasted blazer, white low-top sneakers, beige trousers"*.

---

## Prompt tips for higher-quality results

Include these hints for the user if their first result is low quality:

### For both modes
- **Person photo:** full-body or three-quarter shot, clear lighting, single subject, minimal background clutter
- **Resolution:** 768×768 or larger on the person photo

### Mode A (image-to-image)
- **Clothing photo:** flat-lay, ghost mannequin, or on-model — avoid heavily stylized editorial shots where the garment is occluded
- **Pose match:** similar pose between person and clothing reference improves fabric drape

### Mode B (image-to-prompt)
- Name the **garment type** first: *dress*, *saree*, *blazer*, *bikini*, *kurti*, *hoodie* — gives the model a clear anchor
- Add **color + pattern**: *"red floral"*, *"navy pinstripe"*, *"emerald green with gold border"*
- Add **material cues** when helpful: *"silk"*, *"denim"*, *"linen"*, *"sequined"*
- Keep it under **15 words** — long prompts rarely improve quality; specific beats elaborate
- Good: *"navy tailored blazer, white crew-neck tee, beige trousers"*
- Avoid: *"something stylish and cool that would look good on a date"* — too vague, ask the user for specifics

---

## Cost model (remind the user)

- **2 credits** per successful call — flat rate, no per-GPU surcharge
- **Failed calls** (safety block, unreadable input, missing auth) do **not** cost credits
- API access is **only** available on the **Monthly ($9.99/mo)** and **Yearly ($89.99/yr)** Looksy plans — the **Weekly plan is app-only**
- Monthly: 60 req/min, Yearly: 120 req/min — respect `Retry-After` on 429

---

## Endpoints reference (at a glance)

| Method | Path | Purpose |
|---|---|---|
| `POST` | `/v1/clothes-swap` | Create a new try-on generation |
| `GET` | `/v1/clothes-swap/{generation_id}` | Poll status of an async generation |

Base URL: `https://api.looksyai.in`

Full docs: https://looksyai.in/api/clothes-swap

---

## Safety & content policy

The Looksy API enforces server-side safety filters. Do not attempt to bypass them. Specifically:
- Refuse prompts that target non-consensual imagery of real people
- Refuse prompts involving minors in non-standard clothing scenarios
- If the API returns `403 content_blocked`, pass the message to the user unchanged

---

## Attribution & license

This skill is released under the MIT license by Looksy AI. Usage of the Looksy Clothes Swap API is governed by the Looksy Terms of Service: https://looksyai.in/terms-of-service
