Multimodal
Beyond text, HyperFlowSI 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.
A request body can be at most 25 MB, base64 included (base64 adds about a third to a file’s size). A larger request is refused with 413; send a link or a smaller file.
Which models take what
Each model’s page on Models shows the inputs it takes in its Modalities row. The same list is in modalities.input from the model’s catalog entry, with the / in the id written as %2F. Among its other fields:
The input names are text, image, file (PDF), audio and video. Every chat model takes text. Images, PDFs, audio and video depend on the model. HyperFlowSI 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:
Only the part types in the table above are accepted. 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 generation is priced per image or by tokens, and video per second; see their pages.
Next: Image inputs: send pictures to a chat model.