Install
openclaw skills install style-indexManage your wardrobe, get AI outfit suggestions, and virtually try on clothes before you buy. Powered by The Style Index agent API.
openclaw skills install style-indexYou help users manage their wardrobe and virtually try on clothes using The Style Index. Users can upload their existing clothes, get AI outfit suggestions, see how items look on them, and discover what's missing from their wardrobe.
Before the user can upload photos, they must accept the AI processing terms.
Flow:
403 CONSENT_REQUIRED, the user hasn't consented yetPOST /auth/request-consent — this sends the user a consent emailThe user only needs to do this once. Consent persists across all future agent sessions.
You need a Style Index agent API key.
Which flow to use:
POST /api/agent/auth/register with their emailEMAIL_EXISTS → the user already has an account. Use the link flow instead:
POST /api/agent/auth/link with their emailPOST /api/agent/auth/link/confirm with the codeNew users: Register them via the API.
POST https://thestyleindex.app/api/agent/auth/register
Content-Type: application/json
{ "email": "<user's email>", "name": "<user's name>", "agent_label": "Your Agent Name" }
This returns { agent_key: "tsi_..." }. Store it securely. The user will receive a verification email — they must click the link before you can run try-ons.
Existing Style Index users: Link to their account.
POST https://thestyleindex.app/api/agent/auth/link
Content-Type: application/json
{ "email": "<user's email>" }
Then ask the user for the 8-character code from their email:
POST https://thestyleindex.app/api/agent/auth/link/confirm
Content-Type: application/json
{ "email": "<user's email>", "code": "<8-char code>", "agent_label": "Your Agent Name" }
This returns { agent_key: "tsi_..." }.
agent_label is optional but recommended — it shows up in the user's "Connected Agents" settings page so they know which agent is connected.
All subsequent requests use the header: X-TSI-Agent-Key: tsi_...
Tip: Every API response includes a next_steps array that tells you what to do next. Use it — it guides you through the full flow without needing to memorize all endpoints.
See API.md for full endpoint documentation.
Add items by providing image URLs:
POST /api/agent/wardrobe
{ "image_url": "https://...", "name": "Black Leather Jacket" }
You can also upload images directly via multipart form data:
POST /api/agent/wardrobe
Content-Type: multipart/form-data
image: <file>
name: "Black Leather Jacket"
AI auto-detects category, colors, season, and tags. You can also add multiple items at once:
POST /api/agent/wardrobe/batch
{ "items": [{ "image_url": "...", "name": "..." }, ...] }
Max 20 per batch.
List items:
GET /api/agent/wardrobe?category=tops&limit=20
Delete items:
DELETE /api/agent/wardrobe/<item_id>
Ask the AI stylist to pick outfits from the user's closet:
POST /api/agent/outfits/generate
{
"vibe": "confident",
"occasion": "date",
"weather": { "condition": "clear", "temperature": 72 },
"color_mood": "dark"
}
Returns outfit combinations with item IDs, reasoning, and confidence score. Fast (~3s).
Vibe options: confident, cozy, elegant, edgy, fun, romantic, minimalist, creative Occasion options: work, date, casual, party, travel, brunch
Generate a photorealistic image of the user wearing selected items:
POST /api/agent/tryon/generate
{ "item_ids": ["uuid1", "uuid2"] }
Takes 20-40 seconds. Returns result_url with the generated image.
Prerequisites:
POST /api/agent/profile/photoAfter a try-on, if the user likes the result:
POST /api/agent/outfits/save
{
"result_url": "<try-on result URL>",
"item_ids": ["uuid1", "uuid2"],
"name": "Date Night Look"
}
Find out what's missing from the user's closet:
GET /api/agent/outfits/gaps
Returns category counts, identified gaps, and shopping suggestions.
When the user wants to see their closet, outfits, or try-on results in the web app:
POST /api/agent/auth/web-link
Returns a one-time magic link URL. Share it: "Here's a link to see your closet in the browser: [url]"
GET /api/agent/usage
Returns remaining try-ons and analyses for the current billing period.
GET /wardrobePOST /outfits/generate with { "vibe": "confident", "occasion": "date" }POST /tryon/generate with the item IDsPOST /outfits/savePOST /wardrobe with { "image_url": "..." }POST /wardrobe/batchGET /outfits/gapsPOST /auth/web-linkPOST /auth/registerPOST /profile/photoEMAIL_NOT_VERIFIED, remind the user to click the verification link in their inbox.AGENT_KEY_REVOKED, the user has disconnected your agent from their account via their settings page. You'll need to re-link using the /auth/link flow to get a new key.GET /usage before running expensive operations./outfits/save.