Multimodal input

MeshTok exposes 69 models that understand more than text — images, audio, video, and PDFs all flow through the same OpenAI-compatible /v1/chat/completions endpoint. Use the content array to mix text with any modality in a single message.

Modality coverage

🖼️ Image & vision →
69 models. URL or base64. OCR, charts, screenshots, photos.
🔊 Audio input
13 models. Transcribe, summarize, or query audio. Gemini, Qwen-Audio.
🎥 Video input
12 models. Frame analysis, action recognition. Gemini leads.
📄 PDF & documents
Vision models parse PDFs page-by-page as images. Claude & Gemini excel.

The content array pattern

All modalities use the same OpenAI content array. A message is either a plain string (text-only) or an array of typed parts. Mix freely:

from openai import OpenAI
client = OpenAI(base_url="https://meshtok.com/v1", api_key="sk-...")

resp = client.chat.completions.create(
    model="google/gemini-2.5-pro",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "Here are three files. Summarize each."},
            {"type": "image_url", "image_url": {"url": "https://.../chart.png"}},
            {"type": "input_audio", "input_audio": {"data": "<base64>", "format": "mp3"}},
        ],
    }],
)

Audio input (transcription & understanding)

13 models accept audio directly in chat — useful for meeting transcription, voice queries, and spoken-language analysis. Use the input_audio content type with base64-encoded audio.

import base64

with open("meeting.mp3", "rb") as f:
    audio_b64 = base64.b64encode(f.read()).decode()

resp = client.chat.completions.create(
    model="google/gemini-2.5-pro",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "Transcribe and extract action items."},
            {"type": "input_audio", "input_audio": {
                "data": audio_b64, "format": "mp3"
            }},
        ],
    }],
)

For pure speech-to-text at scale, audio-capable models are cheaper than full chat models.

Video input

12 models (mostly Gemini family) accept video as a sequence of frames. Upload the video file and the model samples frames automatically. Best for security review, sports analysis, and UI walkthroughs.

Cost notes

→ Detailed vision guide → Structured outputs Browse multimodal models