8.0
热点
AI SCORE
工具产品2026-10-16 08:00
Vercel网关接入Glimpse视觉推理模型
Vercel Blog#视觉推理#视频理解#Vercel
Editor brief · 编辑速览
Glimpse已接入Vercel AI Gateway,支持图像与视频推理,可回看局部画面、跟踪跨帧对象并分析空间关系。开发者可使用模型标识elorian/glimpse调用,AI SDK 7支持以文件部分传入视频。
Elorian 的 Glimpse 现已在 AI Gateway 上线。这款视觉推理模型支持输入图像和视频,能够在物体运动过程中持续追踪,理解空间关系,并将动作与其产生的物理后果联系起来。
Glimpse 在处理任务时可以回看视觉证据:放大查看细节、重新查看一小段视频,或跨帧追踪同一特征。这让模型能够支持科学图表分析、视频描述、视觉计数和机器人数据标注等用例。
例如,检查火车的运动情况,判断它是否正在减速;在摄像机移动过程中持续区分不同物体;以及在机器人视频中标注已完成的动作。
使用 elorian/glimpse 作为模型名称:
1import { streamText } from 'ai';2
3const result = streamText({4 model: 'elorian/glimpse',5 messages: [{6 role: 'user',7 content: [8 { type: 'text', text: 'Describe this image in one sentence.' },9 {10 type: 'file',11 mediaType: 'image/jpeg',12 data: new URL('https://elorian.ai/assets/blog/glimpse/open-pliers.jpg'),13 },14 ],15 }],16 maxOutputTokens: 4096,17 reasoning: 'low'18});19
20for await (const text of result.textStream) {21 process.stdout.write(text);22}
使用 AI SDK 7 时,可以将视频作为文件部分发送。请将占位 URL 替换为你的视频的公开 HTTPS URL 或签名 HTTPS URL:
1import { streamText } from 'ai';2
3const result = streamText({4 model: 'elorian/glimpse',5 maxOutputTokens: 4096,6 messages: [{7 role: 'user',8 content: [9 { type: 'text', text: 'Describe the visible scene in at most five words. Do not use code or search.' },10 {11 type: 'file',12 data: new URL('https://example.com/your-video.mp4'),13 mediaType: 'video/mp4',14 },15 ],16 }],17 reasoning: 'low',18 providerOptions: { elorian: { video_fps: 1 } }19});20
21for await (const text of result.textStream) {22 process.stdout.write(text);23}
要在 Claude Code、Codex、Cursor 等工具中配置 AI Gateway,请安装最新版 Vercel CLI,然后运行设置命令:
npx vercel ai-gateway setup
欢迎在模型 playground 中试用 Glimpse。
AI Gateway 提供统一的 API,用于调用模型、跟踪用量和费用,以及配置重试、故障转移和性能优化,从而实现高于模型提供商自身的服务可用性。它还内置了自定义报表、Zero Data Retention 支持、API key 预算、路由规则等功能。
AI Gateway 按模型提供商的价格收费,不加价,也不收取推理平台费,Bring Your Own Key(BYOK)请求同样如此。