CHAT COMPLETIONS
使用熟悉的 OpenAI 兼容结构。
统一接口降低适配成本,但不同模型仍可能忽略、限制或重新解释部分参数。生产前应对目标模型逐项验证。
端点
POST
https://wmai7.io/v1/chat/completions常用请求字段
| 字段 | 类型 | 说明 |
|---|---|---|
model | string | 模型目录中的精确模型 ID,必填。 |
messages | array | 按顺序传入 system、user、assistant 消息。 |
stream | boolean | 是否通过 SSE 返回增量内容。 |
temperature | number | 随机性参数;部分推理模型可能忽略。 |
max_tokens | number | 最大输出量;部分模型使用兼容映射。 |
最小请求体
{
"model": "deepseek-v4-flash",
"messages": [
{"role": "system", "content": "回答要简洁。"},
{"role": "user", "content": "解释什么是 API 网关。"}
],
"stream": false
}