Send a list of messages containing modalities such as text, images, videos, and more. The model will generate the next message in the conversation.
Parameter name | Data type | Required | Parameter description |
|---|---|---|---|
model | string | Yes | The model ID to call. After enabling the model service, query to obtain it. For multiple applications and fine-grained management scenarios, it is recommended to use Endpoint ID for invocation. |
messages | object[] | Yes | List of messages. Different models support different types of messages, such as text, images, videos, and more. |
thinking | object | No | Controls the model's deep thinking mode, default value {"type":"enabled"} |
stream | boolean / null | No | Whether the response is returned in streaming mode, default value is false; when true, returns in blocks according to the SSE protocol, ending with data: [DONE] |
stream_options | object / null | No | Streaming response options (can only be set when stream is true) |
max_tokens | integer / null | No | Maximum length of model response (in tokens), default value is 4096; does not include reasoning chain content, subject to model context length limit |
max_completion_tokens | integer / null | No | Maximum length of model output (including response and reasoning chain, in tokens), value range [0, 65536]; mutually exclusive with max_tokens, max_tokens becomes invalid when configured |
service_tier | string / null | No | TPM protection package usage control, default value is auto; auto prioritizes quota usage, default does not use |
stop | string / string[] / null | No | Trigger condition for model to stop generating, supports up to 4 strings; not supported by deep reasoning models |
reasoning_effort | string / null | No | Reasoning workload limit, default value is medium; optional values: minimal (reasoning disabled), low (lightweight reasoning), medium (balanced), high (in-depth analysis) |
response_format | object | No | Model response format, default value {"type": "text"} (beta stage) |
frequency_penalty | float / null | No | Frequency penalty coefficient, value range [-2.0, 2.0], default value is 0; positive values reduce the probability of repeated tokens |
presence_penalty | float / null | No | A penalty coefficient is present, value range [-2.0, 2.0], default value 0; positive values increase the probability of new topic tokens |
temperature | float / null | No | Sampling temperature, value range [0, 2], default value 1; higher values result in more randomness, lower values result in more determinism (it is recommended to adjust only one of temperature or top_p) |
top_p | float / null | No | Nucleus sampling probability threshold, value range [0, 1], default value 0.7; controls the probability quality range of candidate tokens (it is recommended to adjust only one of temperature or top_p) |
logprobs | boolean / null | No | Whether to return the log probability of output tokens, default value is false; not supported by deep reasoning models |
top_logprobs | integer / null | No | Maximum number of possible tokens returned at each token position, value range [0, 20], default value 0; only effective when logprobs is true, not supported by deep reasoning models |
tools | object[] / null | No | List of tools to be called (must be configured when the model returns tool calls) |
parallel_tool_calls | boolean | No | Whether multiple tool calls are allowed to be returned, default value is true; when false, at most one will be returned (only doubao-seed-1-6-*** models are effective) |
tool_choice | string / object | No | Tool call control (only doubao-seed-1-6-*** and later models are supported); for string type, options are none (no tool), required (must call), auto (automatic decision); for object type, specify the specific tool |
Parameter name | Data type | Parameter description |
|---|---|---|
id | string | Unique identifier for this request |
model | string | Name and version of the model actually used for this request |
service_tier | string | TPM protection package usage status, optional values: scale (quota used), default (not used) |
created | integer | Unix timestamp (seconds) of request creation time |
object | string | Returned object type, fixed as chat.completion |
choices | object[] | List of model output contents |
usage | object / null | Token usage statistics |
Parameter name | Data type | Parameter description |
|---|---|---|
id | string | Unique identifier for this request |
model | string | Model name and version actually used for this request |
service_tier | string | TPM package usage status. Optional values: scale (quota used), default (not used) |
created | integer | Unix timestamp (seconds) for request creation time |
object | string | Returned object type, fixed as chat.completion.chunk |
choices | object[] | List of model output content |
usage | object / null | Token usage statistics. Returned only when stream_options.include_usage is set to true. |
request
curl https://operator.las.ap-southeast-1.volces.com/api/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer $ARK_API_KEY" -d $'{ "messages": [ { "content": "You are a helpful assistant.", "role": "system" }, { "content": "hello", "role": "user" } ], "model": "doubao-1-5-pro-32k-250115", "stream": true }'
response
{"choices":[{"delta":{"content":"Hello","role":"assistant"},"index":0}],"created":1742632436,"id":"021742632435712396f12d018b5d576a7a55349c2eba0815061fc","model":"doubao-1-5-pro-32k-250115","service_tier":"default","object":"chat.completion.chunk","usage":null} {"choices":[{"delta":{"content":"!","role":"assistant"},"index":0}],"created":1742632436,"id":"021742632435712396f12d018b5d576a7a55349c2eba0815061fc","model":"doubao-1-5-pro-32k-250115","service_tier":"default","object":"chat.completion.chunk","usage":null} {"choices":[{"delta":{"content":" How","role":"assistant"},"index":0}],"created":1742632436,"id":"021742632435712396f12d018b5d576a7a55349c2eba0815061fc","model":"doubao-1-5-pro-32k-250115","service_tier":"default","object":"chat.completion.chunk","usage":null} {"choices":[{"delta":{"content":" can","role":"assistant"},"index":0}],"created":1742632436,"id":"021742632435712396f12d018b5d576a7a55349c2eba0815061fc","model":"doubao-1-5-pro-32k-250115","service_tier":"default","object":"chat.completion.chunk","usage":null} {"choices":[{"delta":{"content":" I","role":"assistant"},"index":0}],"created":1742632436,"id":"021742632435712396f12d018b5d576a7a55349c2eba0815061fc","model":"doubao-1-5-pro-32k-250115","service_tier":"default","object":"chat.completion.chunk","usage":null} {"choices":[{"delta":{"content":" help","role":"assistant"},"index":0}],"created":1742632436,"id":"021742632435712396f12d018b5d576a7a55349c2eba0815061fc","model":"doubao-1-5-pro-32k-250115","service_tier":"default","object":"chat.completion.chunk","usage":null} {"choices":[{"delta":{"content":" you","role":"assistant"},"index":0}],"created":1742632436,"id":"021742632435712396f12d018b5d576a7a55349c2eba0815061fc","model":"doubao-1-5-pro-32k-250115","service_tier":"default","object":"chat.completion.chunk","usage":null} {"choices":[{"delta":{"content":" today","role":"assistant"},"index":0}],"created":1742632436,"id":"021742632435712396f12d018b5d576a7a55349c2eba0815061fc","model":"doubao-1-5-pro-32k-250115","service_tier":"default","object":"chat.completion.chunk","usage":null} {"choices":[{"delta":{"content":"?","role":"assistant"},"index":0}],"created":1742632436,"id":"021742632435712396f12d018b5d576a7a55349c2eba0815061fc","model":"doubao-1-5-pro-32k-250115","service_tier":"default","object":"chat.completion.chunk","usage":null} {"choices":[{"delta":{"content":"","role":"assistant"},"finish_reason":"stop","index":0}],"created":1742632436,"id":"021742632435712396f12d018b5d576a7a55349c2eba0815061fc","model":"doubao-1-5-pro-32k-250115","service_tier":"default","object":"chat.completion.chunk","usage":null} [DONE]
request
curl https://operator.las.ap-southeast-1.volces.com//api/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer $ARK_API_KEY" -d $'{ "messages": [ { "content": "你是一个计算器,请计算: 1 + 1", "role": "user" }, { "content": "=", "role": "assistant" } ], "model": "doubao-1-5-pro-32k-250115" }'
response
{ "choices": [ { "finish_reason": "stop", "index": 0, "logprobs": null, "message": { "content": " 2", "role": "assistant" } } ], "created": 1742634165, "id": "0217426341647344ee2a242cadeb3c7acc981f0bd805884bc65fc", "model": "doubao-1-5-pro-32k-250115", "service_tier": "default", "object": "chat.completion", "usage": { "completion_tokens": 2, "prompt_tokens": 21, "total_tokens": 23, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 0 } } }
request
curl https://operator.las.ap-southeast-1.volces.com//api/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer $ARK_API_KEY" -d $'{ "model": "doubao-1-5-vision-pro-32k-250115", "messages": [ { "content": [ { "image_url": { "url": "https://ark-project.tos-cn-beijing.volces.com/images/view.jpeg" }, "type": "image_url" }, { "text": "图片主要讲了什么?", "type": "text" } ], "role": "user" } ] }'
response
{ "choices": [ { "finish_reason": "stop", "index": 0, "logprobs": null, "message": { "content": "画面中呈现了一幅宁静的户外景象。一个人乘坐在橙黄色的皮划艇上,手持船桨,正在平静的水面划行。水面如镜,倒映着周围景致。远处是茂密的森林,森林后方矗立着巍峨的雪山,山体覆盖着白雪。天空呈浅蓝色,飘浮着一些云朵。整体氛围静谧而美好,展现出自然的纯净与壮阔。 ", "role": "assistant" } } ], "created": 1742636149, "id": "0217426361458116592a076493be583bc5e33f80ac2dcf1efc31b", "model": "doubao-1-5-vision-pro-32k-250115", "service_tier": "default", "object": "chat.completion", "usage": { "completion_tokens": 85, "prompt_tokens": 521, "total_tokens": 606, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 0 } } }
request
curl https://operator.las.ap-southeast-1.volces.com//api/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer $ARK_API_KEY" -d $'{ "messages": [ { "content": "我要有研究推理模型与非推理模型区别的课题,怎么体现我的专业性", "role": "user" } ], "model": "doubao-seed-1-6-251015" }'
response
{ "choices": [ { "finish_reason": "stop", "index": 0, "logprobs": null, "message": { "content": " 推理模型与非推理模型的主要区别在于其处理任务的方式、能力侧重点以及应用场景。以下是两者的核心区别分析: --- ### **1. 核心定义** - **推理模型** 具备**逻辑推理、因果推断或复杂决策**能力,*** 实际应用中,两类模型常配合使用(如用非推理模型提取特征,再交给推理模型决策),以平衡效率与准确性。", "reasoning_content": "嗯,用户问的是推理模型和非推理模型有什么区别。我需要先理解这两个术语的具体含义。可能用户对机器学习或深度学习有一定的了解,但需要更清晰的区分。首先,我应该明确这两个概念的定义,然后从不同角度进行比较。 首先,推理模型可能指的是那些需要进行逻辑推理、处理复杂任务的模型,***,而非推理模型侧重于模式识别和直接映射,帮助用户形成清晰的概念框架。 ", "role": "assistant" } } ], "created": 1742636537, "id": "0217426364949596592a076493be583bc5e33f80ac2dcf1eeaf9b", "model": "doubao-seed-1-6-251015", "service_tier": "default", "object": "chat.completion", "usage": { "completion_tokens": 1207, "prompt_tokens": 11, "total_tokens": 1218, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 419 } } }