{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/zh-CN/develop/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"快速入门","description":"YouCam API documentation by Perfect Corp. Learn how to use Skin analysis API, Virtual try-on API, Image editing API, and Video generative AI APIs.","siteUrl":"https://docs.perfectcorp.com","keywords":"AI Skin Analysis, AI Clothes, AI Hairstyle, AI Outfits","image":"/assets/favicon.cd6fa4d833b2a573b3c6dae68386b293da205b203402cb0c97b80bd2acc07ea2.8351e24f.png"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"快速入门","__idx":0},"children":["快速入门"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["首先在 ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://yce.makeupar.com/ai-api"},"children":["https://yce.makeupar.com/ai-api"]}," 免费注册一个 YouCam API 账号，然后购买或订阅服务来获取点数。订阅方案、按量付费的点数、用量记录，都可以在 ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://yce.makeupar.com/api-console/en/api-keys/"},"children":["https://yce.makeupar.com/api-console/en/api-keys/"]}," 查看。进入账号页面的 API Key 标签页，就能生成并管理您的 API 密钥，开始使用 YouCam API。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"流程步骤","__idx":1},"children":["流程步骤："]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"1-鉴权","__idx":2},"children":["1. 鉴权"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["用 ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Bearer Token"]}," 把 API 密钥放进请求头：",{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"Authorization: Bearer YOUR_API_KEY\n"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["API 密钥可以在这里找到：",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://yce.makeupar.com/api-console/en/api-keys/"},"children":["https://yce.makeupar.com/api-console/en/api-keys/"]},"。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"2-上传文件或准备好一个公开的图片-url","__idx":3},"children":["2. 上传文件，或准备好一个公开的图片 URL"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["调用 ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File API"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["从 File API 的响应中拿到上传地址 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["requests.url"]}," 和与之对应的 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["file_id"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["用响应中的 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["requests.url"]}," 把图片上传上去"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"3-启动-ai-任务并取得-task-id","__idx":4},"children":["3. 启动 AI 任务并取得 Task ID："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["通过 HTTP POST 请求，把上传的图片和 AI 任务配置一起发送到 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/s2s/v2.0/task/skin-analysis"]},"。这里以 AI 肤质分析任务为例。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["响应中会返回一个唯一的任务 ID，用来标识这一次调用。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"4-轮询任务状态持续检查","__idx":5},"children":["4. 轮询任务状态（持续检查）："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["用拿到的 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task_id"]},"，通过 HTTP GET 请求定期轮询任务状态（例如 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /skin-analysis/${task_id}"]},"）。这里以 AI 肤质分析任务为例。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["持续留意：",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Task_status = \"success\""]},"（处理完成）。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Task_status = \"error\""]},"（视情况排解或重试）。"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["状态一旦变成 success，就相应地推进后续流程。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"5-取得结果","__idx":6},"children":["5. 取得结果"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["成功响应里会带上结果图片的下载地址。"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]}]},"headings":[{"value":"快速入门","id":"快速入门","depth":1},{"value":"流程步骤：","id":"流程步骤","depth":3},{"value":"1. 鉴权","id":"1-鉴权","depth":4},{"value":"2. 上传文件，或准备好一个公开的图片 URL","id":"2-上传文件或准备好一个公开的图片-url","depth":4},{"value":"3. 启动 AI 任务并取得 Task ID：","id":"3-启动-ai-任务并取得-task-id","depth":4},{"value":"4. 轮询任务状态（持续检查）：","id":"4-轮询任务状态持续检查","depth":4},{"value":"5. 取得结果","id":"5-取得结果","depth":4}],"frontmatter":{"seo":{"title":"快速入门"}},"lastModified":"2026-10-30T07:26:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/zh-cn/develop/quick_start_guide","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}