Documentation Index
Fetch the complete documentation index at: https://docs.aihairstyle.cn/llms.txt
Use this file to discover all available pages before exploring further.
📎 基本要求
| 项目 | 要求 | 推荐 |
|---|
| 文件格式 | PNG、JPG、JPEG | JPG(文件较小) |
| 文件大小 | 最大3MB | 1MB以下 |
| 分辨率 | 200x200 ~ 1999x1999px | 512x512px |
👤 人脸要求
人脸完整性
- 图片中必须包含清晰的人脸
- 人脸不应被遮挡(如口罩、墨镜等)
- 人脸不应被裁剪或模糊
人脸占比 & 角度
| 占比范围 | 20% ~ 80% |
| 偏航角 | ±45° |
| 俯仰角 | ±30° |
🌅 图片质量要求
☀️ 光线条件
- 光线充足,避免过暗或过亮
- 避免强烈的逆光或阴影
- 确保人脸清晰可见
🌆 背景要求
- 背景简洁,避免复杂图案
- 避免与肤色相近的背景色
- 确保人脸与背景有足够对比度
🖼️ 示例图片
✅ 有效图片示例

清晰人脸,角度合适,光线充足

人脸占比适中,背景简洁
❌ 无效图片示例

无人脸或人脸不清晰

人脸不完整或被遮挡

人脸被遮挡或模糊
⚠️ 常见错误
❎ 文件格式错误
{
"error_code": 422,
"error_code_str": "UNSUPPORTED_PARAMETER_VALUES",
"error_detail": {
"status_code": 422,
"code": "UNSUPPORTED_PARAMETER_VALUES",
"code_message": "Invalid parameter values.",
"message": "Invalid parameter values. - image: Only PNG, JPG, JPEG, BMP are supported."
},
"error_msg": "Invalid parameter values. - image: Only PNG, JPG, JPEG, BMP are supported.",
"log_id": "76947772",
"request_id": "76947772"
}
🚫 无人脸检测
{
"error_code": 422,
"error_code_str": "FILE_CONTENT_NON_COMPLIANCE",
"error_detail": {
"code": "ERROR_NO_FACE_IN_FILE",
"message": "pic not has face",
"status_code": 422,
"code_message": "No face detected in the file."
},
"error_msg": "File content does not meet requirements. - 222202 - pic not has face",
"log_id": "76947794",
"request_id": "3645368010"
}
📦 文件大小超限
{
"error_code": 413,
"error_code_str": "FILE_SIZE_EXCEEDS_LIMIT",
"error_detail": {
"status_code": 413,
"code": "FILE_SIZE_EXCEEDS_LIMIT",
"code_message": "File size exceeds limit.",
"message": "File size exceeds limit. - image: No larger than 8 M."
},
"error_msg": "File size exceeds limit. - image: No larger than 8 M.",
"log_id": "76947844",
"request_id": "76947844"
}
💡 最佳实践