passdrill
AI & LLM Engineering · Building with LLM APIs · Card 017/024 easy

A developer wants to send an image alongside a text question to a model through OpenAI's Responses API. According to OpenAI's current documentation, how is the image included in the request?

  1. the request's `input` array includes a content item with `type` set to `input_image`, whose `image_url` field can be either a fully qualified URL pointing to an image or a base64-encoded data URL, placed alongside a separate `input_text` item carrying the text portion of the same message
  2. images can only be referenced by a fully qualified URL; base64-encoded image data placed directly in the request body is rejected by the endpoint
  3. images must be attached as raw binary data outside the JSON request body, since the `input` array can only ever contain plain text strings
  4. images are supplied through the `messages` array using a content type of `image_url` only, with no `input_image` type and no base64 option available
Next card → Shuffle