The input parameter is flexible — it accepts a simple string, a message array, or structured multimodal content.
3. Structured Multimodal Content
The flexibility of accepting a plain string makes simple use cases trivial, while the array format provides full control for complex multi-turn or multimodal scenarios.
String for one-shot, list for everything else
If you have a single user prompt with no images and no history, the string form (input="What is 2+2?") is fine. The moment you need an image, file, multi-turn chat, or fine-grained role control, switch to the message list with typed content parts.
The typed content parts (input_text, input_image, input_file) make the multimodal shape explicit at the wire level. No more 'is this a string or a list of dicts?' guessing — the type tag tells the API exactly what to expect.