{
"systemInstruction": {
"parts": [
{
"text": "你是信息抽取器,只输出 JSON,不要任何解释性文字。"
}
]
},
"contents": [
{
"role": "user",
"parts": [
{
"text": "张伟,男,1990 年生,手机 13800000000,现居杭州。"
}
]
}
],
"generationConfig": {
"responseMimeType": "application/json",
"responseJsonSchema": {
"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
},
"temperature": 0.2,
"maxOutputTokens": 2048
}
}curl --location 'https://aipipe.vip/v1beta/models/gemini-3.8-flash:generateContent' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data '{
"systemInstruction": {
"parts": [
{
"text": "你是信息抽取器,只输出 JSON,不要任何解释性文字。"
}
]
},
"contents": [
{
"role": "user",
"parts": [
{
"text": "张伟,男,1990 年生,手机 13800000000,现居杭州。"
}
]
}
],
"generationConfig": {
"responseMimeType": "application/json",
"responseJsonSchema": {
"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
},
"temperature": 0.2,
"maxOutputTokens": 2048
}
}'{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "```json\n{\n \"姓名\": \"张伟\",\n \"性别\": \"男\",\n \"出生年份\": 1990,\n \"手机\": \"13800000000\",\n \"现居地\": \"杭州\"\n}"
}
]
},
"finishReason": "STOP",
"safetyRatings": []
}
],
"usageMetadata": {
"promptTokenCount": 22,
"candidatesTokenCount": 47,
"totalTokenCount": 69
}
}