接口调用文本模型
DeepSeek
深度求索的 DeepSeek 系列:可用型号、调用示例与计费方式。
深度求索的 DeepSeek 系列,推理模型会先输出思考过程,再给出回答。
- 接口:
POST https://modelrouter.club/v1/chat/completions(OpenAI 格式),字段说明见 创建对话 - 在线试用需要登录,按自己的余额扣费
可用型号
型号会随渠道调整增减,以 模型广场 和 GET /v1/models 为准。
调用示例
curl https://modelrouter.club/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-flash",
"messages": [
{ "role": "user", "content": "用三句话介绍一下你自己" }
],
"max_tokens": 2048
}'from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://modelrouter.club/v1",
)
response = client.chat.completions.create(
model="deepseek-flash",
messages=[{"role": "user", "content": "用三句话介绍一下你自己"}],
max_tokens=2048,
)
print(response.choices[0].message.content)换成其他型号,只需替换 model。需要逐字输出时加 "stream": true,见 流式输出。
计费
- 按输入、输出、缓存命中 token 分别计价。
- 分高峰和空闲两个时段:工作日 9:00–12:00、14:00–18:00(北京时间)为高峰,其余时间(含周末)为空闲,空闲时段单价是高峰的一半。
- 按请求发起时间判断时段。
实时单价见 模型广场,每次调用的实际用量与扣费见 使用日志。
说明
max_tokens包含思考过程。推理型号设得太小时,额度可能全部用于思考,content为空。- 本站文本模型目前不支持在对话中识别图片。