Skip to content

Route multimodal image and text payloads dynamically

Send pure-text requests to ultra-cheap text models and only invoke vision-capable models when payloads contain image attachments.

Copy the prompt and paste it into the AI assistant you already use.

Checklist for smart multimodal routing

  1. 01

    Inspect attachment presence first

    Branch purely on whether images or URLs are present rather than running vision models by default.

  2. 02

    Validate supported image formats

    Reject unsupported files or dead image URLs cleanly at the gateway before invoking inference.

  3. 03

    Cap image count and resolution

    Set sensible maximum attachments per call and low/auto detail hints to prevent huge vision token costs.

  4. 04

    Merge OCR and text prompts

    Give the vision branch clear instructions to inspect screenshots alongside accompanying user notes.

Common questions

How much cost does conditional vision routing save?

If most incoming payloads lack attachments, routing text-only calls to compact text models avoids unnecessary vision token overhead.

Do clients receive the exact same JSON schema either way?

Yes. Both the text-only branch and the vision branch enforce your single endpoint output schema.

Can callers pass base64 strings or public signed URLs?

Endpoints support both signed HTTPS image URLs and size-bounded base64 image payloads.