胜算云Router文档
胜算云Router
胜算云Router
    • 快速入门
    • Quick start
    • 模型路由
    • model routing
    • 联网搜索
    • Online search
    • 工具和函数调用
    • Tool and function calling
    • 常见问题
    • 错误处理
    • 使用条款
    • 隐私政策
    • 付费充值协议
    • cherry studio和chat box配置指南
    • 数据安全协议和分析
    • MCP安装
    • Roo code配置
    • 胜算云Router开放平台服务协议
    • MCP installing
    • 如何在KiloSSY中使用胜算云Router
    • API文档
      • API 错误代码说明
      • 聊天补全
        POST
      • 文本向量化
        POST
      • 多模态向量化
        POST
      • 图像生成
        POST
      • 文本分词
        POST
      • 文本重排序
        POST

    Quick start


    Shengsuanyun Router provides a unified API that allows access to multiple AI models through a single endpoint, while automatically handling fallbacks and selecting the most cost-effective options. Taking the DeepSeek API as an example, it uses an OpenAI-compatible API format. By modifying configurations, you can use the OpenAI SDK to access the DeepSeek API or leverage software compatible with the OpenAI API. Relevant configurations are shown in Table 1.
    PARAMVALUE
    base_urlhttps://router.shengsuanyun.com/api/v1
    api_keyhttps://router.shengsuanyun.com
    model_namedeepseek/deepseek-r1
    Table 1

    Installing and Using Cline (Chinese SSY), Roo Code (Chinese SSY), and Kilo Chinese SSY in VS Code to Call Shengsuan Cloud API#

    You can search for and install the Cline plugin in VS Code Extensions, as shown below.
    image-20250325171420312.png
    1.
    Click the Extensions button in VS Code.
    2.
    Enter "cline" in the search bar.
    3.
    Click the Install button below the Cline plugin.
    4.
    The Cline window will appear on the right, showing the installation progress. Once installed, the Cline icon will be displayed.
    image-20250325184625411.png
    image-20250325172032176.png
    5.
    Click the Cline icon to open the configuration window. You can choose between Plan mode (predicts future states to generate optimal strategies/paths) and Act mode (executes determined actions in real-time interaction). Using Act mode as an example, configure Shengsuan Cloud Router in Cline:
    image-20250403183927777.png
    6.
    Select OpenAI Compatible from the API Provider dropdown.
    7.
    Enter the Shengsuan Cloud Router base URL: https://router.shengsuanyun.com/api/v1.
    8.
    Obtain the API key here: Shengsuan Cloud Router.
    9.
    Enter the Model ID, e.g., deepseek/deepseek-r1.
    10.
    Click MODEL CONFIGURATION to open the settings panel.
    11.
    For the deepseek-r1 model, check Enable R1 messages format; for others, skip this step.
    12.
    Enter the model’s context length in Context Window Size.
    13.
    Enter the maximum output tokens in Max Output Tokens.
    14.
    Enter the input token price (per 1M tokens) in Input Price/1M tokens.
    15.
    Enter the output token price (per 1M tokens) in Output Price/1M tokens.
    16.
    Set Temperature (controls output randomness: higher = more diverse, lower = more deterministic).
    17.
    Add custom instructions to constrain output format/content (e.g., "You are an expert web scraping programmer").
    18.
    Click Done to complete configuration.
    19.
    The interface below will appear, ready to execute tasks with your prompts:
    image-20250407105314118.png
    All model parameters can be viewed at https://router.shengsuanyun.com/model.

    Code Examples#

    The following demonstrates how to call the DeepSeek-R1 model using various methods. Click tabs to view examples in different languages/frameworks.

    Python#

    Node.js#

    Shell#

    修改于 2025-05-29 03:32:04
    上一页
    快速入门
    下一页
    模型路由
    Built with