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 slug | zai/glm-5.1 |
| Kind | llm |
| Vendor | Zhipu AI |
How to call
Section titled “How to call”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.
Parameters — full schema
Section titled “Parameters — full schema”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.
Endpoint
Section titled “Endpoint”POST https://api.sociaro.com/v1/chat/completionsContent-Type: application/jsonAuthorization: Bearer $SOCIARO_API_KEY- Auth: Bearer API key (
Authorization: Bearer $SOCIARO_API_KEY). modelis 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, audioinput_audiopart,filepart, filefile_idinputs,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 slug | thinking.type supported | Default | Notes |
|---|---|---|---|
deepseek/deepseek-v4-pro | enabled, disabled | enabled | reasoning_effort incl. max |
deepseek/deepseek-v4-flash | enabled, disabled | enabled | reasoning_effort incl. max |
deepseek/deepseek-v3-2 | enabled, disabled | disabled | the only listed model defaulting to disabled; supports messages.reasoning_content |
bytedance/seed-2-0-pro | enabled, disabled | enabled | reasoning_effort; thinking-summary model |
bytedance/seed-2-0-lite | enabled, disabled | enabled | reasoning_effort; thinking-summary; encrypted_content supported |
bytedance/seed-2-0-mini | enabled, disabled | enabled | reasoning_effort; thinking-summary; file_id input supported |
bytedance/seed-1-8 | enabled, disabled | enabled | reasoning_effort; keeps reasoning_content in history |
bytedance/seed-1-6 | enabled, disabled | enabled | seed-1.6+: honors parallel_tool_calls=false & tool_choice |
bytedance/seed-1-6-flash | enabled, disabled | enabled | |
openai/gpt-oss-120b | enabled, disabled, auto | enabled | only model listing auto; OpenAI-style reasoning_effort |
zai/glm-4-7 | enabled, disabled | enabled |
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 / field | Carve-out |
|---|---|
thinking.type=auto | A 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_effort | Only the models listed above accept it; max only on deepseek/deepseek-v4-pro & deepseek/deepseek-v4-flash. |
frequency_penalty, presence_penalty | NOT supported by seed-1.8 and seed-2.0 series (ignored there). Supported elsewhere, range [-2,2]. |
logprobs, top_logprobs, logit_bias | NOT supported by deep-reasoning-capable models. |
stop | NOT supported by deep-reasoning models; max 4 strings otherwise. |
parallel_tool_calls=false | Only honored by seed-1.6 and later. |
tool_choice | Only 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.detail | Valid 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_schema | Beta; only specific models (structured output). |
Request body — top-level shape
Section titled “Request body — top-level shape”{ "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}"}Request parameters — top-level
Section titled “Request parameters — top-level”| Name | Type | Required | Default | Allowed / Range | Description |
|---|---|---|---|---|---|
model | string | required | — | zai/glm-5.1 | Model to call — the catalog slug for this model. |
messages | object[] | required | — | see message types below | List of chat messages. Supported content modalities (text/image/video/audio/file) vary by model. |
thinking | object | optional | {"type":"enabled"} | see thinking.type | Enables/disables deep-thinking mode. Support & default vary by model; deepseek/deepseek-v3-2 defaults to disabled. |
thinking.type | string | required (within object) | enabled | enabled, disabled, auto | enabled=always think first; disabled=answer directly (no CoT); auto=model decides, skipping CoT for simple questions (only openai/gpt-oss-120b lists auto). |
stream | boolean / null | optional | false | true, false | false=full response at once; true=SSE blocks per SSE protocol ending with data: [DONE]. |
stream_options | object / null | optional | null | — | Streaming options; only meaningful when stream=true. |
stream_options.include_usage | boolean / null | optional | false | true, false | true=extra block before data:[DONE] whose usage is the whole-request token usage and whose choices is an empty array. |
max_tokens | integer / null | optional | 4096 | varies by model | Max length of the model response in tokens. Response = output − chain-of-thought (if any). Also bounded by context length. |
max_completion_tokens | integer / null | optional | — | [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_tier | string / null | optional | auto | auto, default | auto=use TPM guarantee package if the endpoint has quota (faster / higher availability), else default tier; default=never use TPM package even if quota exists. |
stop | string / string[] / null | optional | null | up to 4 strings | Generation stops when a stop string is encountered; the stop string is excluded from the output. Not supported by deep-reasoning models. |
reasoning_effort | string / null | optional | medium | minimal, low, medium, high, max | CoT 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_format | object | optional (beta) | {"type":"text"} | see sub-table | Output format. json_object/json_schema are beta, model-dependent. |
frequency_penalty | float / null | optional | 0 | [-2.0, 2.0] | Positive values penalize tokens by frequency, reducing repetition. Not supported by seed-1.8 / seed-2.0 series. |
presence_penalty | float / null | optional | 0 | [-2.0, 2.0] | Positive values penalize tokens by presence, encouraging new topics. Not supported by seed-1.8 / seed-2.0 series. |
temperature | float / null | optional | 1 | [0, 2] | Sampling temperature. 0=only top-logprob token; higher=more random, lower=more deterministic. Adjust either this or top_p. |
top_p | float / null | optional | 0.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. |
logprobs | boolean / null | optional | false | true, false | Return logprobs of tokens. Not supported by deep-reasoning-capable models. |
top_logprobs | integer / null | optional | 0 | [0, 20] | Number of most-likely tokens (with logprob) per position. Requires logprobs=true. Not supported by deep-reasoning models. |
logit_bias | map / null | optional | null | values [-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. |
tools | object[] / null | optional | null | see sub-table | Tools the model may call (function calling). Model-dependent. |
parallel_tool_calls | boolean | optional | true | true, false | true=allow multiple tools in one response; false=≤1 tool. false only honored by seed-1.6+. |
tool_choice | string / object | optional | none if no tools, auto if tools present | none, 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. |
response_format variants
Section titled “response_format variants”| Name | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|
response_format.type | string | required | text | text / json_object / json_schema | Output format selector. json_object/json_schema beta + model-gated. |
response_format.json_schema | object | required when type=json_schema | — | — | JSON-schema definition wrapper. |
response_format.json_schema.name | string | required | — | — | Name of the user-defined schema. |
response_format.json_schema.description | string / null | optional | — | — | Purpose description; guides how the model formats the response. |
response_format.json_schema.schema | object | required | — | JSON Schema object | The response structure definition (JSON Schema). |
response_format.json_schema.strict | boolean / null | optional | false | true/false | true=strictly follow schema; false=best-effort. |
tools[] (function calling)
Section titled “tools[] (function calling)”| Name | Type | Required | Allowed | Description |
|---|---|---|---|---|
tools.type | string | required | function | Tool type (only function). |
tools.function | object | required | — | Function definition. |
tools.function.name | string | required | — | Function name (case-sensitive). |
tools.function.description | string | optional | — | Helps the model decide whether to call it. |
tools.function.parameters | object | optional | JSON Schema | Function args as a JSON Schema object (type/properties/required). All names case-sensitive; must be a valid JSON Schema object. |
tool_choice object form
Section titled “tool_choice object form”| Name | Type | Required | Allowed | Description |
|---|---|---|---|---|
tool_choice.type | string | required | function | Tool type. |
tool_choice.function | object | required | — | Target tool. |
tool_choice.function.name | string | required | — | Name of the tool to force. |
messages[] — message objects
Section titled “messages[] — message objects”Four roles: system, user, assistant (model message), tool.
System message
Section titled “System message”| Name | Type | Required | Allowed | Description |
|---|---|---|---|---|
messages.role | string | required | system | Role. |
messages.content | string / object[] | required | plaintext or multimodal parts | Instructions/context (role, context, etc.). |
User message
Section titled “User message”| Name | Type | Required | Allowed | Description |
|---|---|---|---|---|
messages.role | string | required | user | Role. |
messages.content | string / object[] | required | plaintext or multimodal parts | User 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
contentortool_callsis required.
| Name | Type | Required | Allowed | Description |
|---|---|---|---|---|
messages.role | string | required | assistant | Role. |
messages.content | string / array | conditional | — | Prior model content. |
messages.reasoning_content | string | optional | — | Chain-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_content | string | optional | — | Encrypted/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_calls | object[] | conditional | — | Prior tool-call messages emitted by the model. |
messages.tool_calls.id | string | required | — | Tool-call ID (model-generated). |
messages.tool_calls.type | string | required | function | Tool type. |
messages.tool_calls.function | object | required | — | Function info. |
messages.tool_calls.function.name | string | required | — | Function name. |
messages.tool_calls.function.arguments | string | required | JSON string | Generated args (may be invalid — validate before use). |
Tool message — function-calling result
Section titled “Tool message — function-calling result”| Name | Type | Required | Allowed | Description |
|---|---|---|---|---|
messages.role | string | required | tool | Role. |
messages.content | string / array | required | — | Tool output. |
messages.tool_call_id | string | required | — | The 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)”Text part
Section titled “Text part”| Name | Type | Required | Allowed | Description |
|---|---|---|---|---|
messages.content.type | string | required | text | Part type. |
messages.content.text | string | required | — | Text content. |
Image part
Section titled “Image part”Pass exactly one of
file_id/url.
| Name | Type | Required | Default | Allowed / Range | Description |
|---|---|---|---|---|---|
messages.content.type | string | required | — | image_url | Part type. |
messages.content.image_url | object | required | — | — | Image content. |
messages.content.image_url.file_id | string | conditional | — | — | Files-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.url | string | conditional | — | image link or base64 | Image URL or base64 string. |
messages.content.image_url.detail | string / null | optional | model-default | low, high, xhigh | Image granularity; overridden by image_pixel_limit when both set. |
messages.content.image_url.image_pixel_limit | object / null | optional | null | total 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_pixels | integer | optional | from 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_pixels | integer | optional | from 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. |
Video part
Section titled “Video part”Pass one of
file_id/url. Audio comprehension of video content is not supported in user-message video parts.
| Name | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
messages.content.type | string | required | — | video_url | Part type. |
messages.content.video_url | object | required | — | — | Video content. |
messages.content.video_url.file_id | string | conditional | — | — | Files-API file ID (same constraints as image file_id; same TOS/model gating). |
messages.content.video_url.url | string | conditional | — | video link or base64 | Video source. |
messages.content.video_url.fps | float / null | optional | 1 | [0.2, 5] | Frames extracted per second. Higher=more detail/more tokens; lower=fewer tokens/faster. |
Audio part
Section titled “Audio part”
type=input_audio. Pass one offile_id/url/data.
| Name | Type | Required | Allowed | Description |
|---|---|---|---|---|
messages.content.type | string | required | input_audio | Part type. |
messages.content.input_audio | object | required | — | Audio content. |
messages.content.input_audio.file_id | string | conditional | — | Files-API file ID (same constraints / model gating). |
messages.content.input_audio.url | string | conditional | — | Audio URL. |
messages.content.input_audio.data | string | conditional | base64 | Base64-encoded audio. |
messages.content.input_audio.format | string | required when data used | see below | MIME 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).
File part (PDF only)
Section titled “File part (PDF only)”
type=file. Pass one offile_id/file_data/file_url. PDF only.
| Name | Type | Required | Allowed | Description |
|---|---|---|---|---|
messages.content.type | string | required | file | Part type. |
messages.content.file | object | required | — | File content (PDF only). |
messages.content.file.file_id | string | conditional | — | Files-API file ID (same constraints / model gating). |
messages.content.file.file_data | string | conditional | base64 | Base64 file content; single file ≤ 50 MB. |
messages.content.file.filename | string | required when file_data used | — | Filename. |
messages.content.file.file_url | string | conditional | — | Accessible 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 } }}Response fields (non-streaming)
Section titled “Response fields (non-streaming)”| Name | Type | Description |
|---|---|---|
id | string | Unique request identifier. |
model | string | Model name + version used. |
service_tier | string | scale=TPM guarantee package quota used; default=not used. |
created | integer | Unix timestamp (seconds) of request creation. |
object | string | chat.completion. |
choices | object[] | Model outputs. |
choices.index | integer | Index in choices. |
choices.finish_reason | string | stop=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.role | string | assistant. |
choices.message.content | string | Generated message. |
choices.message.reasoning_content | string / null | Chain-of-thought during problem-solving (deep-reasoning models only). |
choices.message.tool_calls | object[] / null | Tool calls generated by the model. |
choices.message.tool_calls.id | string | Tool-call ID. |
choices.message.tool_calls.type | string | function. |
choices.message.tool_calls.function.name | string | Function name. |
choices.message.tool_calls.function.arguments | string | JSON-string args (may be invalid — validate before use). |
choices.logprobs | object / null | Logprob detail (null if logprobs not requested). |
choices.logprobs.content | object[] / null | Per-token logprob for each content element. |
choices.logprobs.content[].token | string | Token text. |
choices.logprobs.content[].bytes | integer[] / null | UTF-8 byte values ([] if the token has none). |
choices.logprobs.content[].logprob | float | Token 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_type | string / null | severe_violation / violence. Visual-understanding models only, with ModerationStrategy=Basic on the endpoint. |
usage.total_tokens | integer | Input + output tokens. |
usage.prompt_tokens | integer | Input tokens. |
usage.prompt_tokens_details.cached_tokens | integer | Cached input tokens (all modalities — text, audio, etc.). |
usage.prompt_tokens_details.audio_tokens | integer | Audio-input tokens. |
usage.prompt_tokens_details.audio_cached_tokens | integer | Cached audio-input tokens. |
usage.completion_tokens | integer | Output tokens. |
usage.completion_tokens_details.reasoning_tokens | integer | Chain-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 ofmessage) - stream ends with
data: [DONE] usageisnullby default; setstream_options.include_usage=trueto get a final usage chunk (with emptychoices[])
| Name | Type | Description |
|---|---|---|
choices.index | integer | Index in choices. |
choices.finish_reason | string | Same values as non-streaming. |
choices.delta.role | string | assistant. |
choices.delta.content | string | Incremental content. |
choices.delta.reasoning_content | string / null | Incremental 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_content | string | Full 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[] / null | Incremental tool calls (id / type=function / function.name / function.arguments). |
choices.logprobs | object / null | Same structure as non-streaming. |
choices.moderation_hit_type | string / null | Same as non-streaming. |
usage | object / null | Same structure as non-streaming; only present when include_usage=true. In streaming, usage.prompt_tokens_details.cached_tokens is documented as 0. |
Minimal example
Section titled “Minimal example”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)”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_tokensis used instead ofmax_tokens(mutually exclusive).reasoning_effort:"max"only takes effect ondeepseek/deepseek-v4-pro/deepseek/deepseek-v4-flash.parallel_tool_calls:falseandtool_choicerequire seed-1.6+ (shown on deepseek to illustrate field placement; deepseek honoring depends on the model’s tool support).stopis unsupported on deep-reasoning models and is ignored there;logprobs/top_logprobs/logit_biaslikewise. Ondeepseek/deepseek-v4-prothinkingdefaults toenabled; ondeepseek/deepseek-v3-2it would default todisabled.
Audio / file input snippets
Section titled “Audio / file input snippets”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>" } }