Skip to main content

Working with Multi Modal

The API supports various media types including images, audio, video and pdf.
Supported Providers: OpenAI, Bedrock, Anthropic, Google Vertex, Google GeminiSend images as part of your chat completion requests using either URLs or base64 encoding:

Using Image URLs

Using Base64 Encoded Images

Supported Providers: OpenAI, Azure OpenAI, Google Gemini, Google Vertex AI, xAIThe detail parameter in the image_url object allows you to control the resolution at which images are processed. This helps balance between response quality, latency, and cost.Supported Values: low, high, auto

Example Usage

For Google Gemini and Vertex AI providers, the detail parameter is automatically translated to the mediaResolution parameter:
  • "low"MEDIA_RESOLUTION_LOW (64 tokens)
  • "high"MEDIA_RESOLUTION_HIGH (256+ tokens with scaling)
  • "auto" or omitted → No explicit media resolution (model decides)
Supported Models: Google Gemini models (Gemini 2.0 Flash, etc.)Send audio files in supported formats (MP3, WAV, etc.). Currently supported for Google Gemini models:

Using Audio URLs

Using Base64 Encoded Audio

Supported Models: Google Gemini models (Gemini 2.0 Flash, etc.)Video processing is natively supported for Google Gemini models:

Using Video URLs

Using Base64 Encoded Video

Supported Providers: OpenAI, Bedrock, Anthropic, Google Vertex, Google GeminiPDF document processing allows models to analyze and extract information from PDF files:

Using Base64 Encoded PDF

Vision

TrueFoundry supports vision models from all integrated providers as they become available. These models can analyze and interpret images alongside text, enabling multimodal AI applications.

Using Vision Models with OpenAI SDK