跳转到主要内容
ARouter 支持多模态输入和输出——您可以在文字消息旁边发送图像、PDF 和音频,并以图像或语音音频作为输出接收。

支持的模态

模态方向备注
文字输入 + 输出所有模型
图像(URL / base64)输入视觉模型 — JPEG、PNG、GIF、WebP
PDF(base64)输入Anthropic Claude、Google Gemini
音频(base64)输入多模态音频模型
图像生成输出DALL-E 3、Flux、Stable Diffusion
音频输出(TTS / 语音)输出TTS 模型、音频对话模型
# 支持图像输入的模型
GET /v1/models?supported_parameters=vision
# 输出图像的模型
GET /v1/models?output_modalities=image
# 输出音频的模型
GET /v1/models?output_modalities=audio

图像

使用图像 URL

{
  "model": "openai/gpt-5.4",
  "messages": [{
    "role": "user",
    "content": [
      {"type": "text", "text": "What's in this image?"},
      {"type": "image_url", "image_url": {"url": "https://example.com/image.jpg"}}
    ]
  }]
}

图像细节级别

描述
auto(默认)提供商根据图像大小决定
low更快、更便宜 — 85 个 token,调整为 512×512
high全分辨率 — 对图像进行分块,消耗更多 token

模型兼容性

模型图像 URL图像 Base64PDF音频输入
openai/gpt-5.4
anthropic/claude-sonnet-4.6
google/gemini-2.5-flash
google/gemini-2.5-pro

其他模态

  • 音频 — 语音转文字、文字转语音和音频对话模型
  • 图像生成 — 从文字提示生成图像
图像 token 计入提示词 token 限制。使用 detail: "high" 的大型高分辨率图像可能比文字消耗多得多的 token。