Vision

Send images with chat when the model advertises capabilities.vision.

With a File (SDK)

The SDK accepts input_image parts and converts them to data URLs:

const response = await client.inference.chat({
  model: "openai:gpt-4o-mini",
  messages: [
    {
      role: "user",
      content: [
        { type: "text", text: "What is in this image?" },
        { type: "input_image", file: imageFile },
      ],
    },
  ],
});

imageFile should be a browser File (or an object with type, size, and arrayBuffer()).

Limits

Default limits (exported from galliun):

Oversized or unsupported types throw before the request is sent.

Pricing

Vision requests may use vision pricing. Check response.cost and model metadata from Models / Pricing and usage.