Visual Understanding
Models with vision support (such as gpt-5.6, fable-5, omni-flash) can directly understand images in a conversation:
write content as a multimodal array, mixing text and image_url.
Request Example
curl https://api.4allapi.com/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AIPROXY_KEY" \ -d '{ "model": "omni-flash", "messages": [{ "role": "user", "content": [ {"type": "text", "text": "What is the amount and invoice date of this invoice?"}, {"type": "image_url", "image_url": {"url": "https://example.com/invoice.jpg"}} ] }] }'Images can also be embedded using a base64 Data URL (suitable for intranet images):
{"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,/9j/4AAQ..."}}Typical Scenarios
- Structured information extraction from receipts / tables / screenshots (use
response_formatto force JSON output); - Tagging and compliance review for e-commerce product images;
- Converting UI screenshots to code, interpreting chart data;
- Comparing multiple images: place multiple
image_urlentries sequentially in thecontentarray.
Notes
- Images are billed by token equivalence based on resolution; for very large images, it is recommended to compress them to within 2048px first;
- The URL method requires the image to be publicly accessible; for intranet or temporary images, use base64;
- For video understanding, use a model that supports video input and refer to its model documentation.