Skip to main content
Multimodal input structure depends on the protocol and model. Query model parameters first to confirm supported input types, image count, size, format, and delivery method.

OpenAI-compatible image example

This is a common OpenAI-compatible structure. Anthropic and Gemini use different content blocks; do not copy request bodies across protocols directly.

URL, Base64, and file references

Input preprocessing

  • Remove EXIF, location, and unnecessary personal information.
  • Scale oversized images to the resolution required by your application.
  • Verify MIME type matches the actual file type.
  • Prepare test samples for scanned documents, tables, and screenshots separately.
  • Do not log full Base64 or temporary signed URLs.

Common errors

Next: Model selection, Structured output, Image generation, Request reliability.