跳转到主要内容
人物形象训练

人物形象训练 — 创建任务

提交 FaceChain 人物形象训练任务

POST
/fine-tunes
cURL
curl --location 'https://dashscope.aliyuncs.com/api/v1/fine-tunes' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
  "model": "facechain-finetune",
  "training_file_ids": [
    "https://dashscope.oss-cn-beijing.aliyuncs.com/samples/fine-tune/facechain/sample1.jpg"
  ]
}'
{
  "request_id": "b6c9e77d-02a1-4a70-b127-xxxxxx",
  "output": {
    "job_id": "ft-202509020951-f8bf",
    "job_name": "ft-202509020951-f8bf",
    "status": "PENDING",
    "finetuned_output": "facechain-finetune-ft-202509020951-f8bf",
    "model": "facechain-finetune",
    "base_model": "facechain-finetune",
    "training_file_ids": [
      "https://dashscope.oss-cn-beijing.aliyuncs.com/samples/fine-tune/facechain/sample1.jpg"
    ],
    "validation_file_ids": [],
    "hyper_parameters": {},
    "training_type": "sft",
    "create_time": "2025-09-02 09:51:02",
    "workspace_id": "llm-dmt509ikxxxxxx",
    "user_identity": "12402258xxxxxx",
    "modifier": "124022586xxxxxx",
    "creator": "1240225868xxxxxx",
    "group": "facechain",
    "model_name": "ft-202509020951-f8bf",
    "max_output_cnt": 1
  }
}

鉴权

string
header
必填

千问云 API Key。详见获取 API Key

请求体

application/json
enum<string>
必填

模型名称,固定值 facechain-finetune

facechain-finetune
facechain-finetune
string[]
必填

训练图片 URL 或文件 ID 列表。提供 1-10 张人像图片。

  • 支持公开可访问的图片 URL(例如 https://dashscope.oss-cn-beijing.aliyuncs.com/...
  • 或通过文件管理 API 上传后获取的 file_id
  • 建议使用清晰的正脸照片以获得最佳训练效果
[
  "https://dashscope.oss-cn-beijing.aliyuncs.com/samples/fine-tune/facechain/sample1.jpg"
]
items: 1–10

响应

200-application/json
string

请求唯一标识符,用于追踪和排查问题。

b6c9e77d-02a1-4a70-b127-xxxxxx
object

训练任务输出信息。