Introduction

Multimodal

Process images, audio, and video through the gateway.

Multimodal

Process images, audio, and video through the gateway. All providers support multimodal inputs via the same API.

Vision (Image Understanding)

Send images to models that support vision:

curl https://viprouter.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o-mini",
    "messages": [{
      "role": "user",
      "content": [
        {"type": "text", "text": "What is in this image?"},
        {"type": "image_url", "image_url": {"url": "https://example.com/image.jpg"}}
      ]
    }]
  }'

Image Generation

Generate images using DALL-E or other providers:

curl https://viprouter.com/v1/images/generations \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/dall-e-3",
    "prompt": "A sunset over mountains",
    "n": 1,
    "size": "1024x1024"
  }'

Text-to-Speech

Convert text to audio:

curl https://viprouter.com/v1/audio/speech \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/tts-1",
    "input": "Hello, world!",
    "voice": "alloy"
  }' --output speech.mp3

Speech-to-Text

Transcribe audio to text:

curl https://viprouter.com/v1/audio/transcriptions \
  -F "file=@audio.mp3" \
  -F "model=openai/whisper-1"

Supported Modalities

ModalityProvidersEndpoints
VisionOpenAI, Anthropic, Google/v1/chat/completions
Image GenOpenAI, Stability/v1/images/generations
TTSOpenAI, ElevenLabs/v1/audio/speech
STTOpenAI/v1/audio/transcriptions
VideoReplicate/v1/videos

Next Steps