Skip to content

GLM 5.1

zai/glm-5.1 — a llm model by Zhipu AI. Call it through the gateway’s standard OpenAI-compatible door using the catalog slug; the full parameter schema is reproduced in full below.

Catalog slugzai/glm-5.1
Kindllm
VendorZhipu AI

Through the Sociaro SDK / OpenAI-compatible door

Section titled “Through the Sociaro SDK / OpenAI-compatible door”
from sociaro_ai import Sociaro
client = Sociaro(api_key="gw_live_...") # base_url defaults to https://api.sociaro.com
resp = client.chat.completions.create(
model="zai/glm-5.1", # always the catalog slug
messages=[{"role": "user", "content": "Hello"}],
# any parameter from the schema below is passed through unchanged
)
print(resp.choices[0].message.content)

TypeScript: client.chat.completions.create({ model: "zai/glm-5.1", messages: [...] }) — see the TypeScript SDK.

The complete, one-to-one API schema for this model, transcribed from the official source. Nothing omitted. Examples in the schema may use a representative model of the family — for this model use the slug zai/glm-5.1 as shown in How to call above.

This is the gateway’s standard OpenAI-compatible Chat Completions reference. The models documented here (ByteDance Seed, DeepSeek, OpenAI gpt-oss, Zhipu GLM) are all reached through the same chat door using their catalog slug as model. The parameters below follow the OpenAI Chat Completions schema; the per-model capability notes describe behaviour of the underlying models, not any particular routing provider.


POST https://api.sociaro.com/v1/chat/completions
Content-Type: application/json
Authorization: Bearer $SOCIARO_API_KEY
  • Auth: Bearer API key (Authorization: Bearer $SOCIARO_API_KEY).
  • model is the catalog slug for the model you want (e.g. bytedance/seed-2-0-lite, deepseek/deepseek-v4-pro, openai/gpt-oss-120b, zai/glm-4-7, zai/glm-5.1).
  • Largely OpenAI-compatible. Extras beyond vanilla OpenAI Chat: thinking{type}, reasoning_effort, service_tier, max_completion_tokens, messages.reasoning_content, messages.encrypted_content, image_url.image_pixel_limit, image_url.detail=xhigh, video_url.fps, audio input_audio part, file part, file file_id inputs, choices.moderation_hit_type, usage.prompt_tokens_details.audio_tokens/audio_cached_tokens.
  • This is the union superset across the Seed / DeepSeek / GPT-OSS / GLM families served via this door. The gateway treats bodies transparently, so per-model carve-outs are documentation notes, not request validation.

Per-model coverage map (capability matrix)

Section titled “Per-model coverage map (capability matrix)”

thinking.type support and default (per-model deep-reasoning capability):

Catalog slugthinking.type supportedDefaultNotes
deepseek/deepseek-v4-proenabled, disabledenabledreasoning_effort incl. max
deepseek/deepseek-v4-flashenabled, disabledenabledreasoning_effort incl. max
deepseek/deepseek-v3-2enabled, disableddisabledthe only listed model defaulting to disabled; supports messages.reasoning_content
bytedance/seed-2-0-proenabled, disabledenabledreasoning_effort; thinking-summary model
bytedance/seed-2-0-liteenabled, disabledenabledreasoning_effort; thinking-summary; encrypted_content supported
bytedance/seed-2-0-minienabled, disabledenabledreasoning_effort; thinking-summary; file_id input supported
bytedance/seed-1-8enabled, disabledenabledreasoning_effort; keeps reasoning_content in history
bytedance/seed-1-6enabled, disabledenabledseed-1.6+: honors parallel_tool_calls=false & tool_choice
bytedance/seed-1-6-flashenabled, disabledenabled
openai/gpt-oss-120benabled, disabled, autoenabledonly model listing auto; OpenAI-style reasoning_effort
zai/glm-4-7enabled, disabledenabled

reasoning_effort supported models (chain-of-thought length control): deepseek/deepseek-v4-pro, deepseek/deepseek-v4-flash, bytedance/seed-2-0-lite, bytedance/seed-2-0-mini, bytedance/seed-2-0-pro, bytedance/seed-1-8. Value max works ONLY on deepseek/deepseek-v4-pro & deepseek/deepseek-v4-flash (ignored if passed elsewhere).

Thinking-summary models (return reasoning_content summary + encrypted_content instead of raw CoT; enabled by default): bytedance/seed-2-0-pro, bytedance/seed-2-0-mini, bytedance/seed-2-0-lite.

