跳转到主要内容
厂商: DeepSeek Model ID: deepseek-v3-2 能力: 64K context · tool use · streaming · structured output 价格: 按 token,mid 档(实时价格 DeepSeek V3.2 是最后一代 3 系列模型,靠超越其价位档的代码生成获得 口碑。对于已经针对该版本做过验证的代码密集工作流,它仍是一个不错的 生产模型。新工作建议选 DeepSeek V4 Pro 或更快的 V4 Flash

请求

curl https://llm.bytespike.ai/v1/chat/completions \
  -H "Authorization: Bearer $BYTESPIKE_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "model": "deepseek-v3-2",
    "messages": [{"role": "user", "content": "Write a Python implementation of trie."}]
  }'

Body 参数

字段类型是否必填默认说明
modelstringdeepseek-v3-2
messagesarray
max_tokensintegermodel max最大:8192。
temperaturenumber1.0
toolsarray支持 function calling。
response_formatobjectJSON mode。
streambooleanfalseSSE 流式。

响应

{
  "id": "chatcmpl-…",
  "object": "chat.completion",
  "model": "deepseek-v3-2",
  "choices": [{"index": 0, "message": {"role": "assistant", "content": "class Trie..."}, "finish_reason": "stop"}],
  "usage": {"prompt_tokens": 28, "completion_tokens": 412, "total_tokens": 440}
}

代码示例

curl https://llm.bytespike.ai/v1/chat/completions \
  -H "Authorization: Bearer $BYTESPIKE_API_KEY" \
  -H "content-type: application/json" \
  -d '{"model": "deepseek-v3-2", "messages": [{"role": "user", "content": "Implement trie in Python."}]}'

流式 + 缓存

"stream": true 走 SSE。稳定前缀自动 prompt caching。

错误

Code触发是否计费
400 / 401 / 402 / 422 / 429标准
5xx上游否(自动重试)

何时使用

限制

限制
Context window64K tokens
Max output8192 tokens
支持 tool use
支持 vision
支持 streaming
支持 prompt caching自动