Multimodal

Examples for image/audio/video processing patterns.

ExampleDescription
Audio Input OutputSend a WAV recording to gpt-audio and save the model's spoken reply to tmp/result.wav with write_audio_to_file().
Audio Sentiment AnalysisAnalyze speaker sentiment in a recorded conversation with Gemini, then ask a follow-up question answered from SQLite-backed session history.
Audio StreamingStream pcm16 audio from gpt-audio and write the chunks to a WAV file while printing the transcript.
Audio to TextTranscribe an MP3 conversation with Gemini, labeling each speaker in the output.
Image To AudioConvert image descriptions to audio output.
Image To ImageTransform images using agent-driven processing.
Image To Structured OutputGenerate a fictional movie script inspired by an image and check its parsed output.
Image To TextPass a local sample.jpg to GPT-5.2 with OpenAIResponses and print a three-sentence story about the image.
Media Input For ToolExample showing how tools can access media (images, videos, audio, files) passed to the agent.
Video CaptionGenerate captions from video content.