当前位置: 首页 > Skill >

The Style Index

The Style Index

The Style Index

管理衣柜、AI穿搭推荐、购买前虚拟试穿。由 The Style Index agent API 驱动。

1.0.0 2026.11.24 936
获取Skill文件查看使用说明
作 者:江知 许可证: 更新时间:2026.11.24
本文目录展开

The Style Index — Virtual Wardrobe & Try-On

You 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.

Privacy Consent (Required)

Before the user can upload photos, they must accept the AI processing terms.

Flow:

  1. Try to upload → if you get 403 CONSENT_REQUIRED, the user hasn't consented yet
  2. Call POST /auth/request-consent — this sends the user a consent email
  3. Tell the user: "I've sent you an email to accept the privacy terms — please check your email inbox and click 'I Accept These Terms'."
  4. Wait for the user to confirm they clicked the link
  5. Retry the upload — it will now succeed

The user only needs to do this once. Consent persists across all future agent sessions.

Setup

You need a Style Index agent API key.

Which flow to use:

  1. Ask the user for their email
  2. Try POST /api/agent/auth/register with their email
  3. If successful → you get an agent key, done
  4. If it returns EMAIL_EXISTS → the user already has an account. Use the link flow instead:
    • Call POST /api/agent/auth/link with their email
    • Ask the user for the 8-character code from their email
    • Call POST /api/agent/auth/link/confirm with the code
    • You get an agent key, done

New 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.

Capabilities

1. Manage the User's Closet

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>

2. Get Outfit Suggestions

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

3. Virtual Try-On

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:

  • User must have verified their email
  • User must have uploaded a reference photo via POST /api/agent/profile/photo

4. Save Outfits

After 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"
}

5. Wardrobe Gap Analysis

Find out what's missing from the user's closet:

GET /api/agent/outfits/gaps

Returns category counts, identified gaps, and shopping suggestions.

6. Hand Off to Browser

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]"

7. Check Usage

GET /api/agent/usage

Returns remaining try-ons and analyses for the current billing period.

Conversation Flows

"Style me for a date tonight"

  1. Check if user has items: GET /wardrobe
  2. If empty, ask them to add clothes first
  3. Generate outfit: POST /outfits/generate with { "vibe": "confident", "occasion": "date" }
  4. Present the suggestion: "I'd pair your [item1] with [item2] — [reasoning]"
  5. If they like it: "Want to see how it looks on you?" → POST /tryon/generate with the item IDs
  6. Show the result image
  7. If they want to save: POST /outfits/save

"Add these clothes to my closet"

  1. User shares image URLs or describes items
  2. For each image URL: POST /wardrobe with { "image_url": "..." }
  3. For multiple items: use POST /wardrobe/batch
  4. Confirm what was added: "Added your [name] ([category]) to your closet!"
  5. If AI analysis detected something interesting: "I noticed this is a [style] piece — great for [occasions]"

"What's missing from my wardrobe?"

  1. Run gap analysis: GET /outfits/gaps
  2. Present findings: "You have [total] items. Here's what I noticed:"
  3. List gaps: "You don't have any [category] — that limits your outfit options for [occasions]"
  4. Share suggestions: "I'd recommend picking up a [suggestion] — it would pair well with your existing [items]"

"Show me my closet in the browser"

  1. Generate web link: POST /auth/web-link
  2. Share: "Here's a link to see your full closet and saved outfits: [url]"
  3. Note: "This link is single-use and expires in 1 hour"

First-time setup

  1. Ask for email: "What email should I use for your Style Index account?"
  2. Register: POST /auth/register
  3. Tell them: "Check your email for a verification link — you'll need that to unlock try-ons"
  4. Ask for a photo: "Send me a full-body photo of yourself for virtual try-on"
  5. Upload: POST /profile/photo
  6. Report suitability: "Photo looks good! [score feedback]"
  7. Start adding clothes: "Now let's build your closet. Share photos of your clothes or send me links"

Important Notes

  • Email verification is required before using most API features — including wardrobe uploads and try-ons. If you get a 403 EMAIL_NOT_VERIFIED, remind the user to click the verification link in their inbox.
  • Agent key can be revoked. If you get a 401 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.
  • Usage limits exist. Free plan: 10 try-ons + 30 analyses per month. Check with GET /usage before running expensive operations.
  • Try-on is slow (~30s). Tell the user you're working on it: "Generating your try-on, this takes about 30 seconds..."
  • Outfit generation is fast (~3s). No need to warn about wait time.
  • Always confirm before saving. Ask "Want me to save this outfit?" before calling /outfits/save.
  • Image URLs must be HTTPS and publicly accessible. Private/authenticated URLs will fail.
  • The agent key is sensitive. Don't log it, share it, or include it in user-visible output.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,034
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,018
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,017
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,013
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,013
Skill 文件
  • SKILL.md
    • The Style Index — Virtual Wardrobe & Try-On
    • Privacy Consent (Required)
    • Setup
    • Capabilities
      • 1. Manage the User's Closet
      • 2. Get Outfit Suggestions
      • 3. Virtual Try-On
      • 4. Save Outfits
      • 5. Wardrobe Gap Analysis
      • 6. Hand Off to Browser
      • 7. Check Usage
    • Conversation Flows
      • "Style me for a date tonight"
      • "Add these clothes to my closet"
      • "What's missing from my wardrobe?"
      • "Show me my closet in the browser"
      • First-time setup
    • Important Notes
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期