[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"docs-nav-en":3,"docs-en-models\u002Fchat\u002Fvolcengine":180,"$flPxTKrvU_qsH-tbJ8bldUIof4Db4sevcx0drO_DwOxs":673},[4,26,43,105,155,172,176],{"title":5,"path":6,"stem":7,"children":8,"page":25},"Getting Started","\u002Fgetting-started","1.getting-started",[9,13,17,21],{"title":10,"path":11,"stem":12},"Your First SilvaMux API Call","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F1.quick-start",{"title":14,"path":15,"stem":16},"Model Selection","\u002Fgetting-started\u002Fmodel-selection","1.getting-started\u002F2.model-selection",{"title":18,"path":19,"stem":20},"Rate Limits","\u002Fgetting-started\u002Frate-limits","1.getting-started\u002F3.rate-limits",{"title":22,"path":23,"stem":24},"FAQ","\u002Fgetting-started\u002Ffaq","1.getting-started\u002F4.faq",false,{"title":27,"path":28,"stem":29,"children":30,"page":25},"Billing","\u002Fbilling","2.billing",[31,35,39],{"title":32,"path":33,"stem":34},"Billing Overview","\u002Fbilling\u002Foverview","2.billing\u002F1.overview",{"title":36,"path":37,"stem":38},"Online Top-up","\u002Fbilling\u002Frecharge","2.billing\u002F2.recharge",{"title":40,"path":41,"stem":42},"Bills, Usage & Exports","\u002Fbilling\u002Fusage-export","2.billing\u002F3.usage-export",{"title":44,"path":45,"stem":46,"children":47,"page":25},"Coding Plan","\u002Fcoding-plan","3.coding-plan",[48,52,56,60,67,102],{"title":49,"path":50,"stem":51},"Coding Plan Overview","\u002Fcoding-plan\u002Foverview","3.coding-plan\u002F1.overview",{"title":53,"path":54,"stem":55},"Quick Start","\u002Fcoding-plan\u002Fquick-start","3.coding-plan\u002F2.quick-start",{"title":57,"path":58,"stem":59},"Usage Notes","\u002Fcoding-plan\u002Fusage-notes","3.coding-plan\u002F3.usage-notes",{"title":61,"path":62,"stem":63,"children":64},"Personal","\u002Fcoding-plan\u002Fpersonal","3.coding-plan\u002F4.personal\u002Findex",[65],{"title":66,"path":62,"stem":63},"Pricing & Benefits",{"title":68,"path":69,"stem":70,"children":71,"page":-1},"Developer Guide","\u002Fcoding-plan\u002Fguide","3.coding-plan\u002F5.guide\u002Findex",[72,74,78,82,86,90,94,98],{"title":73,"path":69,"stem":70},"Endpoints & Protocols",{"title":75,"path":76,"stem":77},"Claude Code","\u002Fcoding-plan\u002Fguide\u002Fclaude-code","3.coding-plan\u002F5.guide\u002F1.claude-code",{"title":79,"path":80,"stem":81},"OpenCode","\u002Fcoding-plan\u002Fguide\u002Fopencode","3.coding-plan\u002F5.guide\u002F2.opencode",{"title":83,"path":84,"stem":85},"Cursor","\u002Fcoding-plan\u002Fguide\u002Fcursor","3.coding-plan\u002F5.guide\u002F3.cursor",{"title":87,"path":88,"stem":89},"Codex","\u002Fcoding-plan\u002Fguide\u002Fcodex","3.coding-plan\u002F5.guide\u002F4.codex",{"title":91,"path":92,"stem":93},"ZCode","\u002Fcoding-plan\u002Fguide\u002Fzcode","3.coding-plan\u002F5.guide\u002F5.zcode",{"title":95,"path":96,"stem":97},"TRAE","\u002Fcoding-plan\u002Fguide\u002Ftrae","3.coding-plan\u002F5.guide\u002F6.trae",{"title":99,"path":100,"stem":101},"CodeBuddy","\u002Fcoding-plan\u002Fguide\u002Fcodebuddy","3.coding-plan\u002F5.guide\u002F7.codebuddy",{"title":22,"path":103,"stem":104},"\u002Fcoding-plan\u002Ffaq","3.coding-plan\u002F6.faq",{"title":106,"path":107,"stem":108,"children":109,"page":25},"Model APIs","\u002Fmodels","4.models",[110,143],{"title":111,"path":112,"stem":113,"children":114,"page":25},"Text Generation Model API","\u002Fmodels\u002Fchat","4.models\u002F1.chat",[115,119,123,127,131,135,139],{"title":116,"path":117,"stem":118},"Overview","\u002Fmodels\u002Fchat\u002Foverview","4.models\u002F1.chat\u002F1.overview",{"title":120,"path":121,"stem":122},"OpenAI Compatible API","\u002Fmodels\u002Fchat\u002Fopenai","4.models\u002F1.chat\u002F2.openai",{"title":124,"path":125,"stem":126},"Anthropic Compatible","\u002Fmodels\u002Fchat\u002Fanthropic","4.models\u002F1.chat\u002F3.anthropic",{"title":128,"path":129,"stem":130},"Volcengine Compatible","\u002Fmodels\u002Fchat\u002Fvolcengine","4.models\u002F1.chat\u002F4.volcengine",{"title":132,"path":133,"stem":134},"Zhipu Compatible","\u002Fmodels\u002Fchat\u002Fzhipu","4.models\u002F1.chat\u002F5.zhipu",{"title":136,"path":137,"stem":138},"SilvaMux Unified Entry","\u002Fmodels\u002Fchat\u002Funified","4.models\u002F1.chat\u002F6.unified",{"title":140,"path":141,"stem":142},"Multimodal Input","\u002Fmodels\u002Fchat\u002Fmultimodal","4.models\u002F1.chat\u002F7.multimodal",{"title":144,"path":145,"stem":146,"children":147,"page":25},"Image Generation Model API","\u002Fmodels\u002Fimages","4.models\u002F2.images",[148,151],{"title":116,"path":149,"stem":150},"\u002Fmodels\u002Fimages\u002Foverview","4.models\u002F2.images\u002F1.overview",{"title":152,"path":153,"stem":154},"Image Generation API","\u002Fmodels\u002Fimages\u002Fgeneration","4.models\u002F2.images\u002F2.generation",{"title":156,"path":157,"stem":158,"children":159,"page":25},"Usage & Balance","\u002Fusage-and-balance","5.usage-and-balance",[160,164,168],{"title":161,"path":162,"stem":163},"Query Balance","\u002Fusage-and-balance\u002Fbalance","5.usage-and-balance\u002F1.balance",{"title":165,"path":166,"stem":167},"Query Usage","\u002Fusage-and-balance\u002Fusage","5.usage-and-balance\u002F2.usage",{"title":169,"path":170,"stem":171},"Query Request Usage","\u002Fusage-and-balance\u002Frequest-usage","5.usage-and-balance\u002F3.request-usage",{"title":173,"path":174,"stem":175},"Error Codes","\u002Ferrors","6.errors",{"title":177,"path":178,"stem":179},"Getting Started with SilvaMux","\u002F","index",{"id":181,"title":128,"body":182,"description":666,"extension":667,"meta":668,"navigation":321,"path":129,"rawbody":669,"requiredFlags":670,"seo":671,"stem":130,"__hash__":672},"docs_en\u002F4.models\u002F1.chat\u002F4.volcengine.md",{"type":183,"value":184,"toc":663},"minimark",[185,189,193,198,203,643,659],[186,187,128],"h1",{"id":188},"volcengine-compatible",[190,191,192],"p",{},"Compatible with the Volcengine Ark OpenAI-compatible API (v3 protocol), usable for Doubao Seed series models and other models that follow the Volcengine v3 protocol.",[194,195],"api-endpoint",{"method":196,"path":197},"POST","\u002Fapi\u002Fv3\u002Fchat\u002Fcompletions",[199,200,202],"h2",{"id":201},"examples","Examples",[204,205,206,292,383,459],"code-tabs",{},[207,208,210],"code-tab",{"label":209},"cURL",[211,212,217],"pre",{"className":213,"code":214,"language":215,"meta":216,"style":216},"language-bash shiki shiki-themes github-light github-dark","curl https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv3\u002Fchat\u002Fcompletions \\\n  -H \"Authorization: Bearer $SILVAMUX_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"model\": \"doubao-seed-2.0-pro\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n  }'\n","bash","",[218,219,220,237,255,265,274,280,286],"code",{"__ignoreMap":216},[221,222,225,229,233],"span",{"class":223,"line":224},"line",1,[221,226,228],{"class":227},"sScJk","curl",[221,230,232],{"class":231},"sZZnC"," https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv3\u002Fchat\u002Fcompletions",[221,234,236],{"class":235},"sj4cs"," \\\n",[221,238,240,243,246,250,253],{"class":223,"line":239},2,[221,241,242],{"class":235},"  -H",[221,244,245],{"class":231}," \"Authorization: Bearer ",[221,247,249],{"class":248},"sVt8B","$SILVAMUX_API_KEY",[221,251,252],{"class":231},"\"",[221,254,236],{"class":235},[221,256,258,260,263],{"class":223,"line":257},3,[221,259,242],{"class":235},[221,261,262],{"class":231}," \"Content-Type: application\u002Fjson\"",[221,264,236],{"class":235},[221,266,268,271],{"class":223,"line":267},4,[221,269,270],{"class":235},"  -d",[221,272,273],{"class":231}," '{\n",[221,275,277],{"class":223,"line":276},5,[221,278,279],{"class":231},"    \"model\": \"doubao-seed-2.0-pro\",\n",[221,281,283],{"class":223,"line":282},6,[221,284,285],{"class":231},"    \"messages\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n",[221,287,289],{"class":223,"line":288},7,[221,290,291],{"class":231},"  }'\n",[207,293,295],{"label":294},"Python",[211,296,300],{"className":297,"code":298,"language":299,"meta":216,"style":216},"language-python shiki shiki-themes github-light github-dark","# pip install openai\nimport os\nfrom openai import OpenAI\n\nclient = OpenAI(\n    api_key=os.environ[\"SILVAMUX_API_KEY\"],\n    base_url=\"https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv3\",\n)\n\nresponse = client.chat.completions.create(\n    model=\"doubao-seed-2.0-pro\",\n    messages=[{\"role\": \"user\", \"content\": \"Hello\"}],\n)\n\nprint(response.choices[0].message.content)\n","python",[218,301,302,307,312,317,323,328,333,338,344,349,355,361,367,372,377],{"__ignoreMap":216},[221,303,304],{"class":223,"line":224},[221,305,306],{},"# pip install openai\n",[221,308,309],{"class":223,"line":239},[221,310,311],{},"import os\n",[221,313,314],{"class":223,"line":257},[221,315,316],{},"from openai import OpenAI\n",[221,318,319],{"class":223,"line":267},[221,320,322],{"emptyLinePlaceholder":321},true,"\n",[221,324,325],{"class":223,"line":276},[221,326,327],{},"client = OpenAI(\n",[221,329,330],{"class":223,"line":282},[221,331,332],{},"    api_key=os.environ[\"SILVAMUX_API_KEY\"],\n",[221,334,335],{"class":223,"line":288},[221,336,337],{},"    base_url=\"https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv3\",\n",[221,339,341],{"class":223,"line":340},8,[221,342,343],{},")\n",[221,345,347],{"class":223,"line":346},9,[221,348,322],{"emptyLinePlaceholder":321},[221,350,352],{"class":223,"line":351},10,[221,353,354],{},"response = client.chat.completions.create(\n",[221,356,358],{"class":223,"line":357},11,[221,359,360],{},"    model=\"doubao-seed-2.0-pro\",\n",[221,362,364],{"class":223,"line":363},12,[221,365,366],{},"    messages=[{\"role\": \"user\", \"content\": \"Hello\"}],\n",[221,368,370],{"class":223,"line":369},13,[221,371,343],{},[221,373,375],{"class":223,"line":374},14,[221,376,322],{"emptyLinePlaceholder":321},[221,378,380],{"class":223,"line":379},15,[221,381,382],{},"print(response.choices[0].message.content)\n",[207,384,386],{"label":385},"JavaScript",[211,387,391],{"className":388,"code":389,"language":390,"meta":216,"style":216},"language-javascript shiki shiki-themes github-light github-dark","\u002F\u002F npm install openai\nimport OpenAI from \"openai\";\n\nconst client = new OpenAI({\n  apiKey: process.env.SILVAMUX_API_KEY,\n  baseURL: \"https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv3\",\n});\n\nconst response = await client.chat.completions.create({\n  model: \"doubao-seed-2.0-pro\",\n  messages: [{ role: \"user\", content: \"Hello\" }],\n});\n\nconsole.log(response.choices[0].message.content);\n","javascript",[218,392,393,398,403,407,412,417,422,427,431,436,441,446,450,454],{"__ignoreMap":216},[221,394,395],{"class":223,"line":224},[221,396,397],{},"\u002F\u002F npm install openai\n",[221,399,400],{"class":223,"line":239},[221,401,402],{},"import OpenAI from \"openai\";\n",[221,404,405],{"class":223,"line":257},[221,406,322],{"emptyLinePlaceholder":321},[221,408,409],{"class":223,"line":267},[221,410,411],{},"const client = new OpenAI({\n",[221,413,414],{"class":223,"line":276},[221,415,416],{},"  apiKey: process.env.SILVAMUX_API_KEY,\n",[221,418,419],{"class":223,"line":282},[221,420,421],{},"  baseURL: \"https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv3\",\n",[221,423,424],{"class":223,"line":288},[221,425,426],{},"});\n",[221,428,429],{"class":223,"line":340},[221,430,322],{"emptyLinePlaceholder":321},[221,432,433],{"class":223,"line":346},[221,434,435],{},"const response = await client.chat.completions.create({\n",[221,437,438],{"class":223,"line":351},[221,439,440],{},"  model: \"doubao-seed-2.0-pro\",\n",[221,442,443],{"class":223,"line":357},[221,444,445],{},"  messages: [{ role: \"user\", content: \"Hello\" }],\n",[221,447,448],{"class":223,"line":363},[221,449,426],{},[221,451,452],{"class":223,"line":369},[221,453,322],{"emptyLinePlaceholder":321},[221,455,456],{"class":223,"line":374},[221,457,458],{},"console.log(response.choices[0].message.content);\n",[207,460,462],{"label":461},"Go",[211,463,467],{"className":464,"code":465,"language":466,"meta":216,"style":216},"language-go shiki shiki-themes github-light github-dark","\u002F\u002F Standard library only\npackage main\n\nimport (\n    \"bytes\"\n    \"fmt\"\n    \"io\"\n    \"net\u002Fhttp\"\n    \"os\"\n)\n\nfunc main() {\n    payload := []byte(`{\n        \"model\": \"doubao-seed-2.0-pro\",\n        \"messages\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n    }`)\n\n    req, err := http.NewRequest(\"POST\", \"https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv3\u002Fchat\u002Fcompletions\", bytes.NewReader(payload))\n    if err != nil {\n        panic(err)\n    }\n    req.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"SILVAMUX_API_KEY\"))\n    req.Header.Set(\"Content-Type\", \"application\u002Fjson\")\n\n    resp, err := http.DefaultClient.Do(req)\n    if err != nil {\n        panic(err)\n    }\n    defer resp.Body.Close()\n\n    body, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(body))\n}\n","go",[218,468,469,474,479,483,488,493,498,503,508,513,517,521,526,531,536,541,547,552,558,564,570,576,582,588,593,599,604,609,614,620,625,631,637],{"__ignoreMap":216},[221,470,471],{"class":223,"line":224},[221,472,473],{},"\u002F\u002F Standard library only\n",[221,475,476],{"class":223,"line":239},[221,477,478],{},"package main\n",[221,480,481],{"class":223,"line":257},[221,482,322],{"emptyLinePlaceholder":321},[221,484,485],{"class":223,"line":267},[221,486,487],{},"import (\n",[221,489,490],{"class":223,"line":276},[221,491,492],{},"    \"bytes\"\n",[221,494,495],{"class":223,"line":282},[221,496,497],{},"    \"fmt\"\n",[221,499,500],{"class":223,"line":288},[221,501,502],{},"    \"io\"\n",[221,504,505],{"class":223,"line":340},[221,506,507],{},"    \"net\u002Fhttp\"\n",[221,509,510],{"class":223,"line":346},[221,511,512],{},"    \"os\"\n",[221,514,515],{"class":223,"line":351},[221,516,343],{},[221,518,519],{"class":223,"line":357},[221,520,322],{"emptyLinePlaceholder":321},[221,522,523],{"class":223,"line":363},[221,524,525],{},"func main() {\n",[221,527,528],{"class":223,"line":369},[221,529,530],{},"    payload := []byte(`{\n",[221,532,533],{"class":223,"line":374},[221,534,535],{},"        \"model\": \"doubao-seed-2.0-pro\",\n",[221,537,538],{"class":223,"line":379},[221,539,540],{},"        \"messages\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n",[221,542,544],{"class":223,"line":543},16,[221,545,546],{},"    }`)\n",[221,548,550],{"class":223,"line":549},17,[221,551,322],{"emptyLinePlaceholder":321},[221,553,555],{"class":223,"line":554},18,[221,556,557],{},"    req, err := http.NewRequest(\"POST\", \"https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv3\u002Fchat\u002Fcompletions\", bytes.NewReader(payload))\n",[221,559,561],{"class":223,"line":560},19,[221,562,563],{},"    if err != nil {\n",[221,565,567],{"class":223,"line":566},20,[221,568,569],{},"        panic(err)\n",[221,571,573],{"class":223,"line":572},21,[221,574,575],{},"    }\n",[221,577,579],{"class":223,"line":578},22,[221,580,581],{},"    req.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"SILVAMUX_API_KEY\"))\n",[221,583,585],{"class":223,"line":584},23,[221,586,587],{},"    req.Header.Set(\"Content-Type\", \"application\u002Fjson\")\n",[221,589,591],{"class":223,"line":590},24,[221,592,322],{"emptyLinePlaceholder":321},[221,594,596],{"class":223,"line":595},25,[221,597,598],{},"    resp, err := http.DefaultClient.Do(req)\n",[221,600,602],{"class":223,"line":601},26,[221,603,563],{},[221,605,607],{"class":223,"line":606},27,[221,608,569],{},[221,610,612],{"class":223,"line":611},28,[221,613,575],{},[221,615,617],{"class":223,"line":616},29,[221,618,619],{},"    defer resp.Body.Close()\n",[221,621,623],{"class":223,"line":622},30,[221,624,322],{"emptyLinePlaceholder":321},[221,626,628],{"class":223,"line":627},31,[221,629,630],{},"    body, _ := io.ReadAll(resp.Body)\n",[221,632,634],{"class":223,"line":633},32,[221,635,636],{},"    fmt.Println(string(body))\n",[221,638,640],{"class":223,"line":639},33,[221,641,642],{},"}\n",[644,645,646],"blockquote",{},[190,647,648,651,652,655,656,658],{},[218,649,650],{},"https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv3"," is the ",[218,653,654],{},"\u002Fapi\u002Fv3"," path under the access domain, routing to ",[218,657,197],{},". Authentication uses the SilvaMux API key, not Volcengine AK\u002FSK.",[660,661,662],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":216,"searchDepth":239,"depth":239,"links":664},[665],{"id":201,"depth":239,"text":202},"Volcengine Ark v3 Chat Completions compatible entry.","md",{},"---\ntitle: Volcengine Compatible\ndescription: Volcengine Ark v3 Chat Completions compatible entry.\n---\n\n# Volcengine Compatible\n\nCompatible with the Volcengine Ark OpenAI-compatible API (v3 protocol), usable for Doubao Seed series models and other models that follow the Volcengine v3 protocol.\n\n::api-endpoint{path=\"\u002Fapi\u002Fv3\u002Fchat\u002Fcompletions\" method=\"POST\"}\n::\n\n## Examples\n\n::code-tabs\n:::code-tab{label=\"cURL\"}\n```bash\ncurl https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv3\u002Fchat\u002Fcompletions \\\n  -H \"Authorization: Bearer $SILVAMUX_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"model\": \"doubao-seed-2.0-pro\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n  }'\n```\n:::\n:::code-tab{label=\"Python\"}\n```python\n# pip install openai\nimport os\nfrom openai import OpenAI\n\nclient = OpenAI(\n    api_key=os.environ[\"SILVAMUX_API_KEY\"],\n    base_url=\"https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv3\",\n)\n\nresponse = client.chat.completions.create(\n    model=\"doubao-seed-2.0-pro\",\n    messages=[{\"role\": \"user\", \"content\": \"Hello\"}],\n)\n\nprint(response.choices[0].message.content)\n```\n:::\n:::code-tab{label=\"JavaScript\"}\n```javascript\n\u002F\u002F npm install openai\nimport OpenAI from \"openai\";\n\nconst client = new OpenAI({\n  apiKey: process.env.SILVAMUX_API_KEY,\n  baseURL: \"https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv3\",\n});\n\nconst response = await client.chat.completions.create({\n  model: \"doubao-seed-2.0-pro\",\n  messages: [{ role: \"user\", content: \"Hello\" }],\n});\n\nconsole.log(response.choices[0].message.content);\n```\n:::\n:::code-tab{label=\"Go\"}\n```go\n\u002F\u002F Standard library only\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"net\u002Fhttp\"\n\t\"os\"\n)\n\nfunc main() {\n\tpayload := []byte(`{\n\t\t\"model\": \"doubao-seed-2.0-pro\",\n\t\t\"messages\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n\t}`)\n\n\treq, err := http.NewRequest(\"POST\", \"https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv3\u002Fchat\u002Fcompletions\", bytes.NewReader(payload))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"SILVAMUX_API_KEY\"))\n\treq.Header.Set(\"Content-Type\", \"application\u002Fjson\")\n\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n\n\tbody, _ := io.ReadAll(resp.Body)\n\tfmt.Println(string(body))\n}\n```\n:::\n::\n\n> `https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv3` is the `\u002Fapi\u002Fv3` path under the access domain, routing to `\u002Fapi\u002Fv3\u002Fchat\u002Fcompletions`. Authentication uses the SilvaMux API key, not Volcengine AK\u002FSK.\n",[],{"title":128,"description":666},"pmdNhYbPfz4ANBht74IlSd2bMJmxC-st6d4F8bv9zBg",{"found":321,"operationId":674,"summary":675,"description":216,"method":196,"path":197,"publiclyDiscoverable":321,"security":676,"parameters":680,"requestBody":681,"responses":776},"createVolcengineChatCompletion","Volcengine 兼容",{"schemes":677,"optional":25},[678,679],"BearerAuth","ApiKeyAuth",[],{"present":321,"required":321,"description":216,"contentType":682,"type":683,"fields":684,"variants":775},"application\u002Fjson","OpenAIChatRequest",[685,689,693,697,701,705,708,712,715,718,721,724,727,730,733,736,740,745,749,753,757,759,762,764,767,769,772],{"name":686,"type":687,"required":25,"description":688},"max_tokens","integer","生成的最大 token 数；达到限制时输出可能被截断。",{"name":690,"type":691,"required":321,"description":692},"messages","array\u003CMessage>","对话消息列表（按时间顺序，至少一条），提供完整上下文。",{"name":694,"type":695,"required":321,"description":696},"messages.content","string | array\u003CContentPart>","消息内容：纯文本字符串或多模态分段数组（图片 \u002F 音频）。不能只包含 system 或 assistant 消息。",{"name":698,"type":699,"required":25,"description":700},"messages.name","string","参与者名称（可选）。",{"name":702,"type":703,"required":321,"description":704},"messages.role","string (system | user | assistant | tool)","消息角色：system 设定行为与人设，user 用户输入，assistant 模型回复，tool 工具执行结果。",{"name":706,"type":699,"required":25,"description":707},"messages.tool_call_id","role=tool 时对应的工具调用 ID。",{"name":709,"type":710,"required":25,"description":711},"messages.tool_calls","array\u003CToolCall>","模型发起的工具调用（出现在 assistant 历史消息中）。",{"name":713,"type":714,"required":321,"description":216},"messages.tool_calls.function","object",{"name":716,"type":699,"required":321,"description":717},"messages.tool_calls.function.arguments","JSON 编码的函数参数。",{"name":719,"type":699,"required":321,"description":720},"messages.tool_calls.function.name","函数名。",{"name":722,"type":699,"required":321,"description":723},"messages.tool_calls.id","工具调用 ID。",{"name":725,"type":726,"required":321,"description":216},"messages.tool_calls.type","string (function)",{"name":728,"type":699,"required":321,"description":729},"model","SilvaMux 模型调用名（id 或 alias）。从模型广场模型详情页复制；账号最终可用范围还受组织权限影响。",{"name":731,"type":714,"required":25,"description":732},"response_format","输出格式：text（默认，普通文本）或 json_object（JSON 模式）。",{"name":734,"type":735,"required":25,"description":216},"response_format.type","string (text | json_object)",{"name":737,"type":738,"required":25,"description":739},"stop","string | array\u003Cstring>","停止词：生成文本出现这些字符串时立即停止，最多 4 个。",{"name":741,"type":742,"required":25,"description":743,"defaultValue":744},"stream","boolean","是否启用流式输出（SSE）。false：完整生成后一次性返回；true：实时返回生成内容，结束时以 data: [DONE] 标记（客户端不应仅依赖该标记判断完成）。","false",{"name":746,"type":747,"required":25,"description":748},"temperature","number","采样温度，控制输出随机性：值越高越发散，越低越稳定。建议只调整 temperature 或 top_p 之一。",{"name":750,"type":751,"required":25,"description":752},"tool_choice","string (auto | none) | object","工具选择策略：auto（默认，模型自行决定）\u002F none（禁用）\u002F 指定函数对象。",{"name":754,"type":755,"required":25,"description":756},"tools","array\u003CTool>","可供模型调用的函数定义列表（Function Calling）。",{"name":758,"type":714,"required":321,"description":216},"tools.function",{"name":760,"type":699,"required":25,"description":761},"tools.function.description","函数用途描述，帮助模型决定是否调用。",{"name":763,"type":699,"required":321,"description":720},"tools.function.name",{"name":765,"type":714,"required":25,"description":766},"tools.function.parameters","函数参数的 JSON Schema。",{"name":768,"type":726,"required":321,"description":216},"tools.type",{"name":770,"type":747,"required":25,"description":771},"top_p","核采样参数，temperature 的替代方案。",{"name":773,"type":699,"required":25,"description":774},"user","终端用户标识符，用于滥用检测。",[],[777,837],{"status":778,"description":779,"contentType":682,"type":780,"fields":781},"200","OpenAI Chat JSON 或 SSE 响应。","OpenAIChatResponse",[782,786,790,793,796,799,802,805,808,810,812,814,817,820,822,824,828,831,834],{"name":783,"type":784,"required":321,"description":785},"choices","array\u003COpenAIChatChoice>","候选响应列表。",{"name":787,"type":788,"required":321,"description":789},"choices.finish_reason","string (stop | length | tool_calls | content_filter)","结束原因：stop 自然结束；length 达到 max_tokens；tool_calls 需执行工具；content_filter 触发内容过滤。",{"name":791,"type":687,"required":321,"description":792},"choices.index","候选序号。",{"name":794,"type":714,"required":321,"description":795},"choices.message","助手消息。",{"name":797,"type":699,"required":321,"description":798},"choices.message.content","生成的文本内容；仅工具调用时可为空。",{"name":800,"type":699,"required":25,"description":801},"choices.message.reasoning_content","思考过程内容（支持思考模式的模型返回）。",{"name":803,"type":804,"required":321,"description":216},"choices.message.role","string (assistant | tool)",{"name":806,"type":710,"required":25,"description":807},"choices.message.tool_calls","模型发起的工具调用。",{"name":809,"type":714,"required":321,"description":216},"choices.message.tool_calls.function",{"name":811,"type":699,"required":321,"description":723},"choices.message.tool_calls.id",{"name":813,"type":726,"required":321,"description":216},"choices.message.tool_calls.type",{"name":815,"type":687,"required":25,"description":816},"created","创建时间（Unix 秒）。",{"name":818,"type":699,"required":321,"description":819},"id","请求 ID。",{"name":728,"type":699,"required":25,"description":821},"实际使用的模型名。",{"name":714,"type":699,"required":25,"description":823},"对象类型（如 chat.completion）。",{"name":825,"type":826,"required":25,"description":827},"usage","Usage","Token 用量统计；兼容入口可能透传厂商扩展字段。",{"name":829,"type":687,"required":321,"description":830},"usage.completion_tokens","输出 token 数。",{"name":832,"type":687,"required":321,"description":833},"usage.prompt_tokens","输入 token 数。",{"name":835,"type":687,"required":321,"description":836},"usage.total_tokens","总 token 数。",{"status":838,"description":839,"contentType":682,"type":840,"fields":841},"default","Volcengine 兼容错误。","VolcengineError",[842],{"name":843,"type":844,"required":25,"description":216},"error","FreeFormObject"]