Which models are deep-reasoning-capable (and hence drop logprobs/top_logprobs/logit_bias/stop) varies by model. Always confirm a specific model’s capability before relying on those four params.

Critical per-model differences (request-side carve-outs)

Section titled “Critical per-model differences (request-side carve-outs)”
Param / fieldCarve-out
thinking.type=autoA valid value globally, but only openai/gpt-oss-120b lists auto support. Non-thinking models ignore thinking.
thinking default{"type":"enabled"} globally; but deepseek/deepseek-v3-2 defaults to disabled. Support & default vary by model.
reasoning_effortOnly the models listed above accept it; max only on deepseek/deepseek-v4-pro & deepseek/deepseek-v4-flash.
frequency_penalty, presence_penaltyNOT supported by seed-1.8 and seed-2.0 series (ignored there). Supported elsewhere, range [-2,2].
logprobs, top_logprobs, logit_biasNOT supported by deep-reasoning-capable models.
stopNOT supported by deep-reasoning models; max 4 strings otherwise.
parallel_tool_calls=falseOnly honored by seed-1.6 and later.
tool_choiceOnly seed-1.6 and later support this parameter.
messages.reasoning_content (assistant input)Only seed-1.8, seed-2.0, deepseek-v3.2. Multi-turn: models before 251228 should have it stripped from history; seed-1.8+ keep it.
messages.encrypted_content (assistant input)Supported on bytedance/seed-2-0-lite, bytedance/seed-2-0-mini, bytedance/seed-2-0-pro. Takes precedence over reasoning_content; invalid/tampered value → service returns “Invalid signature”.
image_url.image_pixel_limit.max_pixels≤ 4 014 080 for models before seed-1.8; ≤ 9 031 680 for seed-1.8 & seed-2.0.
image_url.image_pixel_limit.min_pixels≥ 3136 (pre-1.8); ≥ 1764 (seed-1.8 & seed-2.0).
image_url.detailValid values low / high / xhigh; overridden by image_pixel_limit when both set.
*.file_id inputs (image/video/audio/file via Files API or TOS bucket)Supported on: bytedance/seed-2-0-mini, bytedance/seed-2-0-lite, bytedance/seed-2-0-pro.
choices.moderation_hit_type (response)Returned only by visual-understanding models with ModerationStrategy=Basic set on the endpoint.
service_tier (response value)scale when a TPM guarantee package was used, default when not. (Request side uses auto/default — different value set.)
response_format json_object / json_schemaBeta; only specific models (structured output).

{
"model": "string (required)",
"messages": [ /* required, array of message objects */ ],
"thinking": { "type": "enabled | disabled | auto" },
"stream": false,
"stream_options": { "include_usage": false },
"max_tokens": 4096,
"max_completion_tokens": 0,
"service_tier": "auto | default",
"stop": "string | [\"s1\",\"s2\"] | null",
"reasoning_effort": "minimal | low | medium | high | max",
"response_format": { "type": "text | json_object | json_schema", "json_schema": { } },
"frequency_penalty": 0,
"presence_penalty": 0,
"temperature": 1,
"top_p": 0.7,
"logprobs": false,
"top_logprobs": 0,
"logit_bias": { "<token_id>": 0 },
"tools": [ { "type": "function", "function": { } } ],
"parallel_tool_calls": true,
"tool_choice": "none | auto | required | {object}"
}

