VolcengineAi Chat Model
AI-generatedSummary
Select a Doubao model and configure API options, then invoke the model to generate a response.
Inputs
- model (required) — Select the Doubao model to use, either from the list or by ID.
- options.baseURL — Override the default API base URL for the request.
- options.responseFormat — Response format; set to json_object for JSON mode.
- options.temperature — Controls randomness of the output.
- options.maxTokens — Maximum number of tokens to generate.
- options.topP — Controls diversity via nucleus sampling.
- options.frequencyPenalty — Penalizes token repetition.
- options.presencePenalty — Penalizes repeated topics.
- options.reasoningEffort — Level of reasoning effort to use.
- options.maxRetries — Maximum number of retries on failure.
Output shape
a single record
The response contains the model's generated text or JSON; may include error details.
Examples
Example 1: Default model with text response
model=doubao-pro-4k, responseFormat=text
Example 2: JSON mode with low temperature
model=doubao-chat, responseFormat=json_object, temperature=0.2
Example 3: Base URL override
baseURL=https://custom.volces.com/api/v3, model=doubao-code