[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"docs-nav-en":3,"docs-en-getting-started\u002Fquick-start":180},[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":10,"body":182,"description":1028,"extension":1029,"meta":1030,"navigation":537,"path":11,"rawbody":1031,"requiredFlags":1032,"seo":1033,"stem":12,"__hash__":1034},"docs_en\u002F1.getting-started\u002F1.quick-start.md",{"type":183,"value":184,"toc":1016},"minimark",[185,189,193,200,205,208,238,245,289,293,296,301,327,333,339,342,371,375,390,394,413,417,857,861,868,925,939,943,946,1004,1012],[186,187,10],"h1",{"id":188},"your-first-silvamux-api-call",[190,191,192],"p",{},"This guide starts from your current workspace and project, helps you create an API key, confirm a model call name, and send your first OpenAI Chat Completions compatible request.",[194,195,197],"alert",{"type":196},"info",[190,198,199],{},"SilvaMux supports the OpenAI Chat Completions compatible format. If you already have OpenAI SDK code, you only need to change the base URL and API key.",[201,202,204],"h2",{"id":203},"create-a-project","Create a Project",[190,206,207],{},"Projects isolate different businesses, environments, and API usage. Prepare at least one project before creating an API key.",[209,210,211,220,227,230,235],"ol",{},[212,213,214,215,219],"li",{},"Sign in to the console and open ",[216,217,218],"strong",{},"Projects"," in the sidebar.",[212,221,222,223,226],{},"Click ",[216,224,225],{},"New Project",".",[212,228,229],{},"Fill in the project name; including the business and environment is recommended, for example \"personal-assistant-staging\".",[212,231,222,232,226],{},[216,233,234],{},"Create",[212,236,237],{},"Confirm the name, project ID, and creation time in the project list.",[190,239,240],{},[241,242],"img",{"alt":243,"src":244},"New project","https:\u002F\u002Fsilvamux-docs.tingyutech.com\u002Fdeveloper-docs\u002Fproject-create.png",[246,247,248,261],"table",{},[249,250,251],"thead",{},[252,253,254,258],"tr",{},[255,256,257],"th",{},"Scenario",[255,259,260],{},"Recommendation",[262,263,264,273,281],"tbody",{},[252,265,266,270],{},[267,268,269],"td",{},"Staging and production",[267,271,272],{},"Create separate projects",[252,274,275,278],{},[267,276,277],{},"Multiple independent apps",[267,279,280],{},"One project per app",[252,282,283,286],{},[267,284,285],{},"Temporary experiments",[267,287,288],{},"Use a dedicated test project and revoke its keys when done",[201,290,292],{"id":291},"get-an-api-key","Get an API Key",[190,294,295],{},"API keys are used for model calls; AK\u002FSK credentials are used by compatible APIs that require Access Key ID and Secret Key signing. The two must not be mixed.",[297,298,300],"h3",{"id":299},"creating-an-api-key","Creating an API Key",[209,302,303,306,316,319],{},[212,304,305],{},"Make sure your current workspace has at least one project.",[212,307,308,309,312,313,226],{},"Open the ",[216,310,311],{},"API Keys"," page and click ",[216,314,315],{},"Generate API Key",[212,317,318],{},"Fill in the name, then choose the bound project and API version.",[212,320,321,322,326],{},"Copy the full ",[323,324,325],"code",{},"sk_live_"," key immediately after creation. The full value is shown only once.",[190,328,329],{},[241,330],{"alt":331,"src":332},"Create API Key","https:\u002F\u002Fsilvamux-docs.tingyutech.com\u002Fdeveloper-docs\u002Fapi-key-create.png",[190,334,335],{},[241,336],{"alt":337,"src":338},"API Key created","https:\u002F\u002Fsilvamux-docs.tingyutech.com\u002Fdeveloper-docs\u002Fapi-key-created.png",[190,340,341],{},"Store the key as an environment variable:",[343,344,349],"pre",{"className":345,"code":346,"language":347,"meta":348,"style":348},"language-bash shiki shiki-themes github-light github-dark","export SILVAMUX_API_KEY=\"sk_live_YOUR_API_KEY\"\n","bash","",[323,350,351],{"__ignoreMap":348},[352,353,356,360,364,367],"span",{"class":354,"line":355},"line",1,[352,357,359],{"class":358},"szBVR","export",[352,361,363],{"class":362},"sVt8B"," SILVAMUX_API_KEY",[352,365,366],{"class":358},"=",[352,368,370],{"class":369},"sZZnC","\"sk_live_YOUR_API_KEY\"\n",[297,372,374],{"id":373},"security-rules","Security Rules",[376,377,378,381,384,387],"ul",{},[212,379,380],{},"Never put keys in browser code, logs, screenshots, or public repositories.",[212,382,383],{},"Use different keys for testing and production.",[212,385,386],{},"If a key leaks, revoke the old key first, then update your service configuration.",[212,388,389],{},"A full key cannot be recovered after it is hidden — create a new one if needed.",[201,391,393],{"id":392},"first-request","First Request",[395,396,397],"blockquote",{},[190,398,399,406,407,412],{},[216,400,401,402,405],{},"About the ",[323,403,404],{},"model"," field",": use the call name shown on the ",[408,409,411],"a",{"href":410},"\u002Fen\u002Fmodels","Model Plaza"," detail page, preferring the stable alias. Do not assemble it from display names yourself.",[297,414,416],{"id":415},"call-examples","Call Examples",[418,419,420,508,597,673],"code-tabs",{},[421,422,424],"code-tab",{"label":423},"cURL",[343,425,427],{"className":345,"code":426,"language":347,"meta":348,"style":348},"curl https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Authorization: Bearer $SILVAMUX_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"model\": \"minimax-m2.5\",\n    \"messages\": [\n      {\"role\": \"user\", \"content\": \"Introduce yourself in one sentence\"}\n    ]\n  }'\n",[323,428,429,442,459,469,478,484,490,496,502],{"__ignoreMap":348},[352,430,431,435,438],{"class":354,"line":355},[352,432,434],{"class":433},"sScJk","curl",[352,436,437],{"class":369}," https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv1\u002Fchat\u002Fcompletions",[352,439,441],{"class":440},"sj4cs"," \\\n",[352,443,445,448,451,454,457],{"class":354,"line":444},2,[352,446,447],{"class":440},"  -H",[352,449,450],{"class":369}," \"Authorization: Bearer ",[352,452,453],{"class":362},"$SILVAMUX_API_KEY",[352,455,456],{"class":369},"\"",[352,458,441],{"class":440},[352,460,462,464,467],{"class":354,"line":461},3,[352,463,447],{"class":440},[352,465,466],{"class":369}," \"Content-Type: application\u002Fjson\"",[352,468,441],{"class":440},[352,470,472,475],{"class":354,"line":471},4,[352,473,474],{"class":440},"  -d",[352,476,477],{"class":369}," '{\n",[352,479,481],{"class":354,"line":480},5,[352,482,483],{"class":369},"    \"model\": \"minimax-m2.5\",\n",[352,485,487],{"class":354,"line":486},6,[352,488,489],{"class":369},"    \"messages\": [\n",[352,491,493],{"class":354,"line":492},7,[352,494,495],{"class":369},"      {\"role\": \"user\", \"content\": \"Introduce yourself in one sentence\"}\n",[352,497,499],{"class":354,"line":498},8,[352,500,501],{"class":369},"    ]\n",[352,503,505],{"class":354,"line":504},9,[352,506,507],{"class":369},"  }'\n",[421,509,511],{"label":510},"Python",[343,512,516],{"className":513,"code":514,"language":515,"meta":348,"style":348},"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\u002Fv1\",\n)\n\nresponse = client.chat.completions.create(\n    model=\"minimax-m2.5\",\n    messages=[{\"role\": \"user\", \"content\": \"Introduce yourself in one sentence\"}],\n)\n\nprint(response.choices[0].message.content)\n","python",[323,517,518,523,528,533,539,544,549,554,559,563,569,575,581,586,591],{"__ignoreMap":348},[352,519,520],{"class":354,"line":355},[352,521,522],{},"# pip install openai\n",[352,524,525],{"class":354,"line":444},[352,526,527],{},"import os\n",[352,529,530],{"class":354,"line":461},[352,531,532],{},"from openai import OpenAI\n",[352,534,535],{"class":354,"line":471},[352,536,538],{"emptyLinePlaceholder":537},true,"\n",[352,540,541],{"class":354,"line":480},[352,542,543],{},"client = OpenAI(\n",[352,545,546],{"class":354,"line":486},[352,547,548],{},"    api_key=os.environ[\"SILVAMUX_API_KEY\"],\n",[352,550,551],{"class":354,"line":492},[352,552,553],{},"    base_url=\"https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv1\",\n",[352,555,556],{"class":354,"line":498},[352,557,558],{},")\n",[352,560,561],{"class":354,"line":504},[352,562,538],{"emptyLinePlaceholder":537},[352,564,566],{"class":354,"line":565},10,[352,567,568],{},"response = client.chat.completions.create(\n",[352,570,572],{"class":354,"line":571},11,[352,573,574],{},"    model=\"minimax-m2.5\",\n",[352,576,578],{"class":354,"line":577},12,[352,579,580],{},"    messages=[{\"role\": \"user\", \"content\": \"Introduce yourself in one sentence\"}],\n",[352,582,584],{"class":354,"line":583},13,[352,585,558],{},[352,587,589],{"class":354,"line":588},14,[352,590,538],{"emptyLinePlaceholder":537},[352,592,594],{"class":354,"line":593},15,[352,595,596],{},"print(response.choices[0].message.content)\n",[421,598,600],{"label":599},"JavaScript",[343,601,605],{"className":602,"code":603,"language":604,"meta":348,"style":348},"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\u002Fv1\",\n});\n\nconst response = await client.chat.completions.create({\n  model: \"minimax-m2.5\",\n  messages: [{ role: \"user\", content: \"Introduce yourself in one sentence\" }],\n});\n\nconsole.log(response.choices[0].message.content);\n","javascript",[323,606,607,612,617,621,626,631,636,641,645,650,655,660,664,668],{"__ignoreMap":348},[352,608,609],{"class":354,"line":355},[352,610,611],{},"\u002F\u002F npm install openai\n",[352,613,614],{"class":354,"line":444},[352,615,616],{},"import OpenAI from \"openai\";\n",[352,618,619],{"class":354,"line":461},[352,620,538],{"emptyLinePlaceholder":537},[352,622,623],{"class":354,"line":471},[352,624,625],{},"const client = new OpenAI({\n",[352,627,628],{"class":354,"line":480},[352,629,630],{},"  apiKey: process.env.SILVAMUX_API_KEY,\n",[352,632,633],{"class":354,"line":486},[352,634,635],{},"  baseURL: \"https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv1\",\n",[352,637,638],{"class":354,"line":492},[352,639,640],{},"});\n",[352,642,643],{"class":354,"line":498},[352,644,538],{"emptyLinePlaceholder":537},[352,646,647],{"class":354,"line":504},[352,648,649],{},"const response = await client.chat.completions.create({\n",[352,651,652],{"class":354,"line":565},[352,653,654],{},"  model: \"minimax-m2.5\",\n",[352,656,657],{"class":354,"line":571},[352,658,659],{},"  messages: [{ role: \"user\", content: \"Introduce yourself in one sentence\" }],\n",[352,661,662],{"class":354,"line":577},[352,663,640],{},[352,665,666],{"class":354,"line":583},[352,667,538],{"emptyLinePlaceholder":537},[352,669,670],{"class":354,"line":588},[352,671,672],{},"console.log(response.choices[0].message.content);\n",[421,674,676],{"label":675},"Go",[343,677,681],{"className":678,"code":679,"language":680,"meta":348,"style":348},"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\": \"minimax-m2.5\",\n        \"messages\": [{\"role\": \"user\", \"content\": \"Introduce yourself in one sentence\"}]\n    }`)\n\n    req, err := http.NewRequest(\"POST\", \"https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv1\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",[323,682,683,688,693,697,702,707,712,717,722,727,731,735,740,745,750,755,761,766,772,778,784,790,796,802,807,813,818,823,828,834,839,845,851],{"__ignoreMap":348},[352,684,685],{"class":354,"line":355},[352,686,687],{},"\u002F\u002F Standard library only\n",[352,689,690],{"class":354,"line":444},[352,691,692],{},"package main\n",[352,694,695],{"class":354,"line":461},[352,696,538],{"emptyLinePlaceholder":537},[352,698,699],{"class":354,"line":471},[352,700,701],{},"import (\n",[352,703,704],{"class":354,"line":480},[352,705,706],{},"    \"bytes\"\n",[352,708,709],{"class":354,"line":486},[352,710,711],{},"    \"fmt\"\n",[352,713,714],{"class":354,"line":492},[352,715,716],{},"    \"io\"\n",[352,718,719],{"class":354,"line":498},[352,720,721],{},"    \"net\u002Fhttp\"\n",[352,723,724],{"class":354,"line":504},[352,725,726],{},"    \"os\"\n",[352,728,729],{"class":354,"line":565},[352,730,558],{},[352,732,733],{"class":354,"line":571},[352,734,538],{"emptyLinePlaceholder":537},[352,736,737],{"class":354,"line":577},[352,738,739],{},"func main() {\n",[352,741,742],{"class":354,"line":583},[352,743,744],{},"    payload := []byte(`{\n",[352,746,747],{"class":354,"line":588},[352,748,749],{},"        \"model\": \"minimax-m2.5\",\n",[352,751,752],{"class":354,"line":593},[352,753,754],{},"        \"messages\": [{\"role\": \"user\", \"content\": \"Introduce yourself in one sentence\"}]\n",[352,756,758],{"class":354,"line":757},16,[352,759,760],{},"    }`)\n",[352,762,764],{"class":354,"line":763},17,[352,765,538],{"emptyLinePlaceholder":537},[352,767,769],{"class":354,"line":768},18,[352,770,771],{},"    req, err := http.NewRequest(\"POST\", \"https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv1\u002Fchat\u002Fcompletions\", bytes.NewReader(payload))\n",[352,773,775],{"class":354,"line":774},19,[352,776,777],{},"    if err != nil {\n",[352,779,781],{"class":354,"line":780},20,[352,782,783],{},"        panic(err)\n",[352,785,787],{"class":354,"line":786},21,[352,788,789],{},"    }\n",[352,791,793],{"class":354,"line":792},22,[352,794,795],{},"    req.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"SILVAMUX_API_KEY\"))\n",[352,797,799],{"class":354,"line":798},23,[352,800,801],{},"    req.Header.Set(\"Content-Type\", \"application\u002Fjson\")\n",[352,803,805],{"class":354,"line":804},24,[352,806,538],{"emptyLinePlaceholder":537},[352,808,810],{"class":354,"line":809},25,[352,811,812],{},"    resp, err := http.DefaultClient.Do(req)\n",[352,814,816],{"class":354,"line":815},26,[352,817,777],{},[352,819,821],{"class":354,"line":820},27,[352,822,783],{},[352,824,826],{"class":354,"line":825},28,[352,827,789],{},[352,829,831],{"class":354,"line":830},29,[352,832,833],{},"    defer resp.Body.Close()\n",[352,835,837],{"class":354,"line":836},30,[352,838,538],{"emptyLinePlaceholder":537},[352,840,842],{"class":354,"line":841},31,[352,843,844],{},"    body, _ := io.ReadAll(resp.Body)\n",[352,846,848],{"class":354,"line":847},32,[352,849,850],{},"    fmt.Println(string(body))\n",[352,852,854],{"class":354,"line":853},33,[352,855,856],{},"}\n",[297,858,860],{"id":859},"streaming","Streaming",[190,862,863,864,867],{},"Set ",[323,865,866],{},"stream: true"," to get a streaming response (SSE):",[343,869,871],{"className":345,"code":870,"language":347,"meta":348,"style":348},"curl https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Authorization: Bearer $SILVAMUX_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"model\": \"minimax-m2.5\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Write a short poem\"}],\n    \"stream\": true\n  }'\n",[323,872,873,881,893,901,907,911,916,921],{"__ignoreMap":348},[352,874,875,877,879],{"class":354,"line":355},[352,876,434],{"class":433},[352,878,437],{"class":369},[352,880,441],{"class":440},[352,882,883,885,887,889,891],{"class":354,"line":444},[352,884,447],{"class":440},[352,886,450],{"class":369},[352,888,453],{"class":362},[352,890,456],{"class":369},[352,892,441],{"class":440},[352,894,895,897,899],{"class":354,"line":461},[352,896,447],{"class":440},[352,898,466],{"class":369},[352,900,441],{"class":440},[352,902,903,905],{"class":354,"line":471},[352,904,474],{"class":440},[352,906,477],{"class":369},[352,908,909],{"class":354,"line":480},[352,910,483],{"class":369},[352,912,913],{"class":354,"line":486},[352,914,915],{"class":369},"    \"messages\": [{\"role\": \"user\", \"content\": \"Write a short poem\"}],\n",[352,917,918],{"class":354,"line":492},[352,919,920],{"class":369},"    \"stream\": true\n",[352,922,923],{"class":354,"line":498},[352,924,507],{"class":369},[190,926,927,928,931,932,935,936,226],{},"The streaming response is Server-Sent Events: each event's ",[323,929,930],{},"data"," field carries one JSON chunk. You may eventually receive a usage chunk with an empty ",[323,933,934],{},"choices",", after which the server closes the connection. Treat the stream end as completion — do not rely solely on ",[323,937,938],{},"data: [DONE]",[297,940,942],{"id":941},"using-the-anthropic-format","Using the Anthropic Format",[190,944,945],{},"If you are more familiar with the Anthropic Messages API, SilvaMux supports it as well:",[343,947,949],{"className":345,"code":948,"language":347,"meta":348,"style":348},"curl https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv1\u002Fmessages \\\n  -H \"Authorization: Bearer $SILVAMUX_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"model\": \"minimax-m2.5\",\n    \"max_tokens\": 1024,\n    \"messages\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n  }'\n",[323,950,951,960,972,980,986,990,995,1000],{"__ignoreMap":348},[352,952,953,955,958],{"class":354,"line":355},[352,954,434],{"class":433},[352,956,957],{"class":369}," https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv1\u002Fmessages",[352,959,441],{"class":440},[352,961,962,964,966,968,970],{"class":354,"line":444},[352,963,447],{"class":440},[352,965,450],{"class":369},[352,967,453],{"class":362},[352,969,456],{"class":369},[352,971,441],{"class":440},[352,973,974,976,978],{"class":354,"line":461},[352,975,447],{"class":440},[352,977,466],{"class":369},[352,979,441],{"class":440},[352,981,982,984],{"class":354,"line":471},[352,983,474],{"class":440},[352,985,477],{"class":369},[352,987,988],{"class":354,"line":480},[352,989,483],{"class":369},[352,991,992],{"class":354,"line":486},[352,993,994],{"class":369},"    \"max_tokens\": 1024,\n",[352,996,997],{"class":354,"line":492},[352,998,999],{"class":369},"    \"messages\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n",[352,1001,1002],{"class":354,"line":498},[352,1003,507],{"class":369},[190,1005,1006,1007,1011],{},"See ",[408,1008,1010],{"href":1009},"\u002Fen\u002Fdocs\u002Fmodels\u002Fchat\u002Foverview","Text Generation Models"," for more API formats.",[1013,1014,1015],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}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);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":348,"searchDepth":444,"depth":444,"links":1017},[1018,1019,1023],{"id":203,"depth":444,"text":204},{"id":291,"depth":444,"text":292,"children":1020},[1021,1022],{"id":299,"depth":461,"text":300},{"id":373,"depth":461,"text":374},{"id":392,"depth":444,"text":393,"children":1024},[1025,1026,1027],{"id":415,"depth":461,"text":416},{"id":859,"depth":461,"text":860},{"id":941,"depth":461,"text":942},"Quick start — create a project, get an API key, make your first request, and try streaming.","md",{},"---\ntitle: Your First SilvaMux API Call\ndescription: Quick start — create a project, get an API key, make your first request, and try streaming.\n---\n\n# Your First SilvaMux API Call\n\nThis guide starts from your current workspace and project, helps you create an API key, confirm a model call name, and send your first OpenAI Chat Completions compatible request.\n\n::alert{type=\"info\"}\nSilvaMux supports the OpenAI Chat Completions compatible format. If you already have OpenAI SDK code, you only need to change the base URL and API key.\n::\n\n## Create a Project\n\nProjects isolate different businesses, environments, and API usage. Prepare at least one project before creating an API key.\n\n1. Sign in to the console and open **Projects** in the sidebar.\n2. Click **New Project**.\n3. Fill in the project name; including the business and environment is recommended, for example \"personal-assistant-staging\".\n4. Click **Create**.\n5. Confirm the name, project ID, and creation time in the project list.\n\n![New project](https:\u002F\u002Fsilvamux-docs.tingyutech.com\u002Fdeveloper-docs\u002Fproject-create.png)\n\n| Scenario | Recommendation |\n| --- | --- |\n| Staging and production | Create separate projects |\n| Multiple independent apps | One project per app |\n| Temporary experiments | Use a dedicated test project and revoke its keys when done |\n\n## Get an API Key\n\nAPI keys are used for model calls; AK\u002FSK credentials are used by compatible APIs that require Access Key ID and Secret Key signing. The two must not be mixed.\n\n### Creating an API Key\n\n1. Make sure your current workspace has at least one project.\n2. Open the **API Keys** page and click **Generate API Key**.\n3. Fill in the name, then choose the bound project and API version.\n4. Copy the full `sk_live_` key immediately after creation. The full value is shown only once.\n\n![Create API Key](https:\u002F\u002Fsilvamux-docs.tingyutech.com\u002Fdeveloper-docs\u002Fapi-key-create.png)\n\n![API Key created](https:\u002F\u002Fsilvamux-docs.tingyutech.com\u002Fdeveloper-docs\u002Fapi-key-created.png)\n\nStore the key as an environment variable:\n\n```bash\nexport SILVAMUX_API_KEY=\"sk_live_YOUR_API_KEY\"\n```\n\n### Security Rules\n\n- Never put keys in browser code, logs, screenshots, or public repositories.\n- Use different keys for testing and production.\n- If a key leaks, revoke the old key first, then update your service configuration.\n- A full key cannot be recovered after it is hidden — create a new one if needed.\n\n## First Request\n\n> **About the `model` field**: use the call name shown on the [Model Plaza](\u002Fen\u002Fmodels) detail page, preferring the stable alias. Do not assemble it from display names yourself.\n\n### Call Examples\n\n::code-tabs\n:::code-tab{label=\"cURL\"}\n```bash\ncurl https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Authorization: Bearer $SILVAMUX_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"model\": \"minimax-m2.5\",\n    \"messages\": [\n      {\"role\": \"user\", \"content\": \"Introduce yourself in one sentence\"}\n    ]\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\u002Fv1\",\n)\n\nresponse = client.chat.completions.create(\n    model=\"minimax-m2.5\",\n    messages=[{\"role\": \"user\", \"content\": \"Introduce yourself in one sentence\"}],\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\u002Fv1\",\n});\n\nconst response = await client.chat.completions.create({\n  model: \"minimax-m2.5\",\n  messages: [{ role: \"user\", content: \"Introduce yourself in one sentence\" }],\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\": \"minimax-m2.5\",\n\t\t\"messages\": [{\"role\": \"user\", \"content\": \"Introduce yourself in one sentence\"}]\n\t}`)\n\n\treq, err := http.NewRequest(\"POST\", \"https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv1\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### Streaming\n\nSet `stream: true` to get a streaming response (SSE):\n\n```bash\ncurl https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Authorization: Bearer $SILVAMUX_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"model\": \"minimax-m2.5\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Write a short poem\"}],\n    \"stream\": true\n  }'\n```\n\nThe streaming response is Server-Sent Events: each event's `data` field carries one JSON chunk. You may eventually receive a usage chunk with an empty `choices`, after which the server closes the connection. Treat the stream end as completion — do not rely solely on `data: [DONE]`.\n\n### Using the Anthropic Format\n\nIf you are more familiar with the Anthropic Messages API, SilvaMux supports it as well:\n\n```bash\ncurl https:\u002F\u002Fsilvamux.io\u002Fapi\u002Fv1\u002Fmessages \\\n  -H \"Authorization: Bearer $SILVAMUX_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"model\": \"minimax-m2.5\",\n    \"max_tokens\": 1024,\n    \"messages\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n  }'\n```\n\nSee [Text Generation Models](\u002Fen\u002Fdocs\u002Fmodels\u002Fchat\u002Foverview) for more API formats.\n",[],{"title":10,"description":1028},"dSWS-sdSrYqN1pAm37ZDTxEbDQtA58pGxPPN7NFta34"]