architecture.input_modalities of the model in /v1/models first: a part the model cannot read fails with 400 unsupported_modality.
Images
image_url.url takes an https URL or a data URI. detail is low, high or auto.
Files and PDFs
Send the file as a data URI infile_data, or as an https link in file_url, a NagaAI extension. NagaAI has no Files API, so a file_id fails with 400 file_id_unsupported.
Python
Audio
input_audio.data is base64. A data: prefix fails with 400. format is wav, mp3, aiff, aac, ogg, flac, m4a, pcm16 or pcm24; the official API accepts only the first two.
Python
Images in the answer
Models that draw return images inmessage.images, a list of {"type": "image_url", "image_url": {"url": "..."}} entries next to content. The url is a data: URI or an https link, so handle both. When you continue the conversation, send the assistant message back with its images so the model can edit the picture instead of drawing a new one.