NameTypeRequiredDefaultAllowed / RangeDescription
modelstringrequiredzai/glm-5.1Model to call — the catalog slug for this model.
messagesobject[]requiredsee message types belowList of chat messages. Supported content modalities (text/image/video/audio/file) vary by model.
thinkingobjectoptional{"type":"enabled"}see thinking.typeEnables/disables deep-thinking mode. Support & default vary by model; deepseek/deepseek-v3-2 defaults to disabled.
thinking.typestringrequired (within object)enabledenabled, disabled, autoenabled=always think first; disabled=answer directly (no CoT); auto=model decides, skipping CoT for simple questions (only openai/gpt-oss-120b lists auto).
streamboolean / nulloptionalfalsetrue, falsefalse=full response at once; true=SSE blocks per SSE protocol ending with data: [DONE].
stream_optionsobject / nulloptionalnullStreaming options; only meaningful when stream=true.
stream_options.include_usageboolean / nulloptionalfalsetrue, falsetrue=extra block before data:[DONE] whose usage is the whole-request token usage and whose choices is an empty array.
max_tokensinteger / nulloptional4096varies by modelMax length of the model response in tokens. Response = output − chain-of-thought (if any). Also bounded by context length.
max_completion_tokensinteger / nulloptional[1, 65536]Max output length including response + chain-of-thought. When set, the model ignores the max_tokens default and generates up to this value. Cannot be set together with max_tokens. Preferred for deep-reasoning models.
service_tierstring / nulloptionalautoauto, defaultauto=use TPM guarantee package if the endpoint has quota (faster / higher availability), else default tier; default=never use TPM package even if quota exists.
stopstring / string[] / nulloptionalnullup to 4 stringsGeneration stops when a stop string is encountered; the stop string is excluded from the output. Not supported by deep-reasoning models.
reasoning_effortstring / nulloptionalmediumminimal, low, medium, high, maxCoT depth. minimal=no reasoning/answer directly; low=light/fast; medium=balanced; high=deep analysis; max=only deepseek/deepseek-v4-pro & deepseek/deepseek-v4-flash (ignored elsewhere). Interacts with thinking.type; only applies to original CoT, not the thinking summary.
response_formatobjectoptional (beta){"type":"text"}see sub-tableOutput format. json_object/json_schema are beta, model-dependent.
frequency_penaltyfloat / nulloptional0[-2.0, 2.0]Positive values penalize tokens by frequency, reducing repetition. Not supported by seed-1.8 / seed-2.0 series.
presence_penaltyfloat / nulloptional0[-2.0, 2.0]Positive values penalize tokens by presence, encouraging new topics. Not supported by seed-1.8 / seed-2.0 series.
temperaturefloat / nulloptional1[0, 2]Sampling temperature. 0=only top-logprob token; higher=more random, lower=more deterministic. Adjust either this or top_p.
top_pfloat / nulloptional0.7[0, 1]Nucleus-sampling threshold (tokens whose cumulative prob ≥ top_p). 0=only top token; 0.1=top 10% probability mass. Adjust either this or temperature.
logprobsboolean / nulloptionalfalsetrue, falseReturn logprobs of tokens. Not supported by deep-reasoning-capable models.
top_logprobsinteger / nulloptional0[0, 20]Number of most-likely tokens (with logprob) per position. Requires logprobs=true. Not supported by deep-reasoning models.
logit_biasmap / nulloptionalnullvalues [-100, 100]Map of token ID (from the Tokenization API vocabulary) → bias. -100=never use; 100=only use; -1/1=discourage/encourage. Actual effect varies by model. Not supported by deep-reasoning models.
toolsobject[] / nulloptionalnullsee sub-tableTools the model may call (function calling). Model-dependent.
parallel_tool_callsbooleanoptionaltruetrue, falsetrue=allow multiple tools in one response; false=≤1 tool. false only honored by seed-1.6+.
tool_choicestring / objectoptionalnone if no tools, auto if tools presentnone, auto, required, or {type,function}Controls tool usage. Only seed-1.6+ support this param. none=no tool; required=must call a tool; auto=model decides; object=force a specific function.
NameTypeRequiredDefaultAllowedDescription
response_format.typestringrequiredtexttext / json_object / json_schemaOutput format selector. json_object/json_schema beta + model-gated.
response_format.json_schemaobjectrequired when type=json_schemaJSON-schema definition wrapper.
response_format.json_schema.namestringrequiredName of the user-defined schema.
response_format.json_schema.descriptionstring / nulloptionalPurpose description; guides how the model formats the response.
response_format.json_schema.schemaobjectrequiredJSON Schema objectThe response structure definition (JSON Schema).
response_format.json_schema.strictboolean / nulloptionalfalsetrue/falsetrue=strictly follow schema; false=best-effort.
NameTypeRequiredAllowedDescription
tools.typestringrequiredfunctionTool type (only function).
tools.functionobjectrequiredFunction definition.
tools.function.namestringrequiredFunction name (case-sensitive).
tools.function.descriptionstringoptionalHelps the model decide whether to call it.
tools.function.parametersobjectoptionalJSON SchemaFunction args as a JSON Schema object (type/properties/required). All names case-sensitive; must be a valid JSON Schema object.
NameTypeRequiredAllowedDescription
tool_choice.typestringrequiredfunctionTool type.
tool_choice.functionobjectrequiredTarget tool.
tool_choice.function.namestringrequiredName of the tool to force.

Four roles: system, user, assistant (model message), tool.

