{"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":["为保证公平使用、防止滥用，我们的 API 设有速率限制。速率限制分为两类："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"按-ip-地址","__idx":1},"children":["按 IP 地址"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["每个 IP 地址在 300 秒内最多 250 次请求。超出上限会返回 429 Too Many Requests 错误。"," ","建议节奏：约每秒 5 次请求（5 QPS），以免出现延迟抖动。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"按访问令牌","__idx":2},"children":["按访问令牌"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["每个访问令牌在 300 秒内最多 250 次请求。超出上限会返回 429 Too Many Requests 错误。"," ","建议节奏：约每秒 5 次请求（5 QPS），以免出现延迟抖动。"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["一个请求必须同时满足上面两个条件才会被接受；只要有一项不满足，就会收到 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["429 Too Many Requests"]}," 错误。请注意，与点数相关的查询是实时处理的。其他接口可以继续使用同一个访问令牌，直到它过期为止。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["建议在应用里从容应对限流错误：实现合适的退避与重试机制。"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]}]},"headings":[{"value":"速率限制","id":"速率限制","depth":1},{"value":"按 IP 地址","id":"按-ip-地址","depth":3},{"value":"按访问令牌","id":"按访问令牌","depth":3}],"frontmatter":{"seo":{"title":"速率限制"}},"lastModified":"2026-10-30T07:26:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/zh-cn/develop/rate_limit","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}