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.mp3Speech-to-Text
Transcribe audio to text:
curl https://viprouter.com/v1/audio/transcriptions \
-F "file=@audio.mp3" \
-F "model=openai/whisper-1"Supported Modalities
| Modality | Providers | Endpoints |
|---|---|---|
| Vision | OpenAI, Anthropic, Google | /v1/chat/completions |
| Image Gen | OpenAI, Stability | /v1/images/generations |
| TTS | OpenAI, ElevenLabs | /v1/audio/speech |
| STT | OpenAI | /v1/audio/transcriptions |
| Video | Replicate | /v1/videos |
Next Steps
- Images API - Full image generation docs
- Audio API - Full audio docs