NameTypeRequiredAllowedDescription
messages.rolestringrequiredsystemRole.
messages.contentstring / object[]requiredplaintext or multimodal partsInstructions/context (role, context, etc.).
NameTypeRequiredAllowedDescription
messages.rolestringrequireduserRole.
messages.contentstring / object[]requiredplaintext or multimodal partsUser content; supported modalities vary by model.

Assistant (model) message — for multi-turn history / prefill

Section titled “Assistant (model) message — for multi-turn history / prefill”

At least one of content or tool_calls is required.

NameTypeRequiredAllowedDescription
messages.rolestringrequiredassistantRole.
messages.contentstring / arrayconditionalPrior model content.
messages.reasoning_contentstringoptionalChain-of-thought content. Only seed-1.8, seed-2.0, deepseek-v3.2. Older seed-1.6 snapshots: strip from history; seed-1.8+: keep.
messages.encrypted_contentstringoptionalEncrypted/compressed reasoning. Supported on bytedance/seed-2-0-lite, bytedance/seed-2-0-mini, bytedance/seed-2-0-pro. Takes precedence over reasoning_content; tampered/invalid → “Invalid signature”.
messages.tool_callsobject[]conditionalPrior tool-call messages emitted by the model.
messages.tool_calls.idstringrequiredTool-call ID (model-generated).
messages.tool_calls.typestringrequiredfunctionTool type.
messages.tool_calls.functionobjectrequiredFunction info.
messages.tool_calls.function.namestringrequiredFunction name.
messages.tool_calls.function.argumentsstringrequiredJSON stringGenerated args (may be invalid — validate before use).
NameTypeRequiredAllowedDescription
messages.rolestringrequiredtoolRole.
messages.contentstring / arrayrequiredTool output.
messages.tool_call_idstringrequiredThe model-generated tool-call ID this result answers (associates the tool result with the originating call).

Multimodal content[] parts (within user/system content arrays)

Section titled “Multimodal content[] parts (within user/system content arrays)”
NameTypeRequiredAllowedDescription
messages.content.typestringrequiredtextPart type.
messages.content.textstringrequiredText content.

Pass exactly one of file_id / url.

NameTypeRequiredDefaultAllowed / RangeDescription
messages.content.typestringrequiredimage_urlPart type.
messages.content.image_urlobjectrequiredImage content.
messages.content.image_url.file_idstringconditionalFiles-API file ID. File type must match type; status must be active; project must match the API key’s project. TOS-bucket file_id supported on bytedance/seed-2-0-mini, bytedance/seed-2-0-lite, bytedance/seed-2-0-pro.
messages.content.image_url.urlstringconditionalimage link or base64Image URL or base64 string.
messages.content.image_url.detailstring / nulloptionalmodel-defaultlow, high, xhighImage granularity; overridden by image_pixel_limit when both set.
messages.content.image_url.image_pixel_limitobject / nulloptionalnulltotal pixels must be within [196, 36000000]Pixel bounds; image outside the range is proportionally resized. Takes precedence over detail. If a sub-field is unset, falls back to the value implied by detail.
messages.content.image_url.image_pixel_limit.max_pixelsintegeroptionalfrom detail≤ 4 014 080 (pre-1.8); ≤ 9 031 680 (seed-1.8 & 2.0); range (min_pixels, ceiling]Downscale ceiling: images with more pixels scaled down below it.
messages.content.image_url.image_pixel_limit.min_pixelsintegeroptionalfrom detail≥ 3136 (pre-1.8); ≥ 1764 (seed-1.8 & 2.0); range [floor, max_pixels)Upscale floor: images with fewer pixels scaled up above it.

Pass one of file_id / url. Audio comprehension of video content is not supported in user-message video parts.

NameTypeRequiredDefaultRangeDescription
messages.content.typestringrequiredvideo_urlPart type.
messages.content.video_urlobjectrequiredVideo content.
messages.content.video_url.file_idstringconditionalFiles-API file ID (same constraints as image file_id; same TOS/model gating).
messages.content.video_url.urlstringconditionalvideo link or base64Video source.
messages.content.video_url.fpsfloat / nulloptional1[0.2, 5]Frames extracted per second. Higher=more detail/more tokens; lower=fewer tokens/faster.

type = input_audio. Pass one of file_id / url / data.

NameTypeRequiredAllowedDescription
messages.content.typestringrequiredinput_audioPart type.
messages.content.input_audioobjectrequiredAudio content.
messages.content.input_audio.file_idstringconditionalFiles-API file ID (same constraints / model gating).
messages.content.input_audio.urlstringconditionalAudio URL.
messages.content.input_audio.datastringconditionalbase64Base64-encoded audio.
messages.content.input_audio.formatstringrequired when data usedsee belowMIME format of the audio.

