Multimodal
Beyond text, Flow AI lets you send images, PDFs, audio and video to models that understand them, and generate images and video from a prompt. Everything goes through the same API and the same key.
Inputs
All inputs go to POST /v1/chat/completions. Instead of a string, a message’s content is a list of parts, and each part has a type:
You can mix text with several inputs, of one kind or several, in one message. How many a request can carry depends on the model.
Outputs
Chat models answer in text. Audio output, text-to-speech and speech-to-text aren’t available.
URL or base64
For public files, a URL keeps the request small and skips encoding. Use base64 for local or private files.
Which models take what
Every chat model takes text. Images, PDFs, audio and video depend on the model. Flow AI checks each part against what the model takes before anything is held: a part the model can’t read is refused with a 400 that names the model and the content, for example:
Nothing is charged for a refused request.
Billing
The model turns every input into input tokens, and you pay for them at its input price. How many tokens an image, a PDF page, a second of audio or a second of video takes depends on the model, so check usage.prompt_tokens on a first request. Image and video generation are priced per image and per second; see their pages.
Next: Image Inputs — send pictures to a chat model.