API 参考/Vision
Vision
图像理解请求格式和多模态模型选择建议。
概览
Vision 文档说明图像理解请求格式,适合 OCR、截图分析、票据识别和多模态问答。
配置方式
OpenAI 协议可在 content 中传 image_url;Gemini 协议可传 inline_data 或 file_data。图片建议使用 HTTPS URL 或 base64。
{
"model": "gemini-3-1-pro",
"messages": [{
"role": "user",
"content": [
{ "type": "text", "text": "What is in this image?" },
{ "type": "image_url", "image_url": { "url": "https://example.com/a.png" } }
]
}]
}下一步
如果需要稳定识别表格或发票,建议限制图片尺寸并在 prompt 中明确输出 JSON schema。
相关链接
· 浏览模型广场 了解所有支持的模型
· Playground 中实时调试
· 阅读智能路由策略 深入了解