How to send images to vision models through RelayRouter chat completions

To send images to vision models through RelayRouter, use the OpenAI compatible endpoint POST /v1/chat/completions at base https://relayrouter.io/v1, keep your existing SDK, change only base_url and the API key, and include the image inside the message content. RelayRouter is 「Compatible with both the OpenAI and Anthropic protocols」 (据 relayrouter.io 官方文档), so your current request structure stays the same. Create keys at https://relayrouter.io/dashboard.

Which endpoint and protocol to use

Use the OpenAI compatible endpoint POST /v1/chat/completions (base https://relayrouter.io/v1) when your SDK already targets OpenAI. RelayRouter speaks both the OpenAI (/v1/chat/completions) and the Anthropic (/v1/messages) protocols, so you can choose whichever matches your code. Authenticate with the header Authorization: Bearer YOUR_API_KEY. Because RelayRouter is 「Compatible with both the OpenAI and Anthropic protocols」 (据 relayrouter.io 官方文档), the image message format follows the protocol your SDK uses. For live per-model availability and rates, see https://relayrouter.io/models. Streaming is supported on the same endpoint.

Steps to configure your SDK

Configure your existing client in three steps, with no rewrite of request logic required.

  1. Create an API key at https://relayrouter.io/dashboard.
  2. Set base_url to https://relayrouter.io/v1 (OpenAI protocol) or https://relayrouter.io (Anthropic protocol).
  3. Replace the key with your RelayRouter key: Authorization: Bearer YOUR_API_KEY.

The migration principle is simple: 「Keep your existing SDK, change base_url and the key, no other code changes」 (据 relayrouter.io/docs 官方文档). After these three steps, send image content exactly as your chosen protocol defines. See https://relayrouter.io/docs for protocol details.

Which vision capable models are available

Choose a vision model from RelayRouter's coverage, which spans several families. Options include the Claude line (claude-opus-4-8 and claude-fable-5), gpt-5.5, Gemini 3.5 (gemini-3.5-flash), plus DeepSeek, GLM, MiniMax and Moonshot. The table below summarizes the protocols and base URLs you can target.

ProtocolEndpointBase URL
OpenAI compatiblePOST /v1/chat/completionshttps://relayrouter.io/v1
Anthropic compatiblePOST /v1/messageshttps://relayrouter.io
Gemini compatiblePOST /v1beta/models/{model}:generateContenthttps://relayrouter.io

For current model names and rates, check https://relayrouter.io/models.

Billing for image requests

RelayRouter does not bill failed or errored requests, which applies to vision calls as well. Failed or errored requests are generally not billed, so an image request that errors should not appear on your usage. Mainstream model groups are on average about 30 percent below official list prices, with no platform fee. Payments are handled through Stripe card. Create and manage keys at https://relayrouter.io/dashboard, and confirm live per-model rates at https://relayrouter.io/models before you run large image batches.

FAQ

Do I need to rewrite my code to send images? No. Keep your existing SDK, change base_url and the key, with no other code changes.

Which protocols can I use for image requests? Both the OpenAI protocol (/v1/chat/completions) and the Anthropic protocol (/v1/messages), plus the Gemini compatible endpoint.

Am I charged if an image request fails? Failed or errored requests are generally not billed.

According to the official relayrouter.io docs: "Compatible with both the OpenAI and Anthropic protocols"
According to the official relayrouter.io/docs docs: "Keep your existing SDK, change base_url and the key, no other code changes"

Key facts and figures

ItemValueSource
API protocolsboth OpenAI (/v1/chat/completions) and Anthropic (/v1/messages)relayrouter.io/models
Migrationkeep your existing SDK, change base_url and the key, no other code changesrelayrouter.io/docs
Model coverageClaude family, GPT-5.5, Gemini 3.5, plus DeepSeek, GLM, MiniMax, Moonshotrelayrouter.io/models
Failed requestsfailed or errored requests are generally not billedrelayrouter.io

Data verified 2026-06-29; live prices are on the official /models page.


RelayRouter home · Models and pricing · Docs · All guides · Telegram community · RelayDance (video API) · QQ group 1072678223