When request.stream=false, returns CreateResponsesResponse as application/json. When request.stream=true, returns text/event-stream. Each frame is written as event: plus data: ; the JSON payload follows task.v1.ConversationStreamEvent and the terminal frame is the literal string [DONE].
curl --location --request POST 'https://api.modellink.ai/task.v1.TaskService/CreateResponses' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "string",
"project_id": "string",
"previous_response_id": "string",
"input": [
{
"content": "string",
"role": "string",
"type": "string",
"reasoning_content": "string",
"tool_calls": [
{
"id": "string",
"function": {
"name": "string",
"arguments": "string"
},
"type": "string"
}
],
"tool_call_id": "string"
}
],
"history_id": "string",
"stream": true,
"thinking": {
"type": "string"
},
"reasoning": {
"effort": "string"
},
"temperature": 0,
"top_p": 0,
"tools": [
{
"type": "string",
"name": "string",
"description": "string",
"parameters_json_schema": {},
"strict": true
}
],
"tool_choice": {
"type": "string",
"function": {
"name": "string"
}
},
"max_tool_calls": 0,
"max_output_tokens": 0,
"text": {
"format": {
"type": "string",
"name": "string",
"schema": {},
"strict": true
}
},
"context_management": [
{
"type": "string",
"compact_threshold": 0
}
]
}'{
"output": [
{
"type": "string",
"role": "string",
"content": [
{
"type": "string",
"text": "string"
}
],
"summary": [
{
"type": "string",
"text": "string"
}
]
}
],
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0
},
"task_id": "string",
"history_id": "string"
}