{
"model": "deepseek-v4.1-flash-1017",
"messages": [
{
"role": "system",
"content": "你是信息抽取器,只输出 JSON,不要任何解释性文字。"
},
{
"role": "user",
"content": "张伟,男,1990 年生,手机 13800000000,现居杭州。"
}
],
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "person_info",
"strict": true,
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"gender": {
"type": "string",
"enum": [
"男",
"女",
"未知"
]
},
"birth_year": {
"type": "integer"
},
"phone": {
"type": "string"
},
"city": {
"type": "string"
}
},
"required": [
"name",
"gender",
"birth_year",
"phone",
"city"
],
"additionalProperties": false
}
}
}
}curl --location 'https://aipipe.vip/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data '{
"model": "deepseek-v4.1-flash-1017",
"messages": [
{
"role": "system",
"content": "你是信息抽取器,只输出 JSON,不要任何解释性文字。"
},
{
"role": "user",
"content": "张伟,男,1990 年生,手机 13800000000,现居杭州。"
}
],
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "person_info",
"strict": true,
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"gender": {
"type": "string",
"enum": [
"男",
"女",
"未知"
]
},
"birth_year": {
"type": "integer"
},
"phone": {
"type": "string"
},
"city": {
"type": "string"
}
},
"required": [
"name",
"gender",
"birth_year",
"phone",
"city"
],
"additionalProperties": false
}
}
}
}'{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"content": "{\"birth_year\":1990,\"city\":\"杭州\",\"gender\":\"男\",\"name\":\"张伟\",\"phone\":\"13800000000\"}",
"reasoning_content": "We need answer only JSON. Need parse: name 张伟, gender 男, birth_year 1990 integer, phone \"13800000000\", city 杭州. Must adhere schema. No explanation.",
"role": "assistant"
}
}
],
"created": 1796089701,
"id": "021796089700737b12e224af966c8c73adaf076dc8c699ac91687",
"model": "deepseek-v4-1-flash-261017",
"service_tier": "default",
"object": "chat.completion",
"usage": {
"completion_tokens": 71,
"prompt_tokens": 174,
"total_tokens": 245,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 43
}
}
}