> ## Documentation Index
> Fetch the complete documentation index at: https://docs.token.poryf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DeepSeek

> 深度求索的 DeepSeek 系列：可用型号、调用示例与计费方式。

深度求索的 DeepSeek 系列，推理模型会先输出思考过程，再给出回答。

* 接口：`POST https://token.poryf.com/v1/chat/completions`（OpenAI 格式），字段说明见 [创建对话](/api/chat)
* 在线试用需要登录，按自己的余额扣费

## 可用型号

| 模型 ID | 说明 | 链接 |
| - | - | - |
| `deepseek-v4-pro` | 旗舰版 | [价格](https://token.poryf.com/pricing/deepseek-v4-pro) · [试用](https://token.poryf.com/model-guide/deepseek-v4-pro) |
| `deepseek-flash` | 轻量版，速度快、价格低 | [价格](https://token.poryf.com/pricing/deepseek-flash) · [试用](https://token.poryf.com/model-guide/deepseek-flash) |

型号会随渠道调整增减，以 [模型广场](https://token.poryf.com/pricing) 和 [GET /v1/models](/api/list-models) 为准。

## 调用示例

<CodeGroup>
  ```bash curl theme={null}
  curl https://token.poryf.com/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
    }'
  ```

  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      api_key="YOUR_API_KEY",
      base_url="https://token.poryf.com/v1",
  )

  response = client.chat.completions.create(
      model="deepseek-flash",
      messages=[{"role": "user", "content": "用三句话介绍一下你自己"}],
      max_tokens=2048,
  )
  print(response.choices[0].message.content)
  ```
</CodeGroup>

换成其他型号，只需替换 `model`。需要逐字输出时加 `"stream": true`，见 [流式输出](/streaming)。

## 计费

* 按输入、输出、缓存命中 token 分别计价。
* 分高峰和空闲两个时段：工作日 9:00–12:00、14:00–18:00（北京时间）为高峰，其余时间（含周末）为空闲，空闲时段单价是高峰的一半。
* 按请求发起时间判断时段。

实时单价见 [模型广场](https://token.poryf.com/pricing)，每次调用的实际用量与扣费见 [使用日志](https://token.poryf.com/usage-logs/common)。

<Note>
  * `max_tokens` 包含思考过程。推理型号设得太小时，额度可能全部用于思考，`content` 为空。
  * 本站文本模型目前不支持在对话中识别图片。
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.