Qwen Vision
Qwen vision requests use the OpenAI-compatible Chat Completions API. Put text, images, and videos in the same messages[].content array, and call Cubicspaces /v1/chat/completions.
Endpoint
POST /v1/chat/completionsSupported Models
| Model | Input | Output | Best for |
|---|---|---|---|
qwen3.6-plus | Text, images, video | Text | Image and video understanding, text extraction, complex visual reasoning |
Actual model availability depends on account permissions and platform configuration. qwen3.6-plus supports long-context multimodal requests and is suitable for multi-image, multi-page document, long-video, and visual reasoning workflows.
Image And Video Understanding
Single Image
curl https://cubicspaces.cloud/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.6-plus",
"messages": [
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://example.com/product.jpg"
}
},
{
"type": "text",
"text": "Describe the main subject, scene, and likely use of this image."
}
]
}
]
}'Multi-Image Comparison
curl https://cubicspaces.cloud/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.6-plus",
"messages": [
{
"role": "user",
"content": [
{ "type": "image_url", "image_url": { "url": "https://example.com/before.jpg" } },
{ "type": "image_url", "image_url": { "url": "https://example.com/after.jpg" } },
{ "type": "text", "text": "Compare the two images and list the main changes." }
]
}
]
}'Video Understanding
You can pass a publicly reachable video URL or a list of extracted frame image URLs. For long videos, streaming is recommended so the client does not wait on a single long response.
curl https://cubicspaces.cloud/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.6-plus",
"messages": [
{
"role": "user",
"content": [
{
"type": "video",
"video": "https://example.com/demo.mp4"
},
{
"type": "text",
"text": "Summarize the key events in chronological order. Return a JSON array with start_time, end_time, and event."
}
]
}
],
"stream": true,
"stream_options": {
"include_usage": true
}
}'If your client has already extracted frames, pass a frame list:
{
"type": "video",
"video": [
"https://example.com/frame-001.jpg",
"https://example.com/frame-002.jpg",
"https://example.com/frame-003.jpg"
],
"fps": 2
}Text Extraction
Use qwen3.6-plus to extract text or structured fields from images, screenshots, receipts, and tables. For machine-readable output, explicitly request JSON and define how missing fields should be represented.
curl https://cubicspaces.cloud/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.6-plus",
"messages": [
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://example.com/invoice.jpg"
}
},
{
"type": "text",
"text": "Extract invoice_code, invoice_number, date, amount, and buyer_name from the image. Return JSON. Use null for fields that cannot be recognized."
}
]
}
],
"enable_thinking": false,
"response_format": {
"type": "json_object"
}
}'Visual Reasoning
qwen3.6-plus supports visual reasoning. For complex questions, chart analysis, object relationship reasoning, or video event attribution, use streaming and control reasoning output with enable_thinking.
curl https://cubicspaces.cloud/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.6-plus",
"messages": [
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://example.com/chart.png"
}
},
{
"type": "text",
"text": "Analyze the trend in this chart, explain the likely cause, and give a conclusion."
}
]
}
],
"enable_thinking": true,
"stream": true
}'In streaming responses, read normal answer text from choices[0].delta.content. If the model returns reasoning, read it from choices[0].delta.reasoning_content.
SDK Examples
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://cubicspaces.cloud/v1"
)
response = client.chat.completions.create(
model="qwen3.6-plus",
messages=[
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://example.com/screenshot.png"
},
},
{
"type": "text",
"text": "Recognize the text in this screenshot and summarize it as bullet points."
},
],
}
],
extra_body={
"enable_thinking": False
},
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: "YOUR_API_KEY",
baseURL: "https://cubicspaces.cloud/v1"
});
const response = await client.chat.completions.create({
model: "qwen3.6-plus",
messages: [
{
role: "user",
content: [
{
type: "image_url",
image_url: {
url: "https://example.com/screenshot.png"
}
},
{
type: "text",
text: "Recognize the text in this screenshot and summarize it as bullet points."
}
]
}
],
enable_thinking: false
});
console.log(response.choices[0].message.content);Notes
- Image and video URLs must be directly reachable by the platform service. Do not use URLs that require login, redirect to HTML pages, or block server-side downloads.
- Larger images and longer videos consume more input context. In production, compress images, trim videos, or extract key frames based on the task.
enable_thinkingis not a standard OpenAI parameter. With the OpenAI Python SDK, pass it throughextra_body; with direct HTTP requests, place it at the top level of the JSON body.- For JSON output, prefer disabling thinking mode and state field names, types, and missing-value rules in the prompt.