format MIME values:

  • Audio-only: .mp3=audio/mpeg, .wav=audio/wav, .aac=audio/aac, .m4a=audio/mp4
  • Embedded-in-video also: .mp3=audio/mpeg, .wav=audio/wav, .aac=audio/aac, .m4a=audio/mp4, .pcm=audio/L16, .ac3=audio/ac3, .alac=audio/mp4

Audio limits: file size ≤ 25 MB; total audio-only duration ≤ 120 min per request (embedded-in-video audio duration is not counted).

type = file. Pass one of file_id / file_data / file_url. PDF only.

NameTypeRequiredAllowedDescription
messages.content.typestringrequiredfilePart type.
messages.content.fileobjectrequiredFile content (PDF only).
messages.content.file.file_idstringconditionalFiles-API file ID (same constraints / model gating).
messages.content.file.file_datastringconditionalbase64Base64 file content; single file ≤ 50 MB.
messages.content.file.filenamestringrequired when file_data usedFilename.
messages.content.file.file_urlstringconditionalAccessible URL; file ≤ 50 MB.

Response — non-streaming (object: chat.completion)

Section titled “Response — non-streaming (object: chat.completion)”
{
"id": "string",
"model": "string",
"service_tier": "scale | default",
"created": 1749110144,
"object": "chat.completion",
"choices": [
{
"index": 0,
"finish_reason": "stop | length | content_filter | tool_calls",
"logprobs": null,
"message": {
"role": "assistant",
"content": "string",
"reasoning_content": "string | null",
"tool_calls": [
{ "id": "string", "type": "function",
"function": { "name": "string", "arguments": "json-string" } }
]
},
"moderation_hit_type": "severe_violation | violence | null"
}
],
"usage": {
"total_tokens": 55,
"prompt_tokens": 20,
"prompt_tokens_details": { "cached_tokens": 0, "audio_tokens": 0, "audio_cached_tokens": 0 },
"completion_tokens": 35,
"completion_tokens_details": { "reasoning_tokens": 0 }
}
}
NameTypeDescription
idstringUnique request identifier.
modelstringModel name + version used.
service_tierstringscale=TPM guarantee package quota used; default=not used.
createdintegerUnix timestamp (seconds) of request creation.
objectstringchat.completion.
choicesobject[]Model outputs.
choices.indexintegerIndex in choices.
choices.finish_reasonstringstop=ended or hit a stop string; length=hit max_tokens / max_completion_tokens / context_window; content_filter=intercepted by moderation; tool_calls=a tool was called.
choices.message.rolestringassistant.
choices.message.contentstringGenerated message.
choices.message.reasoning_contentstring / nullChain-of-thought during problem-solving (deep-reasoning models only).
choices.message.tool_callsobject[] / nullTool calls generated by the model.
choices.message.tool_calls.idstringTool-call ID.
choices.message.tool_calls.typestringfunction.
choices.message.tool_calls.function.namestringFunction name.
choices.message.tool_calls.function.argumentsstringJSON-string args (may be invalid — validate before use).
choices.logprobsobject / nullLogprob detail (null if logprobs not requested).
choices.logprobs.contentobject[] / nullPer-token logprob for each content element.
choices.logprobs.content[].tokenstringToken text.
choices.logprobs.content[].bytesinteger[] / nullUTF-8 byte values ([] if the token has none).
choices.logprobs.content[].logprobfloatToken logprob.
choices.logprobs.content[].top_logprobs[]object[]Most-probable tokens at the position (each: token / bytes / logprob). May return fewer than requested.
choices.moderation_hit_typestring / nullsevere_violation / violence. Visual-understanding models only, with ModerationStrategy=Basic on the endpoint.
usage.total_tokensintegerInput + output tokens.
usage.prompt_tokensintegerInput tokens.
usage.prompt_tokens_details.cached_tokensintegerCached input tokens (all modalities — text, audio, etc.).
usage.prompt_tokens_details.audio_tokensintegerAudio-input tokens.
usage.prompt_tokens_details.audio_cached_tokensintegerCached audio-input tokens.
usage.completion_tokensintegerOutput tokens.
usage.completion_tokens_details.reasoning_tokensintegerChain-of-thought tokens. (For thinking-summary models, billing still counts the original CoT tokens.)

Response — streaming (object: chat.completion.chunk)

Section titled “Response — streaming (object: chat.completion.chunk)”

