Vision & Multimodal Guide
In addition to text completions and image generation, KoboiLLM natively supports Vision Models — AI models capable of “seeing” and analyzing input images. Ideal applications include:
- Automated captioning and alt-text generation
- Document processing and simple OCR
- Product photo and screenshot inspection
- Visual Question Answering (Visual QA)
The API strictly adheres to the standard OpenAI Chat Completions specification using multimodal array content, making existing OpenAI and LiteLLM SDKs immediately compatible.
Table of Contents
- Endpoint & Authentication
- Available Vision Models
- Quick Start — Sending Image URLs
- Sending Local Images (Base64)
- Multi-Image Inputs
- Parameters (
detail&format) - Checking Model Vision Support
- Quick Spec Summary
- Tips & Best Practices
1. Endpoint & Authentication
Base URL:
https://lite.koboillm.com/v1(The alias https://api.koboillm.com/v1 is also available and identical in behavior).
Primary Endpoint: POST /v1/chat/completions — identical to standard chat completions, except that the user message content field is structured as an array containing text and image_url objects.
Authentication: Include the header `Authorization: Bearer *** Set your secret API key in your environment variables:
export LITELLM_API_KEY="sk-xxxxxx"2. Available Vision Models
The following models natively support image understanding at KoboiLLM:
| Provider | Endpoint Name | Best Used For |
|---|---|---|
| OpenAI | openai/gpt-4o-mini | Fast & budget-friendly vision — recommended default |
| OpenAI | openai/gpt-4o | High-reasoning visual analysis and complex layout reading |
| Google Gemini | gemini/gemini-2.5-flash | High-speed, low-cost multimodal processing |
| Google Gemini | gemini/gemini-2.5-pro | Comprehensive document analysis and detailed OCR |
For the live model catalog, query
/v1/modelsor check your dashboard athttps://lite.koboillm.com.
3. Quick Start — Sending Image URLs
3.1 — cURL
curl -X POST https://lite.koboillm.com/v1/chat/completions \ -H "Authorization: Bearer *** \ -H "Content-Type: application/json" \ -d '{ "model": "openai/gpt-4o-mini", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe what you see in this image in detail." }, { "type": "image_url", "image_url": { "url": "https://docs.koboillm.com/koboi_llm_logo.png" } } ] } ] }'3.2 — Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI( base_url="https://lite.koboillm.com/v1", api_key="sk-xxxxxx",)
response = client.chat.completions.create( model="openai/gpt-4o-mini", messages=[ { "role": "user", "content": [ {"type": "text", "text": "Describe what you see in this image."}, { "type": "image_url", "image_url": {"url": "https://docs.koboillm.com/koboi_llm_logo.png"}, }, ], } ],)
print(response.choices[0].message.content)4. Sending Local Images (Base64)
For local images stored on disk, encode the image to base64 and supply it as a data URL:
import base64from openai import OpenAI
client = OpenAI( base_url="https://lite.koboillm.com/v1", api_key="sk-xxxxxx",)
def encode_image(image_path): with open(image_path, "rb") as image_file: return base64.b64encode(image_file.read()).decode('utf-8')
base64_image = encode_image("document.png")
response = client.chat.completions.create( model="openai/gpt-4o-mini", messages=[ { "role": "user", "content": [ {"type": "text", "text": "Extract all text from this document image."}, { "type": "image_url", "image_url": { "url": f"data:image/png;base64,{base64_image}" }, }, ], } ],)
print(response.choices[0].message.content)