Siliconflow - Api Reference
Pages: 45
创建语音转文本请求
URL: llms-txt#创建语音转文本请求
Source: https://docs.siliconflow.cn/cn/api-reference/audio/create-audio-transcriptions
post /audio/transcriptions Creates an audio transcription.
创建文本转语音请求
URL: llms-txt#创建文本转语音请求
Source: https://docs.siliconflow.cn/cn/api-reference/audio/create-speech
post /audio/speech Generate audio from input text. The data generated by the interface is the binary data of the audio, which requires the user to handle it themselves. Reference:https://docs.siliconflow.cn/capabilities/text-to-speech#5
删除参考音频
URL: llms-txt#删除参考音频
Source: https://docs.siliconflow.cn/cn/api-reference/audio/delete-voice
post /audio/voice/deletions Delete user-defined voice style
上传参考音频
URL: llms-txt#上传参考音频
Source: https://docs.siliconflow.cn/cn/api-reference/audio/upload-voice
post /uploads/audio/voice Upload user-provided voice style, which can be in base64 encoding or file format. Refer to (https://docs.siliconflow.cn/capabilities/text-to-speech#2-2)
参考音频列表获取
URL: llms-txt#参考音频列表获取
Source: https://docs.siliconflow.cn/cn/api-reference/audio/voice-list
get /audio/voice/list Get list of user-defined voice styles
取消batch任务
URL: llms-txt#取消batch任务
Source: https://docs.siliconflow.cn/cn/api-reference/batch/cancel-batch
post /batches/{batch_id}/cancel This endpoint cancels a batch identified by its unique ID.
创建batch任务
URL: llms-txt#创建batch任务
Source: https://docs.siliconflow.cn/cn/api-reference/batch/create-batch
post /batches Upload files
获取batch任务详情
URL: llms-txt#获取batch任务详情
Source: https://docs.siliconflow.cn/cn/api-reference/batch/get-batch
get /batches/{batch_id} Retrieves a batch.
获取batch任务列表
URL: llms-txt#获取batch任务列表
Source: https://docs.siliconflow.cn/cn/api-reference/batch/get-batch-list
get /batches List your organization's batches.
获取文件列表
URL: llms-txt#获取文件列表
Source: https://docs.siliconflow.cn/cn/api-reference/batch/get-file-list
get /files Returns a list of files.
上传文件
URL: llms-txt#上传文件
Source: https://docs.siliconflow.cn/cn/api-reference/batch/upload-file
post /files Upload files
创建对话请求(OpenAI)
URL: llms-txt#创建对话请求(openai)
Source: https://docs.siliconflow.cn/cn/api-reference/chat-completions/chat-completions
post /chat/completions Creates a model response for the given chat conversation.
创建对话请求(Anthropic)
URL: llms-txt#创建对话请求(anthropic)
Source: https://docs.siliconflow.cn/cn/api-reference/chat-completions/messages
post /messages Creates a model response for the given chat conversation.
创建嵌入请求
URL: llms-txt#创建嵌入请求
Source: https://docs.siliconflow.cn/cn/api-reference/embeddings/create-embeddings
post /embeddings Creates an embedding vector representing the input text.
创建图片生成请求
URL: llms-txt#创建图片生成请求
Source: https://docs.siliconflow.cn/cn/api-reference/images/images-generations
post /images/generations Creates an image response for the given prompt. The URL for the generated image is valid for one hour. Please make sure to download and store it promptly to avoid any issues due to URL expiration.
获取用户模型列表
URL: llms-txt#获取用户模型列表
Source: https://docs.siliconflow.cn/cn/api-reference/models/get-model-list
get /models Retrieve models information.
创建重排序请求
URL: llms-txt#创建重排序请求
Source: https://docs.siliconflow.cn/cn/api-reference/rerank/create-rerank
post /rerank Creates a rerank request.
获取用户账户信息
URL: llms-txt#获取用户账户信息
Source: https://docs.siliconflow.cn/cn/api-reference/userinfo/get-user-info
get /user/info Get user information including balance and status
获取视频生成链接请求
URL: llms-txt#获取视频生成链接请求
Source: https://docs.siliconflow.cn/cn/api-reference/videos/get_videos_status
post /video/status Get the user-generated video. The URL for the generated video is valid for one hour. Please make sure to download and store it promptly to avoid any issues due to URL expiration.
创建视频生成请求
URL: llms-txt#创建视频生成请求
Source: https://docs.siliconflow.cn/cn/api-reference/videos/videos_submit
post /video/submit Generate a video through the input prompt. This API returns the user's current request ID. The user needs to poll the status interface to get the specific video link. The generated result is valid for 10 minutes, so please retrieve the video link promptly.
记得填写您在步骤2中获取的 API Key
URL: llms-txt#记得填写您在步骤2中获取的-api-key
RERANK_PROXY_SILICONFLOW_PROXY_API_KEY={your-siliconflow-api-key}
AstrBot
URL: llms-txt#astrbot
Contents:
- 部署并配置 AstrBot
- 通过 Docker 部署
- 访问 AstrBot WebUI
- 配置对话模型
- 在线聊天测试(可选)
- 接入消息平台(以飞书为例)
- 创建飞书机器人
- 配置 AstrBot
- 设置回调和权限
- 创建版本
Source: https://docs.siliconflow.cn/cn/usercases/use-siliconcloud-in-astrbot
AstrBot 是一个开源的一站式 Agent 聊天机器人平台及开发框架。支持将大模型能力接入 QQ、飞书、钉钉、Slack、Telegram、Discord 等多种主流消息平台上,提供开箱即用的 RAG、Agent、MCP 等功能,并拥有丰富的 API 接口,以方便进行二次开发和集成。AstrBot 拥有强大的社区和丰富的插件生态。
请确保你的环境上已经安装了 Docker 和 Git。
如果您的网络环境在中国大陆境内,上述命令将无法正常拉取。您可能需要修改 compose.yml 文件,将其中的
image: soulter/astrbot:latest替换为image: m.daocloud.io/docker.io/soulter/astrbot:latest。
默认账户和密码均为 astrbot,登录后会提示修改默认密码。
在硅基流动 API Keys 页面创建一个新的 API Key,留存备用。
在硅基流动模型页面选择需要使用的模型,留存模型名称备用。
进入 AstrBot WebUI,点击左栏 服务提供商 -> 新增提供商 -> 选择 硅基流动。
粘贴上面创建和选择的 API Key 和 模型名称,点击保存,完成创建。您可以点击下方 服务提供商可用性 的 刷新 按钮测试配置是否成功。
您可在 AstrBot WebUI 左栏 聊天 页面来测试您配置的模型。
此处以飞书为例。您可前往 AstrBot 文档 -> 部署 -> 部署消息平台 查看其他消息平台的接入方式。
前往 开发者后台 ,创建企业自建应用。
点击凭证与基础信息,获取 app_id 和 app_secret。
- 进入 AstrBot 的管理面板
- 点击左边栏
机器人 - 然后在右边的界面中,点击
+ 创建机器人 - 选择
lark(飞书)
- ID: 随意填写,用于区分不同的消息平台实例。
- 启用: 勾选。
- app_id: 获取的 app_id
- app_secret: 获取的 app_secret
- 飞书机器人的名字
如果您正在用国际版飞书,请将 domain 设置为 https://open.larksuite.com。
在下方的 配置文件 中,点击 选择配置文件 右边的 ↗️ 箭头按钮。
在呼出的配置页面中,点击默认聊天模型右边的选择提供商按钮,选择刚刚创建的硅基流动的提供商,点击右下角的保存按钮。保存成功后关闭该页面。
接下来,点击事件与回调,使用长连接接收事件,点击保存。如果上一步没有成功启动,那么这里将无法保存。
点击添加事件,消息与群组,下拉找到 接收消息,添加。
接下来,点击权限管理,点击开通权限,输入 im:message:send,im:message,im:message:send_as_bot。添加筛选到的权限。
再次输入 im:resource:upload,im:resource 开通上传图片相关的权限。
填写版本号,更新说明,可见范围后点击保存,确认发布。
进入飞书 APP(网页版飞书无法添加机器人),点进群聊,点击右上角按钮->群机器人->添加机器人。
搜索刚刚创建的机器人的名字。比如教程创建了 AstrBot 机器人:
在群内发送测试消息 hi,机器人将做出响应。
您可以前往 AstrBot 文档 查看更多功能和配置。
Examples:
Example 1 (unknown):
> 如果您的网络环境在中国大陆境内,上述命令将无法正常拉取。您可能需要修改 compose.yml 文件,将其中的 `image: soulter/astrbot:latest` 替换为 `image: m.daocloud.io/docker.io/soulter/astrbot:latest`。
### 访问 AstrBot WebUI
Chat2Graph
URL: llms-txt#chat2graph
Contents:
- 关于 Chat2Graph
- 获取 API Key
- 部署 Chat2Graph
- 下载 Chat2Graph
- 准备执行环境
- 构建 Chat2Graph
- 配置 SiliconFlow 模型
- 启动 Chat2Graph
- 使用 Chat2Graph
- 注册图数据库
Source: https://docs.siliconflow.cn/cn/usercases/use-siliconcloud-in-chat2graph
Chat2Graph 是一个图原生的智能体系统(Graph Native Agentic System),通过利用图数据结构在关系建模、可解释性等符号主义的天然优势,对智能体的推理、规划、记忆、知识、工具协作等关键能力进行增强,同时借助智能体技术推进图数据库智能化,降低用图门槛,加速内容生成,实现与图对话。做到图计算技术与人工智能技术的深度融合。
- 打开 SiliconFlow 官网 并注册账号(如果注册过,直接登录即可)。
- 完成注册后,打开 API密钥 ,创建新的 API Key,点击密钥进行复制,以备后续使用。
准备符合要求的 Python 和 NodeJS 版本。
- Python: 推荐Python == 3.10。
- NodeJS: 推荐NodeJS >= v16。
您可以使用 conda 等工具来管理您的 Python 环境:
配置 SiliconFlow 模型
当看到如下日志时,表示 Chat2Graph 已成功启动:
你可以在浏览器访问 http://localhost:5010/ 使用 Chat2Graph。
提前注册图数据库实例,可以体验完整的 Chat2Graph 的「与图对话」功能。当前支持 Neo4j 和 TuGraph 图数据库。
Chat2Graph 提供了清晰简洁的 SDK API,让你轻松定制智能体系统。
仿写 chat2graph.yml 文件,一键初始化智能体:
Examples:
Example 1 (unknown):
### 准备执行环境
准备符合要求的 Python 和 NodeJS 版本。
* **Python**: 推荐[Python == 3.10](https://www.python.org/downloads)。
* **NodeJS**: 推荐[NodeJS >= v16](https://nodejs.org/en/download)。
您可以使用 `conda` 等工具来管理您的 Python 环境:
Example 2 (unknown):
### 构建 Chat2Graph
一键构建 Chat2Graph:
Example 3 (unknown):
### 配置 SiliconFlow 模型
准备 `.env` 配置文件:
Example 4 (unknown):
填写 SiliconFlow 模型配置:
Chatbox
URL: llms-txt#chatbox
Contents:
- 1 关于 Chatbox
- 2 安装使用 Chatbox
- 3 在 Chatbox 中使用硅基流动模型
- 3.1 配置硅基流动 API 密钥
- 3.2 在 Chatbox 中配置
- 3.3 开始聊天
- 3.4 使用技巧
- 4 参考资料
Source: https://docs.siliconflow.cn/cn/usercases/use-siliconcloud-in-chatbox
Chatbox 是一个流行的大语言模型的全平台聊天客户端,特点是功能强大、安装简单。你可以用它接入各种大语言模型,然后在任何设备(电脑、手机、网页)上和 AI 聊天。
Chatbox 不仅提供简单好用的 AI 聊天功能,还提供了一系列强大功能:
- Artifact 预览:在 Chatbox 中你可以预览 AI 生成代码的实际效果,比如让 AI 帮你做一个网页、贪吃蛇游戏,然后在 Chatbox 中直接运行。
- 图表制作:让 AI 绘制思维导图、流程图、统计图表。
- 文档理解和图形视觉:可以向 AI 发送文档或者图片。
- 网页解析与识别:可以向 AI 发送链接,讨论网页内容等。
浏览器访问 Chatbox 官网下载安装包。
Chatbox 支持所有的主流操作系统,包括 Windows、MacOS 和 Linux,手机系统支持 iOS 和 Android。下载安装包后,在系统中直接安装即可。或者也可以访问和使用 Chatbox 的网页版本。
3 在 Chatbox 中使用硅基流动模型
3.1 配置硅基流动 API 密钥
访问 API 密钥新建或复制已有密钥。
3.2 在 Chatbox 中配置
在模型提供方界面选择 SiliconFlow。
输入个人的 SiliconFlow API 密钥。
按照上面步骤,基本上已经配置成功了,简单聊天测试一下。
在结尾这里在顺带介绍一些 Chatbox 的使用技巧。
3.4.1 利用 Chatbox 的图表能力,在聊天中生成可视化图表
Chatbox 的“做图表”助手会生成各种图表,在聊天中可以更方便地让你理解一些数据。
注意:为了更好的效果,需要选择更聪明更强大的模型。模型能力将直接决定图表的效果。
3.4.2 利用 Chatbox 的 Artifact 预览功能,查看 AI 生成代码的运行效果
Chatbox 的 Artifact 预览功能,则可以让你直接预览 AI 生成前端代码的实际运行效果。
注意:为了更好的效果,需要选择更聪明更强大的模型。模型能力将直接决定生成代码的效果。
除了这些技巧外,在 Chatbox 简单易用的外表下,还隐藏着非常多强大的功能,有很多值得探索的地方。
ChatHub
URL: llms-txt#chathub
Contents:
- 关于 ChatHub
- 安装 ChatHub
- 在ChatHub中使用SiliconFlow模型
- 在 ChatHub 中进行多模型对比
Source: https://docs.siliconflow.cn/cn/usercases/use-siliconcloud-in-chathub
ChatHub 是一个流行的大语言模型聚合插件,特点是可以同时和多个模型聊天,方便对比回答。ChatHub 在全球拥有数十万活跃用户。
浏览器打开 ChatHub 官网,点击“新增至Chrome”按钮安装 ChatHub 浏览器插件:
安装后,将自动打开 ChatHub 设置页面.
在ChatHub中使用SiliconFlow模型
1、在 ChatHub 设置中找到“自定义机器人”模块,点击“添加”按钮
…(truncated)