Same top-level fields (id, model, service_tier, created) but:

  • object = chat.completion.chunk
  • each chunk uses choices[].delta (instead of message)
  • stream ends with data: [DONE]
  • usage is null by default; set stream_options.include_usage=true to get a final usage chunk (with empty choices[])
NameTypeDescription
choices.indexintegerIndex in choices.
choices.finish_reasonstringSame values as non-streaming.
choices.delta.rolestringassistant.
choices.delta.contentstringIncremental content.
choices.delta.reasoning_contentstring / nullIncremental reasoning (deep-reasoning models). On thinking-summary models (bytedance/seed-2-0-lite, bytedance/seed-2-0-mini, bytedance/seed-2-0-pro) this returns a summary of the reasoning, not the raw CoT.
choices.delta.encrypted_contentstringFull encrypted/compressed reasoning emitted in one chunk after CoT streaming finishes and before the response begins; in that chunk both content and reasoning_content are empty. Supported on bytedance/seed-2-0-lite, bytedance/seed-2-0-mini, bytedance/seed-2-0-pro.
choices.delta.tool_calls[]object[] / nullIncremental tool calls (id / type=function / function.name / function.arguments).
choices.logprobsobject / nullSame structure as non-streaming.
choices.moderation_hit_typestring / nullSame as non-streaming.
usageobject / nullSame structure as non-streaming; only present when include_usage=true. In streaming, usage.prompt_tokens_details.cached_tokens is documented as 0.

Terminal window
curl https://api.sociaro.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SOCIARO_API_KEY" \
-d '{
"model": "bytedance/seed-2-0-lite",
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Hello!" }
]
}'

Minimal response (verbatim shape from the doc):

{
"choices": [{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": { "content": "Hello! How are you? ...", "role": "assistant" }
}],
"created": 1749110144,
"id": "0217491101427332b0b8a623b95f3e6209666650b67ac353d7ad2",
"model": "bytedance/seed-2-0-lite",
"service_tier": "default",
"object": "chat.completion",
"usage": {
"completion_tokens": 35,
"prompt_tokens": 20,
"total_tokens": 55,
"prompt_tokens_details": { "cached_tokens": 0 },
"completion_tokens_details": { "reasoning_tokens": 0 }
}
}

Full example (thinking + tools + streaming usage + multimodal + sampling controls)

Section titled “Full example (thinking + tools + streaming usage + multimodal + sampling controls)”
Terminal window
curl https://api.sociaro.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SOCIARO_API_KEY" \
-d '{
"model": "deepseek/deepseek-v4-pro",
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": [
{ "type": "text", "text": "Describe this image and call get_weather." },
{ "type": "image_url",
"image_url": { "url": "https://example.com/a.jpg", "detail": "high",
"image_pixel_limit": { "max_pixels": 9031680, "min_pixels": 1764 } } }
]
}
],
"thinking": { "type": "enabled" },
"reasoning_effort": "max",
"max_completion_tokens": 8192,
"service_tier": "auto",
"temperature": 0.7,
"top_p": 0.9,
"stop": ["\n\nUser:"],
"logprobs": false,
"response_format": { "type": "text" },
"tools": [
{ "type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather for a city.",
"parameters": {
"type": "object",
"properties": { "city": { "type": "string", "description": "City name" } },
"required": ["city"]
}
}
}
],
"parallel_tool_calls": false,
"tool_choice": "auto",
"stream": true,
"stream_options": { "include_usage": true }
}'

Full-example notes: max_completion_tokens is used instead of max_tokens (mutually exclusive). reasoning_effort:"max" only takes effect on deepseek/deepseek-v4-pro / deepseek/deepseek-v4-flash. parallel_tool_calls:false and tool_choice require seed-1.6+ (shown on deepseek to illustrate field placement; deepseek honoring depends on the model’s tool support). stop is unsupported on deep-reasoning models and is ignored there; logprobs/top_logprobs/logit_bias likewise. On deepseek/deepseek-v4-pro thinking defaults to enabled; on deepseek/deepseek-v3-2 it would default to disabled.

Audio (base64) part:

{ "type": "input_audio",
"input_audio": { "data": "<base64>", "format": "audio/mpeg" } }

PDF file part:

{ "type": "file",
"file": { "file_data": "<base64>", "filename": "doc.pdf" } }

Files-API file_id part (bytedance/seed-2-0-mini / bytedance/seed-2-0-lite / bytedance/seed-2-0-pro only):

{ "type": "image_url", "image_url": { "file_id": "<files-api-id>" } }