curl --location 'https://api.kie.ai/grok/v1/responses' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "grok-4-3",
"stream": true,
"input": [
{
"role": "user",
"content": [
{
"type": "input_text",
"text": "你好,用中文回答"
}
]
}
],
"text": {
"format": {
"type": "json_schema",
"name": "basic_response",
"strict": true,
"schema": {
"type": "object",
"properties": {
"answer": {
"type": "string",
"description": "回复内容"
},
"mood": {
"type": "string",
"description": "回复时的心情"
}
},
"required": [
"answer",
"mood"
],
"additionalProperties": false
}
}
}
}'{
"output": [
{
"type": "reasoning",
"id": "rs_xxx",
"summary": []
},
{
"type": "message",
"role": "assistant",
"id": "msg_xxx",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?"
}
],
"status": "completed"
}
],
"usage": {
"total_tokens": 4490,
"output_tokens": 47,
"input_tokens": 4443
},
"credits_consumed": 0.48,
"status": "completed"
}