Provides deep reasoning capabilities for large models in multimodal scenarios. Uses models with deep reasoning abilities to analyze and interpret images, videos, or text, and returns structured text output. The operator automatically constructs a message structure compliant with multimodal model specifications. Users only need to provide image, video, or text data as specified to complete inference.
Details | Caution and prerequisites |
|---|---|
Costs | Before calling an operator, you need to understand the model invocation costs associated with using the operator. For details, see Large model invocation billing. |
Authentication (API Key) | Before calling an operator, you need to generate an API Key for operator invocation. It is recommended to configure the API Key as an environment variable to ensure safer operator calls. For details, see Obtain and configure API Key. |
BaseURL | Before calling an operator, you need to determine the BaseURL for operator invocation based on the region where your current LAS service is deployed. This is used to configure the path parameter values for operator calls. |
POST https://operator.las.ap-southeast-1.volces.com/api/v1/chat/completions
Invoke the doubao-seed-1.8 model for multimodal understanding.
Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
model | string | Yes | doubao-seed-1-8-251228 | Model name and version, |
messages | list of chat_message | Yes | A list of messages that make up the conversation so far. Different models support different types of messages, such as text, images, videos, and more. For usage of this field, refer to 对话(Chat)APIthe messages parameter in the request body. | |
max_tokens | integer | No | 10000 | Value range: varies by model. For details, see .
|
max_completion_tokens | integer | No | 10000 |
Value range: [0, 64k]. |
stop | list of string | No | The default value is null.
| |
frequency_penalty | float | No | 1.0 | The value range is [-2.0, 2.0]. Frequency penalty coefficient. If the value is positive, new tokens are penalized based on their frequency in the text, reducing the likelihood of the model repeating itself token by token. |
presence_penalty | float | No | 1.0 | Value range: [-2.0, 2.0]. Presence penalty coefficient. If the value is positive, new tokens are penalized based on whether they have appeared in the text so far, increasing the likelihood that the model discusses new topics. |
temperature | float | No | 1 | Value range: [0, 2]. Sampling temperature. Controls the degree to which the probability distribution of candidate words is smoothed when generating text. When set to 0, the model only considers the token with the highest log probability. Higher values (such as 0.8) make the output more random, while lower values (such as 0.2) make the output more focused and deterministic. It is generally recommended to adjust only one of temperature or top_p, not both. |
top_p | float | No | 0.5 | Value range: [0, 1]. Nucleus sampling probability threshold. The model considers token results whose cumulative probability mass is within top_p. When set to 0, the model only considers the token with the highest log probability. 0.1 means only the top 10% of tokens by probability mass are considered; higher values increase randomness, while lower values increase determinism. It is generally recommended to adjust only one of temperature or top_p, not both. |
logprobs | boolean | No | true |
Whether to return the log probabilities of output tokens:
|
top_logprobs | integer | No | 10 |
Value range: [0, 20]. Specifies the number of most likely tokens to return at each output token position, each with an associated log probability. The top_logprobs parameter can only be set when logprobs is true. |
logit_bias | map[str,int] | No |
Adjusts the probability of specified tokens appearing in the model output, making the generated content better align with specific preferences. The logit_bias field accepts a map value, where each key is a token ID from the vocabulary (obtained using the tokenization interface), and each value is the bias value for that token, with a range of [-100, 100]. -1 decreases the likelihood of selection, 1 increases the likelihood of selection; -100 completely prohibits selection of that token, and 100 causes only that token to be selectable. The actual effect of this parameter may vary depending on the model. | |
thinking | request_thinking | No | Controls whether the model enables deep thinking mode. Deep thinking mode is enabled by default and can be manually disabled. For usage of this field, refer to the 对话(Chat)APIthinking parameter in the request body. | |
response_format | request_response_format | No | The model output must comply with the format specified here. For usage of this field, refer to the 对话(Chat)APIresponse_format parameter in the request body. | |
tools | list of chat_tool | No | List of tools to be called, which may be included in the model's response. To have the model return tools to be called, this structure must be configured. For usage of this field, refer to the 对话(Chat)APItools parameter in the request body. | |
tool_choice | string or object | No |
For this request, whether the model's response contains tools to be called. When no tools are specified, none is the default value. If tools exist, auto is the default value.
Tool invocation object
|
Parameter | Type | Example value | Description |
|---|---|---|---|
id | string | 0217426318107460cfa43dc3f3683b1de1c09624ff49085a456ac | Unique identifier for this request. |
model | string | Name and version of the model actually used for this request. | |
created | integer | Unix timestamp (seconds) for the creation time of this request. | |
object | string | chat.completion | This value is always chat.completion. |
choices | list of choice | The model output content for this request. | |
index | integer | 0 | The index of the current element in the choices list. |
finish_reason | string | stop | The reason why the model stopped generating tokens. Value range:
|
message | message | The output content of the model. | |
role | string | assistant | The output role. This is always assistant. |
content | string | The message content generated by the model. | |
reasoning_content | string | The reasoning chain content used by the model to process the problem. Only deep reasoning models support returning this field. | |
tool_calls | list of tool_call | The tool calls generated by the model. | |
id | string | assistant | The output role. This is always assistant. |
type | string | function | Tool type. Currently, only the function type is supported. |
function | string | function | The function called by the model. |
logprobs | logprobs | Log probability information for the current content. | |
content | list of lpb_content | Log probability information for each token in the content elements of the message list. | |
token | string | The current token. | |
bytes | list of integer | The UTF-8 value of the current token, formatted as a list of integers. When a character consists of multiple tokens (such as emojis or special characters), this can be used for encoding and decoding the character. If the token does not have a UTF-8 value, it is empty. | |
logprob | float | The log probability of the current token. | |
top_logprobs | list of top_logprobs | A list of the most likely tokens and their log probabilities at the current token position. In some cases, the number returned may be less than the number specified by the top_logprobs parameter in the request. | |
token | string | The current token. | |
bytes | list of integer | The UTF-8 value of the current token, formatted as a list of integers. When a character consists of multiple tokens (such as emojis or special characters), this can be used for encoding and decoding the character. If the token does not have a UTF-8 value, it is empty. | |
logprob | float | The log probability of the current token. | |
moderation_hit_type | string | When the model output contains sensitive information, the risk classification label matched by the model output text will be returned. Returned values and meanings:
| |
usage | usage | Token usage for this request. | |
total_tokens | integer | 10000 | Total number of tokens consumed by this request (input + output). |
prompt_tokens | integer | 1000 | Number of tokens in the content provided to the model for processing. |
cached_tokens | integer | 100 | Token usage for cached input content; this value should be 0. |
prompt_tokens_details | prompt_tokens_details | Details of the number of tokens in the content provided to the model for processing. | |
completion_tokens | integer | 9000 | Tokens spent on model output content. |
reasoning_tokens | integer | 200 | Number of tokens spent on outputting reasoning chain content. |
completion_tokens_details | completion_tokens_details | Details of tokens spent on model output content. |
curl --location "https://operator.las.ap-southeast-1.volces.com/api/v1/chat/completions" \ --header "Content-Type: application/json" \ --header "Authorization: Bearer $LAS_API_KEY" \ --data '{ "messages": [ { "role": "user", "content": [ { "type": "video_url", "video_url": { "url": "https://las-ai-cn-beijing.tos-cn-beijing.volces.com/*****/sample.mp4" } }, { "type": "text", "text": "视频里面有什么" } ] } ], "model": "doubao-seed-1-8-251228" }'
{ "id": "021768911071736e97fe2f517eced7c4391200710ba13b1ae8bec", "object": "chat.completion", "created": 1768911086, "model": "doubao-seed-1-8-32k-251228", "serviceTier": "default", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "视频呈现了这样的内容:\n一位戴着浅色宽边遮阳帽、墨镜,身穿白色上衣搭配花色长裙的女士,坐在白色斑驳建筑旁的黑色折叠椅上,一边演奏手风琴,一边投入地演唱。她身旁地面放着一瓶水,背景是开阔的蓝色水域,远处可见绿植覆盖的陆地,场景位于海边区域。视频中镜头有移动拉近,展现演奏的细节,后期还有穿绿色上衣、卡其色下装的行人从画面右侧路过。", "name": null, "reasoning_content": "用户现在需要总结视频里的内容。首先看视频:一位女士戴着浅色宽边帽、墨镜,白色上衣花裙子,坐在白色建筑旁的折叠椅上,演奏手风琴,同时还在唱歌。背景是海边,有蓝色水域和远处的陆地。镜头有移动,后来有行人(绿上衣卡其裤等)从旁边走过。需要把这些元素整理出来:\n\n视频中,一位戴着浅色宽边遮阳帽、墨镜,身穿白色上衣和花色长裙的女士,坐在白色建筑(墙面有斑驳痕迹)旁的黑色折叠椅上,一边演奏手风琴,一边演唱。她身旁放着一瓶水,背景是开阔的蓝色水域与远处的绿植覆盖的陆地,环境是海边区域。过程中镜头有调整,拉近展现演奏细节,还有行人(穿绿色上衣、卡其色下装的人)从画面右侧走过。", "function_call": null, "tool_calls": null, "tool_call_id": null }, "finish_reason": "stop", "moderation_hit_type": null, "logprobs": null } ], "usage": { "prompt_tokens": 3930, "completion_tokens": 294, "total_tokens": 4224, "prompt_tokens_details": { "cached_tokens": 0, "provisioned_tokens": null }, "completion_tokens_details": { "reasoning_tokens": 189, "provisioned_tokens": null } } }
Use the Responses interface to invoke the doubao-seed-1.8 model for multimodal understanding. Refer to Create a model response for interface definition.
Supported models and versions: doubao-seed-1-8-251228.
curl --location "https://operator.las.ap-southeast-1.volces.com/api/v1/responses" \ --header "Content-Type: application/json" \ --header "Authorization: Bearer $LAS_API_KEY" \ --data '{ "input": [ { "role": "user", "content": [ { "type": "input_video", "video_url": "https://las-ai-cn-beijing.tos-cn-beijing.volces.com/*****/sample.mp4" }, { "type": "input_text", "text": "视频里面有什么" } ] } ], "model": "doubao-seed-1-8-251228" }'
{ "created_at": 1772617764, "error": null, "id": "resp_021772617762470960a4483e1c6480e5dcf931407efe2bda06a32", "incomplete_details": null, "max_output_tokens": 32768, "model": "doubao-seed-1-8-251228", "object": "response", "output": [ { "type": "reasoning", "id": "rs_02177261776458300000000000000000000ffffac1504e228c011", "summary": [ { "type": "summary_text", "text": "用户现在需要分析视频内容,先看画面:一位戴着浅色宽边帽、墨镜,穿白色上衣和花裙子的女士,坐在白色建筑旁的折叠椅上,演奏手风琴,同时还在唱歌。背景是海边,有蓝色的水域和远处的陆地。视频里还有其他元素:她旁边有水瓶,后来有行人(穿绿上衣、卡其裤的人,还有另一个人)从她旁边走过。整个场景是户外海边,女士专注地演奏手风琴并演唱,动作包括按手风琴的键、推拉风箱,头部随着音乐摆动。现在整理这些元素,清晰描述出来。" } ], "status": "completed" }, { "type": "message", "id": "msg_02177261776828500000000000000000000ffffac1504e2a4e276", "role": "assistant", "content": [ { "type": "output_text", "text": "视频里呈现的内容有:\n1. 人物与行为:一位戴着浅色宽边遮阳帽、墨镜,身穿白色上衣+花卉图案长裙的女士,坐在白色建筑旁的折叠椅上,一边演奏手风琴(手部按动琴键、推拉风箱),一边开口演唱,头部也会随着音乐律动;后期有两位行人(一位穿湖绿色上衣+卡其色下装、一位穿白色上衣)从她身旁路过。\n2. 环境与物品:场景是户外海边区域,背景能看到蓝色的水域与远处的绿植陆地;女士身旁地面放着一瓶矿泉水,她身后有打开的箱子。", "annotations": null } ], "status": "completed", "partial": null } ], "previous_response_id": null, "thinking": null, "reasoning": null, "service_tier": "default", "status": "completed", "temperature": null, "tools": null, "top_p": null, "usage": { "input_tokens": 3930, "output_tokens": 276, "total_tokens": 4206, "input_tokens_details": { "cached_tokens": 0 }, "output_tokens_details": { "reasoning_tokens": 137 }, "tool_usage": null, "tool_usage_details": null }, "caching": { "type": "disabled", "prefix": null }, "text": null, "instructions": null, "store": true, "expire_at": 1772876962, "tool_choice": null, "parallel_tool_calls": null, "max_tool_calls": null }
HttpCode | Error code | Error message | Description |
|---|---|---|---|
400 | Model.InvalidName | The model name is invalid. | The model name is not valid. |
401 | Authorization.Missing | Missing Authorization. | Authorization is missing. |
401 | ApiKey.Invalid | The api key is invalid. | The API key is invalid. |