直连通道
官方直连链路,适合需要原生体验与完整上下文的请求。
| 输入 | 输出 | 缓存命中 |
|---|---|---|
| 0.29/M | 0.88/M | 0.06/M |
GLM-4.5VGLM-4.5V 系列是基于 MOE 架构的旗舰视觉理解模型。拥有 106B 总参数量和 12B 激活参数,全面升级自 GLM-4.1V-Thinking,达到开源多模态模型 SOTA 水平。结合创新 RLCS 强化学习技术,在视频理解、图片问答、OCR、文档解析等任务表现优异,并在前端网页 Coding、Grounding、空间推理等复杂场景实现显著提升。支持 thinking / 非 thinking 模式灵活切换,兼顾推理深度与效率。
同一模型能力,多条服务通道;按延迟、稳定性与成本灵活选择。
价格单位:$ / 1M tokensprovider 字段,例如 "provider": { "channel": "direct" }。可选 direct / stable / economical;不传则使用默认通道。官方直连链路,适合需要原生体验与完整上下文的请求。
| 输入 | 输出 | 缓存命中 |
|---|---|---|
| 0.29/M | 0.88/M | 0.06/M |
GLM-4.5Vhttps://api.haijingai.com/v2/"provider": { "channel": "direct" }海鲸AI 兼容 OpenAI 接口协议,可直接使用 OpenAI SDK 或 HTTP 请求接入,默认开启流式输出。
curl https://api.haijingai.com/v2/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <API_KEY>" \
-d '{
"model": "GLM-4.5V",
"messages": [
{"role": "system", "content": "你是一个有帮助的助手。"},
{"role": "user", "content": "你好!"}
],
"provider": { "channel": "direct" },
"stream": true
}'
# provider 为可选字段,删除该行即使用默认通道from openai import OpenAI
client = OpenAI(
base_url="https://api.haijingai.com/v2",
api_key="<API_KEY>",
)
stream = client.chat.completions.create(
model="GLM-4.5V",
messages=[
{"role": "system", "content": "你是一个有帮助的助手。"},
{"role": "user", "content": "你好!"},
],
stream=True,
# 可选:指定服务通道,不传则使用默认通道
extra_body={"provider": {"channel": "direct"}},
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)import OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'https://api.haijingai.com/v2',
apiKey: '<API_KEY>',
})
const stream = await client.chat.completions.create({
model: 'GLM-4.5V',
messages: [
{ role: 'system', content: '你是一个有帮助的助手。' },
{ role: 'user', content: '你好!' },
],
stream: true,
// 可选:指定服务通道,不传则使用默认通道
// @ts-expect-error provider 为海鲸AI 扩展字段,不在 OpenAI SDK 类型定义内
provider: { channel: 'direct' },
})
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content ?? '')
}