Use vision-capable models to inspect screenshots, classify photos, run OCR-style extraction, and answer visual questions.
POST /v1/chat/completions
Authorization: Bearer YOUR_SECRET_KEY
Content-Type: application/json
{
"type": "image_url",
"image_url": {
"url": "https://example.com/image.jpg"
}
}
You can include multiple image blocks in one request. Put your text instruction first, then image blocks.
messages[].content[]image_url entriesBase64 example:
data:image/jpeg;base64,<BASE64_DATA>
image/pngimage/jpegimage/webpimage/gifcurl -X POST "https://api.lunos.tech/v1/chat/completions" \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-2.5-flash",
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "Extract all visible product names and prices." },
{ "type": "image_url", "image_url": { "url": "https://example.com/menu.png" } }
]
}
]
}'
import requests
response = requests.post(
"https://api.lunos.tech/v1/chat/completions",
headers={
"Authorization": "Bearer YOUR_SECRET_KEY",
"Content-Type": "application/json",
},
json={
"model": "google/gemini-2.5-flash",
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "Extract all visible product names and prices."},
{"type": "image_url", "image_url": {"url": "https://example.com/menu.png"}},
],
}
],
},
)
print(response.json())
const response = await fetch("https://api.lunos.tech/v1/chat/completions", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_SECRET_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "google/gemini-2.5-flash",
messages: [
{
role: "user",
content: [
{ type: "text", text: "Extract all visible product names and prices." },
{ type: "image_url", image_url: { url: "https://example.com/menu.png" } },
],
},
],
}),
});
console.log(await response.json());
curl -X POST "https://api.lunos.tech/v1/chat/completions" \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-2.5-flash",
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "Compare these two images and explain key differences." },
{ "type": "image_url", "image_url": { "url": "https://example.com/before.jpg" } },
{ "type": "image_url", "image_url": { "url": "https://example.com/after.jpg" } }
]
}
]
}'
import requests
payload = {
"model": "google/gemini-2.5-flash",
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "Compare these two images and explain key differences."},
{"type": "image_url", "image_url": {"url": "https://example.com/before.jpg"}},
{"type": "image_url", "image_url": {"url": "https://example.com/after.jpg"}},
],
}
],
}
response = requests.post(
"https://api.lunos.tech/v1/chat/completions",
headers={
"Authorization": "Bearer YOUR_SECRET_KEY",
"Content-Type": "application/json",
},
json=payload,
)
print(response.json())
const payload = {
model: "google/gemini-2.5-flash",
messages: [
{
role: "user",
content: [
{ type: "text", text: "Compare these two images and explain key differences." },
{ type: "image_url", image_url: { url: "https://example.com/before.jpg" } },
{ type: "image_url", image_url: { url: "https://example.com/after.jpg" } },
],
},
],
};
const response = await fetch("https://api.lunos.tech/v1/chat/completions", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_SECRET_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
console.log(await response.json());
Lunos accepts both image_url and imageUrl keys from clients, but the canonical format is:
{ "type": "image_url", "image_url": { "url": "..." } }
image in inputModalitiesNo headings found on this page.
