MaaS_DB
Streaming
curl --request POST \
--url https://genaiapi.cloudsway.net/v1/ai/xxxx/responses \
--header 'Accept: */*' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'Authorization: Bearer xxxxxx' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'User-Agent: PostmanRuntime-ApipostRuntime/1.1.0' \
--data '{
"model": "doubao-seed-1-6-250615",
"input": "Hello.",
"stream": true
}'
Multi-turn conversation
First round
curl --request POST \
--url https://genaiapi.cloudsway.net/v1/ai/xxxx/responses \
--header 'Accept: */*' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'Authorization: Bearer xxxx' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'User-Agent: PostmanRuntime-ApipostRuntime/1.1.0' \
--data '{
"model": "doubao-seed-1-6-250615",
"stream":true,
"input": "Hi, tell a joke."
}'
Second round
curl --request POST \
--url https://genaiapi.cloudsway.net/v1/ai/xxxxx/responses \
--header 'Accept: */*' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'Authorization: Bearer xxxx' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'User-Agent: PostmanRuntime-ApipostRuntime/1.1.0' \
--data '{
"model": "doubao-seed-1-6-250615",
"previous_response_id":"resp_021760160963639f353939214b94094b6bcbe37e9f4592ed1e320",
"input": "What is the punchline of this joke?"
}'
curl --request POST \
--url https://genaiapi.cloudsway.net/v1/ai/xxxx/responses \
--header 'Accept: */*' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'Authorization: Bearer xxxx' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'User-Agent: PostmanRuntime-ApipostRuntime/1.1.0' \
--data '{
"model": "doubao-seed-1-6-250615",
"previous_response_id":"resp_021760160963639f353939214b94094b6bcbe37e9f4592ed1e320",
"input": "What is the punchline of this joke?"
}'
The first time
curl --request POST \
--url https://genaiapi.cloudsway.net/v1/ai/xxxx/responses \
--header 'Accept: */*' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'Authorization: Bearer xxxx' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'User-Agent: PostmanRuntime-ApipostRuntime/1.1.0' \
--data '{
"model": "doubao-seed-1-6-250615",
"store": true,
"input": [
{
"type": "message",
"role": "user",
"content": "Check today's weather in Beijing"
}
],
"tools": [
{
"type": "function",
"name": "get_weather",
"description": "Check the current weather of the city based on the city name (including temperature and weather conditions)",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "City names, such as Beijing and Shanghai (only domestic prefecture-level cities are supported)"
}
},
"required": ["location"]
}
}
]
}'
The second time
curl --request POST \
--url https://genaiapi.cloudsway.net/v1/ai/xxxx/responses \
--header 'Accept: */*' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'Authorization: Bearer xxxx' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'User-Agent: PostmanRuntime-ApipostRuntime/1.1.0' \
--data '{
"model": "doubao-seed-1-6-250615",
"previous_response_id": "resp_02176016133980737f5bc256fcae014a0b7cda6c451aa58d57d11",
"input": [
{
"arguments": "{\"location\":\"Beijing\"}",
"call_id": "call_q0uc3u7hi0nbt64sjr4b00ra",
"name": "get_weather",
"type": "function_call"
},
{
"type": "function_call_output",
"call_id": "call_q0uc3u7hi0nbt64sjr4b00ra",
"output": "{\"city\":\"Beijing\",\"date\":\"2024-05-20\",\"temperature\":\"18~28℃\",\"condition\":\"Sunny turning to cloudy\",\"wind\":\"Northeast wind, level 2\"}"
}
]
}'
Multimodal - Image
curl --request POST \
--url https://genaiapi.cloudsway.net/v1/ai/xxxx/responses \
--header 'Accept: */*' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'Authorization: Bearer xxxx' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'User-Agent: PostmanRuntime-ApipostRuntime/1.1.0' \
--data '{
"model": "doubao-seed-1-6-250615",
"input": [
{
"role": "user",
"content": [
{
"type": "input_image",
"image_url": "https://ark-project.tos-cn-beijing.volces.com/doc_image/ark_demo_img_1.png"
},
{
"type": "input_text",
"text": "What did you see??"
}
]
}
]
}'
curl --request POST \
--url https://genaiapi.cloudsway.net/v1/ai/xxxx/responses \
--header 'Accept: */*' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'Authorization: Bearer xxxx' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'User-Agent: PostmanRuntime-ApipostRuntime/1.1.0' \
--data '{
"model": "doubao-seed-1-6-250615",
"stream":true,
"input": [
{
"role": "user",
"content": [
{
"type": "input_image",
"image_url": "data:image/png;base64,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
{
"type": "input_text",
"text": "What did you see??"
}
]
}
]
}'
Multimodal - Video
curl --request POST \
--url https://genaiapi.cloudsway.net/v1/ai/xxxx/responses \
--header 'Accept: */*' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'Authorization: Bearer xxxx' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'User-Agent: PostmanRuntime-ApipostRuntime/1.1.0' \
--data '{
"model": "doubao-seed-1-6-250615",
"input": [
{
"role": "user",
"content": [
{
"type": "input_video",
"video_url": "https://ark-project.tos-cn-beijing.volces.com/doc_video/ark_vlm_video_input.mp4",
"fps":1
}
]
}
]
}'
curl --request POST \
--url https://genaiapi.cloudsway.net/v1/ai/xxxx/responses \
--header 'Accept: */*' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'Authorization: Bearer xxxx' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'User-Agent: PostmanRuntime-ApipostRuntime/1.1.0' \
--data '{
"model": "doubao-seed-1-6-250615",
"stream":true,
"input": [
{
"role": "user",
"content": [
{
"type": "input_video",
"video_url": "data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYX"
{
"type": "input_text",
"text": "What did you see??"
}
]
}
]
}'
Get status
curl --request GET \
--url https://genaiapi.cloudsway.net/v1/ai/xxxx/responses/resp_02176016130601337f5bc256fcae014a0b7cda6c451aa5865a1b2 \
--header 'Accept: */*' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'Authorization: Bearer xxxx' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'User-Agent: PostmanRuntime-ApipostRuntime/1.1.0'
Get context conversation
curl --request GET \
--url https://genaiapi.cloudsway.net/v1/ai/xxxx/responses/resp_02176016130601337f5bc256fcae014a0b7cda6c451aa5865a1b2/input_items \
--header 'Accept: */*' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'Authorization: Bearer xxxx' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'User-Agent: PostmanRuntime-ApipostRuntime/1.1.0'
Delete conversation
curl --request DELETE \
--url https://genaiapi.cloudsway.net/v1/ai/xxxx/responses/resp_02176016130601337f5bc256fcae014a0b7cda6c451aa5865a1b2 \
--header 'Accept: */*' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'Authorization: Bearer xxxx' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'User-Agent: PostmanRuntime-ApipostRuntime/1.1.0'