跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://docs.anyfast.ai/llms.txt

Use this file to discover all available pages before exploring further.

DeepSeek V4 Flash 通过 Anyfast 以 OpenAI 兼容接口提供服务。支持思考模式、函数调用和 JSON 模式。

核心能力

  • OpenAI 兼容 — 可直接替换 OpenAI SDK,无需修改其他代码
  • 思考模式 — 支持可配置推理强度的深度思考
  • 函数调用 — 原生支持工具和函数调用
  • JSON 模式 — 通过 response_format 实现结构化输出
  • 长上下文 — 支持大文档处理和多轮对话
  • 流式输出 — 通过 SSE 实现实时 Token 流式传输
  • 提示缓存 — 自动缓存,返回命中/未命中统计

快速示例

curl https://www.anyfast.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-flash",
    "messages": [
      { "role": "user", "content": "用简单的语言解释量子纠缠。" }
    ]
  }'

参数说明

参数类型必填说明
modelstring固定为 deepseek-v4-flash
messagesarray{ role, content } 对象数组,支持 systemuserassistanttool 角色
thinkingobject启用/禁用思考:{"type": "enabled"}{"type": "disabled"}。可选 reasoning_efforthighmaxlowmedium
max_tokensinteger最大生成 Token 数
temperaturefloat02,控制随机性,默认 1
streamboolean开启 SSE 流式传输,默认 false
stream_optionsobject{"include_usage": true} 在流式结束时返回用量统计
top_pfloat核采样阈值,默认 1
stopstring / array触发停止生成的序列(最多 16 个)
response_formatobject{"type": "json_object"} 启用 JSON 模式
toolsarray函数调用工具列表
tool_choicestring / object工具选择控制:noneautorequired 或指定函数
user_idstring自定义用户 ID,用于内容安全处理和 KVCache 缓存隔离

API 参考

查看 DeepSeek V4 Flash 的交互式 API Playground。