Orq MCP is live: Use natural language to interrogate traces, spot regressions, and experiment your way to optimal AI configurations. Available in Claude Desktop, Claude Code, Cursor, and more. Start now →
Send images, PDFs, and audio to LLMs, and generate images and speech through the AI Gateway. One unified OpenAI-compatible API for all modalities.
Use Cases
Analyzing uploaded images or PDFs without a separate preprocessing pipeline.
Generating images from text prompts through the same API and key.
Transcribing audio recordings or voice inputs for downstream processing.
Extracting structured data from scanned documents, receipts, or screenshots.
The AI Gateway supports all input and output modalities through a single OpenAI-compatible API. All endpoints share the same base URL, authentication, and AI Gateway features: fallbacks, caching, load balancing, and retries.
Analyze images alongside text using POST /v3/router/responses or POST /v3/router/chat/completions. Pass images as public URLs or base64-encoded data in the message content array.
curl -X POST https://api.orq.ai/v3/router/responses \ -H "Authorization: Bearer $ORQ_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "openai/gpt-4o", "input": [ { "role": "user", "content": [ {"type": "input_text", "text": "What is in this image? Describe in detail."}, {"type": "input_image", "image_url": "https://images.pexels.com/photos/45201/kitty-cat-kitten-pet-45201.jpeg"} ] } ] }'
curl -X POST https://api.orq.ai/v3/router/chat/completions \ -H "Authorization: Bearer $ORQ_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "openai/gpt-4o", "messages": [ { "role": "user", "content": [ {"type": "text", "text": "What is in this image? Describe in detail."}, {"type": "image_url", "image_url": {"url": "https://example.com/image.jpg"}} ] } ] }'
import OpenAI from "openai";import fs from "fs";const client = new OpenAI({ apiKey: process.env.ORQ_API_KEY, baseURL: "https://api.orq.ai/v3/router",});const base64Image = fs.readFileSync("chart.png").toString("base64");const response = await client.responses.create({ model: "openai/gpt-4o", input: [ { role: "user", content: [ { type: "input_text", text: "Analyze this chart and extract the key data points" }, { type: "input_image", image_url: `data:image/png;base64,${base64Image}` }, ], }, ],});console.log(response.output_text);
from openai import OpenAIimport base64import osclient = OpenAI( api_key=os.environ.get("ORQ_API_KEY"), base_url="https://api.orq.ai/v3/router",)def encode_image(image_path): with open(image_path, "rb") as image_file: return base64.b64encode(image_file.read()).decode("utf-8")base64_image = encode_image("chart.png")response = client.responses.create( model="openai/gpt-4o", input=[ { "role": "user", "content": [ {"type": "input_text", "text": "Analyze this chart and extract the key data points"}, {"type": "input_image", "image_url": f"data:image/png;base64,{base64_image}"}, ], } ],)print(response.output_text)
import OpenAI from "openai";import fs from "fs";const client = new OpenAI({ apiKey: process.env.ORQ_API_KEY, baseURL: "https://api.orq.ai/v3/router",});const base64Image = fs.readFileSync("chart.png").toString("base64");const response = await client.chat.completions.create({ model: "openai/gpt-4o", messages: [ { role: "user", content: [ { type: "text", text: "Analyze this chart and extract the key data points" }, { type: "image_url", image_url: { url: `data:image/png;base64,${base64Image}` } }, ], }, ],});console.log(response.choices[0].message.content);
Convert text to audio using POST /v3/router/audio/speech.
Provider
Model
OpenAI
openai/tts-1
OpenAI
openai/tts-1-hd
OpenAI
openai/gpt-4o-mini-tts
ElevenLabs
elevenlabs/eleven_multilingual_v2
ElevenLabs
elevenlabs/eleven_turbo_v2_5
ElevenLabs
elevenlabs/eleven_flash_v2_5
ElevenLabs
elevenlabs/eleven_flash_v2
Google AI
google-ai/gemini-2.5-flash-preview-tts
Google AI
google-ai/gemini-2.5-pro-preview-tts
Vertex AI
google/gemini-2.5-flash-preview-tts
Vertex AI
google/gemini-2.5-pro-preview-tts
For the full and up-to-date list of TTS models, see Text-to-Speech models on the Supported Models page.
import OpenAI from "openai";import fs from "fs";const client = new OpenAI({ apiKey: process.env.ORQ_API_KEY, baseURL: "https://api.orq.ai/v3/router",});const response = await client.audio.speech.create({ model: "openai/tts-1", voice: "alloy", input: "Hello, welcome to Acme Corp. How can I help you today?", response_format: "mp3",});const buffer = Buffer.from(await response.arrayBuffer());fs.writeFileSync("output.mp3", buffer);
import osfrom openai import OpenAIclient = OpenAI( api_key=os.environ["ORQ_API_KEY"], base_url="https://api.orq.ai/v3/router",)with client.audio.speech.with_streaming_response.create( model="openai/tts-1", voice="alloy", input="Hello, welcome to Acme Corp. How can I help you today?", response_format="mp3",) as response: response.stream_to_file("output.mp3")
Streaming: Process audio chunks in real time as they arrive, useful for low-latency playback pipelines.
import OpenAI from "openai";const client = new OpenAI({ apiKey: process.env.ORQ_API_KEY, baseURL: "https://api.orq.ai/v3/router",});const processAudioChunk = (chunk: Uint8Array) => {};const response = await client.audio.speech.create({ model: "openai/tts-1", voice: "alloy", input: "Hello, welcome to Acme Corp. How can I help you today?", response_format: "pcm",});const reader = response.body!.getReader();while (true) { const { done, value } = await reader.read(); if (done) break; processAudioChunk(value);}
from openai import OpenAIimport osclient = OpenAI( api_key=os.environ.get("ORQ_API_KEY"), base_url="https://api.orq.ai/v3/router",)def process_audio_chunk(chunk: bytes) -> None: passwith client.audio.speech.with_streaming_response.create( model="openai/tts-1", voice="alloy", input="Hello, welcome to Acme Corp. How can I help you today?", response_format="pcm",) as response: for chunk in response.iter_bytes(chunk_size=1024): process_audio_chunk(chunk)
Parameters:
Parameter
Description
model
Model ID
input
Text to synthesize. Maximum length varies by provider