Skip to main content

Image Upload

Multimodal Models Only: Image processing requires models with vision capabilities. Currently, Kimi K3, Qwen3-VL 30B, and Gemma 4 31B support image inputs. Other models (Llama, GPT-OSS) are text-only and cannot process images.
See the vision models and chat models pages for complete model specifications and multimodal capabilities.

How It Works

Image processing works through the chat/completions endpoint using base64-encoded images. Images are sent as data URLs in the message content alongside your text prompt.

Converting Images to Base64

There are several ways to convert your images to base64 format:

API Usage

Best Practices

  1. Image Size: For optimal performance, resize large images before processing (recommended max: 4096x4096)
  2. Base64 Encoding: Ensure proper base64 encoding and include the correct MIME type in the data URL
  3. Multiple Images: You can include multiple images in a single chat completion by adding multiple image_url objects to the content array
  4. Compression: Consider compressing large images to reduce payload size and improve response times