curl --request POST \
--url https://mavi-backend.memories.ai/serve/api/v2/vu/chat/completions \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "qwen:qwen3-vl-plus",
"messages": [
{
"content": "<string>"
}
],
"temperature": 0.7,
"max_tokens": 1024,
"top_p": 0.9,
"frequency_penalty": 0,
"presence_penalty": 0,
"n": 1,
"stream": false,
"stop": "<string>",
"extra_body": {
"metadata": {
"enable_thinking": true,
"thinking_budget": 123,
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "<string>",
"schema": {
"type": "object",
"properties": {},
"required": [
"<string>"
]
}
}
}
}
}
}
'import requests
url = "https://mavi-backend.memories.ai/serve/api/v2/vu/chat/completions"
payload = {
"model": "qwen:qwen3-vl-plus",
"messages": [{ "content": "<string>" }],
"temperature": 0.7,
"max_tokens": 1024,
"top_p": 0.9,
"frequency_penalty": 0,
"presence_penalty": 0,
"n": 1,
"stream": False,
"stop": "<string>",
"extra_body": { "metadata": {
"enable_thinking": True,
"thinking_budget": 123,
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "<string>",
"schema": {
"type": "object",
"properties": {},
"required": ["<string>"]
}
}
}
} }
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'qwen:qwen3-vl-plus',
messages: [{content: '<string>'}],
temperature: 0.7,
max_tokens: 1024,
top_p: 0.9,
frequency_penalty: 0,
presence_penalty: 0,
n: 1,
stream: false,
stop: '<string>',
extra_body: {
metadata: {
enable_thinking: true,
thinking_budget: 123,
response_format: {
type: 'json_schema',
json_schema: {
name: '<string>',
schema: {type: 'object', properties: {}, required: ['<string>']}
}
}
}
}
})
};
fetch('https://mavi-backend.memories.ai/serve/api/v2/vu/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mavi-backend.memories.ai/serve/api/v2/vu/chat/completions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'qwen:qwen3-vl-plus',
'messages' => [
[
'content' => '<string>'
]
],
'temperature' => 0.7,
'max_tokens' => 1024,
'top_p' => 0.9,
'frequency_penalty' => 0,
'presence_penalty' => 0,
'n' => 1,
'stream' => false,
'stop' => '<string>',
'extra_body' => [
'metadata' => [
'enable_thinking' => true,
'thinking_budget' => 123,
'response_format' => [
'type' => 'json_schema',
'json_schema' => [
'name' => '<string>',
'schema' => [
'type' => 'object',
'properties' => [
],
'required' => [
'<string>'
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mavi-backend.memories.ai/serve/api/v2/vu/chat/completions"
payload := strings.NewReader("{\n \"model\": \"qwen:qwen3-vl-plus\",\n \"messages\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"temperature\": 0.7,\n \"max_tokens\": 1024,\n \"top_p\": 0.9,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"n\": 1,\n \"stream\": false,\n \"stop\": \"<string>\",\n \"extra_body\": {\n \"metadata\": {\n \"enable_thinking\": true,\n \"thinking_budget\": 123,\n \"response_format\": {\n \"type\": \"json_schema\",\n \"json_schema\": {\n \"name\": \"<string>\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {},\n \"required\": [\n \"<string>\"\n ]\n }\n }\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mavi-backend.memories.ai/serve/api/v2/vu/chat/completions")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"qwen:qwen3-vl-plus\",\n \"messages\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"temperature\": 0.7,\n \"max_tokens\": 1024,\n \"top_p\": 0.9,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"n\": 1,\n \"stream\": false,\n \"stop\": \"<string>\",\n \"extra_body\": {\n \"metadata\": {\n \"enable_thinking\": true,\n \"thinking_budget\": 123,\n \"response_format\": {\n \"type\": \"json_schema\",\n \"json_schema\": {\n \"name\": \"<string>\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {},\n \"required\": [\n \"<string>\"\n ]\n }\n }\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mavi-backend.memories.ai/serve/api/v2/vu/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"qwen:qwen3-vl-plus\",\n \"messages\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"temperature\": 0.7,\n \"max_tokens\": 1024,\n \"top_p\": 0.9,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"n\": 1,\n \"stream\": false,\n \"stop\": \"<string>\",\n \"extra_body\": {\n \"metadata\": {\n \"enable_thinking\": true,\n \"thinking_budget\": 123,\n \"response_format\": {\n \"type\": \"json_schema\",\n \"json_schema\": {\n \"name\": \"<string>\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {},\n \"required\": [\n \"<string>\"\n ]\n }\n }\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "9212f247-2372-95b3-8c9b-968368a952fc",
"object": "completion",
"model": "qwen3-vl-plus",
"created_at": 1767095035,
"status": "completed",
"choices": [
{
"text": "This video shows an interesting scientific experiment conducted in a vacuum environment, titled \"Vacuum vs Orange\".\n\n**Experimental Setup and Preparation:**\n- The experiment is conducted in a transparent vacuum chamber with a red lid on top, equipped with a pressure gauge and valve.\n- Three items are placed inside the chamber:\n 1. A whole orange placed on a metal stand.\n 2. A peeled orange (or small orange) also placed on a stand.\n 3. A glass of orange juice in a wine glass.\n\n**Experimental Process:**\n1. **Vacuum begins (around 0:02)**: The operator opens the valve and starts evacuating. As the pressure inside the chamber decreases (pressure gauge needle moves), the orange juice begins to bubble and expand vigorously.\n2. **Orange juice reacts violently (around 0:14)**: The orange juice rapidly expands and overflows from the wine glass, forming a large amount of foam and flowing to the bottom of the chamber. This is due to dissolved gases in the liquid rapidly releasing under low pressure.\n3. **Fruit changes (around 0:28)**: The peeled orange surface begins to exude juice, the flesh expands and becomes moist and juicy; the whole orange surface also begins to have slight water seepage, but the changes are less obvious.\n4. **Sustained low pressure state (around 0:35-0:53)**: Orange juice continues to bubble, foam gradually stabilizes; peeled orange continues to exude juice, flesh significantly expands; whole orange surface has water droplets condensing.\n5. **Ending stage (around 0:55)**: The operator closes the valve, stops evacuating, pressure gauge needle swings back, and the pressure inside the chamber recovers. Orange juice foam gradually subsides, but the spilled liquid and exuded juice remain at the bottom of the chamber.\n\n**Experimental Results Summary:**\n- **Orange juice**: Under vacuum, due to sudden pressure drop, dissolved gases rapidly escape, causing violent boiling and overflow.\n- **Peeled orange**: Flesh exposed to low pressure environment, intracellular gas expands, causing flesh expansion and exuding large amounts of juice.\n- **Whole orange**: Protected by the peel, changes are minimal, only slight water vapor condensation on the surface.\n\n**Scientific Principle:**\nThis experiment visually demonstrates the physical phenomena of \"pressure reduction causing liquid boiling point to decrease\" and \"gas solubility decreases as pressure decreases\", commonly used in science education to vividly demonstrate the effects of vacuum environment on different forms of matter.\n\nThe entire video reveals the effects of pressure changes on matter states in a vivid and interesting way by comparing the different reactions of three forms of orange products in vacuum.",
"index": 0
}
],
"usage": {
"input_tokens": 34578,
"output_tokens": 561,
"total_tokens": 35139
},
"meta": {
"provider": "qwen",
"provider_model": "qwen3-vl-plus"
}
}
Qwen Video
Generate chat completions using Qwen VLM model with text, video, and image inputs.
curl --request POST \
--url https://mavi-backend.memories.ai/serve/api/v2/vu/chat/completions \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "qwen:qwen3-vl-plus",
"messages": [
{
"content": "<string>"
}
],
"temperature": 0.7,
"max_tokens": 1024,
"top_p": 0.9,
"frequency_penalty": 0,
"presence_penalty": 0,
"n": 1,
"stream": false,
"stop": "<string>",
"extra_body": {
"metadata": {
"enable_thinking": true,
"thinking_budget": 123,
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "<string>",
"schema": {
"type": "object",
"properties": {},
"required": [
"<string>"
]
}
}
}
}
}
}
'import requests
url = "https://mavi-backend.memories.ai/serve/api/v2/vu/chat/completions"
payload = {
"model": "qwen:qwen3-vl-plus",
"messages": [{ "content": "<string>" }],
"temperature": 0.7,
"max_tokens": 1024,
"top_p": 0.9,
"frequency_penalty": 0,
"presence_penalty": 0,
"n": 1,
"stream": False,
"stop": "<string>",
"extra_body": { "metadata": {
"enable_thinking": True,
"thinking_budget": 123,
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "<string>",
"schema": {
"type": "object",
"properties": {},
"required": ["<string>"]
}
}
}
} }
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'qwen:qwen3-vl-plus',
messages: [{content: '<string>'}],
temperature: 0.7,
max_tokens: 1024,
top_p: 0.9,
frequency_penalty: 0,
presence_penalty: 0,
n: 1,
stream: false,
stop: '<string>',
extra_body: {
metadata: {
enable_thinking: true,
thinking_budget: 123,
response_format: {
type: 'json_schema',
json_schema: {
name: '<string>',
schema: {type: 'object', properties: {}, required: ['<string>']}
}
}
}
}
})
};
fetch('https://mavi-backend.memories.ai/serve/api/v2/vu/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mavi-backend.memories.ai/serve/api/v2/vu/chat/completions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'qwen:qwen3-vl-plus',
'messages' => [
[
'content' => '<string>'
]
],
'temperature' => 0.7,
'max_tokens' => 1024,
'top_p' => 0.9,
'frequency_penalty' => 0,
'presence_penalty' => 0,
'n' => 1,
'stream' => false,
'stop' => '<string>',
'extra_body' => [
'metadata' => [
'enable_thinking' => true,
'thinking_budget' => 123,
'response_format' => [
'type' => 'json_schema',
'json_schema' => [
'name' => '<string>',
'schema' => [
'type' => 'object',
'properties' => [
],
'required' => [
'<string>'
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mavi-backend.memories.ai/serve/api/v2/vu/chat/completions"
payload := strings.NewReader("{\n \"model\": \"qwen:qwen3-vl-plus\",\n \"messages\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"temperature\": 0.7,\n \"max_tokens\": 1024,\n \"top_p\": 0.9,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"n\": 1,\n \"stream\": false,\n \"stop\": \"<string>\",\n \"extra_body\": {\n \"metadata\": {\n \"enable_thinking\": true,\n \"thinking_budget\": 123,\n \"response_format\": {\n \"type\": \"json_schema\",\n \"json_schema\": {\n \"name\": \"<string>\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {},\n \"required\": [\n \"<string>\"\n ]\n }\n }\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mavi-backend.memories.ai/serve/api/v2/vu/chat/completions")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"qwen:qwen3-vl-plus\",\n \"messages\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"temperature\": 0.7,\n \"max_tokens\": 1024,\n \"top_p\": 0.9,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"n\": 1,\n \"stream\": false,\n \"stop\": \"<string>\",\n \"extra_body\": {\n \"metadata\": {\n \"enable_thinking\": true,\n \"thinking_budget\": 123,\n \"response_format\": {\n \"type\": \"json_schema\",\n \"json_schema\": {\n \"name\": \"<string>\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {},\n \"required\": [\n \"<string>\"\n ]\n }\n }\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mavi-backend.memories.ai/serve/api/v2/vu/chat/completions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"qwen:qwen3-vl-plus\",\n \"messages\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"temperature\": 0.7,\n \"max_tokens\": 1024,\n \"top_p\": 0.9,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"n\": 1,\n \"stream\": false,\n \"stop\": \"<string>\",\n \"extra_body\": {\n \"metadata\": {\n \"enable_thinking\": true,\n \"thinking_budget\": 123,\n \"response_format\": {\n \"type\": \"json_schema\",\n \"json_schema\": {\n \"name\": \"<string>\",\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {},\n \"required\": [\n \"<string>\"\n ]\n }\n }\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "9212f247-2372-95b3-8c9b-968368a952fc",
"object": "completion",
"model": "qwen3-vl-plus",
"created_at": 1767095035,
"status": "completed",
"choices": [
{
"text": "This video shows an interesting scientific experiment conducted in a vacuum environment, titled \"Vacuum vs Orange\".\n\n**Experimental Setup and Preparation:**\n- The experiment is conducted in a transparent vacuum chamber with a red lid on top, equipped with a pressure gauge and valve.\n- Three items are placed inside the chamber:\n 1. A whole orange placed on a metal stand.\n 2. A peeled orange (or small orange) also placed on a stand.\n 3. A glass of orange juice in a wine glass.\n\n**Experimental Process:**\n1. **Vacuum begins (around 0:02)**: The operator opens the valve and starts evacuating. As the pressure inside the chamber decreases (pressure gauge needle moves), the orange juice begins to bubble and expand vigorously.\n2. **Orange juice reacts violently (around 0:14)**: The orange juice rapidly expands and overflows from the wine glass, forming a large amount of foam and flowing to the bottom of the chamber. This is due to dissolved gases in the liquid rapidly releasing under low pressure.\n3. **Fruit changes (around 0:28)**: The peeled orange surface begins to exude juice, the flesh expands and becomes moist and juicy; the whole orange surface also begins to have slight water seepage, but the changes are less obvious.\n4. **Sustained low pressure state (around 0:35-0:53)**: Orange juice continues to bubble, foam gradually stabilizes; peeled orange continues to exude juice, flesh significantly expands; whole orange surface has water droplets condensing.\n5. **Ending stage (around 0:55)**: The operator closes the valve, stops evacuating, pressure gauge needle swings back, and the pressure inside the chamber recovers. Orange juice foam gradually subsides, but the spilled liquid and exuded juice remain at the bottom of the chamber.\n\n**Experimental Results Summary:**\n- **Orange juice**: Under vacuum, due to sudden pressure drop, dissolved gases rapidly escape, causing violent boiling and overflow.\n- **Peeled orange**: Flesh exposed to low pressure environment, intracellular gas expands, causing flesh expansion and exuding large amounts of juice.\n- **Whole orange**: Protected by the peel, changes are minimal, only slight water vapor condensation on the surface.\n\n**Scientific Principle:**\nThis experiment visually demonstrates the physical phenomena of \"pressure reduction causing liquid boiling point to decrease\" and \"gas solubility decreases as pressure decreases\", commonly used in science education to vividly demonstrate the effects of vacuum environment on different forms of matter.\n\nThe entire video reveals the effects of pressure changes on matter states in a vivid and interesting way by comparing the different reactions of three forms of orange products in vacuum.",
"index": 0
}
],
"usage": {
"input_tokens": 34578,
"output_tokens": 561,
"total_tokens": 35139
},
"meta": {
"provider": "qwen",
"provider_model": "qwen3-vl-plus"
}
}
https://mavi-backend.memories.ai/serve/api/v2
Auth: Authorization: sk-mavi-... (no Bearer prefix)POST https://mavi-backend.memories.ai/serve/api/v2/vu/chat/completionsVideo Understanding (VLM) endpoints use the /vu path prefix. Image Understanding (ILM) endpoints use /iu instead.Supported Models
All models require theqwen: prefix when used in the model parameter (e.g., qwen:qwen3-vl-plus).
Qwen 3 VL Plus (Premium - Tiered Pricing)
| Model | Input Price | Output Price |
|---|---|---|
| qwen3-vl-plus | $0.00021/1K (≤32K), $0.00031/1K (32K-128K), $0.00063/1K (128K-256K) | $0.00168/1K (≤32K), $0.00252/1K (32K-128K), $0.00503/1K (128K-256K) |
| qwen3-vl-plus-2025-12-19 | $0.00021/1K (≤32K), $0.00031/1K (32K-128K), $0.00063/1K (128K-256K) | $0.00168/1K (≤32K), $0.00252/1K (32K-128K), $0.00503/1K (128K-256K) |
| qwen3-vl-plus-2025-09-23 | $0.00021/1K (≤32K), $0.00031/1K (32K-128K), $0.00063/1K (128K-256K) | $0.00168/1K (≤32K), $0.00252/1K (32K-128K), $0.00503/1K (128K-256K) |
Qwen 3 VL Flash (Cost-Effective - Tiered Pricing)
| Model | Input Price | Output Price |
|---|---|---|
| qwen3-vl-flash | $0.000052/1K (≤32K), $0.000079/1K (32K-128K), $0.000126/1K (128K-256K) | $0.00042/1K (≤32K), $0.00063/1K (32K-128K), $0.00101/1K (128K-256K) |
| qwen3-vl-flash-2025-10-15 | $0.000052/1K (≤32K), $0.000079/1K (32K-128K), $0.000126/1K (128K-256K) | $0.00042/1K (≤32K), $0.00063/1K (32K-128K), $0.00101/1K (128K-256K) |
Qwen VL Max (Legacy)
| Model | Input Price | Output Price |
|---|---|---|
| qwen-vl-max | $0.00084/1K tokens | $0.00335/1K tokens |
| qwen-vl-max-latest | $0.00084/1K tokens | $0.00335/1K tokens |
| qwen-vl-max-2025-08-13 | $0.00084/1K tokens | $0.00335/1K tokens |
| qwen-vl-max-2025-04-08 | $0.00084/1K tokens | $0.00335/1K tokens |
Qwen VL Plus (Legacy)
| Model | Input Price | Output Price |
|---|---|---|
| qwen-vl-plus | $0.00022/1K tokens | $0.00066/1K tokens |
| qwen-vl-plus-latest | $0.00022/1K tokens | $0.00066/1K tokens |
| qwen-vl-plus-2025-08-15 | $0.00022/1K tokens | $0.00066/1K tokens |
| qwen-vl-plus-2025-05-07 | $0.00022/1K tokens | $0.00066/1K tokens |
| qwen-vl-plus-2025-01-25 | $0.00022/1K tokens | $0.00066/1K tokens |
- All prices are per 1,000 tokens and converted from CNY at exchange rate of 7.0
- Tip: To compare with other providers (who price per 1M tokens), multiply these prices by 1,000. For example, $0.00021/1K = $0.21/1M tokens
- Qwen 3 VL models support tiered pricing: ≤32K, 32K-128K, 128K-256K token ranges
- Legacy models (Qwen VL Max/Plus) use flat-rate pricing
- Remember to include the
qwen:prefix:"model": "qwen:qwen3-vl-plus"
Request Body
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| model | string | Yes | - | The model to use (e.g., qwen:qwen3-vl-plus) |
| messages | array | Yes | - | Array of message objects. Each message contains: - role: Role type, values: system, user- content: Message content, can be a string or array. Array items can contain:- image: Image URL or base64 encoded image- video: Video URL only (video does not support base64)- text: Text content |
| temperature | number | No | 0.7 | Controls randomness: 0.0-2.0, higher = more random |
| max_tokens | integer | No | 1024 | Maximum number of tokens to generate |
| top_p | number | No | 0.9 | Nucleus sampling: 0.0-1.0, consider tokens with top_p probability mass |
| frequency_penalty | number | No | 0.0 | Reduces repetition of frequent tokens: -2.0 to 2.0 |
| presence_penalty | number | No | 0.0 | Increases likelihood of new topics: -2.0 to 2.0 |
| n | integer | No | 1 | Number of completions to generate |
| stream | boolean | No | false | Whether to stream the response |
| stop | string | array | null | No | null | Stop sequences. Can be a string, array of strings, or null |
| extra_body | object | No | - | Additional body parameters. Contains: - metadata: Metadata object- enable_thinking: Boolean to enable thinking mode- thinking_budget: Integer value for thinking budget- response_format: Response format configuration- type: Format type (json_schema)- json_schema: JSON schema object- name: Schema name- schema: JSON schema definition |
Code Example
from openai import OpenAI
client = OpenAI(
api_key="sk-mavi-...",
base_url="https://mavi-backend.memories.ai/serve/api/v2/vu"
)
resp = client.chat.completions.create(
model="qwen:qwen3-vl-plus",
messages=[
{"role": "system", "content": "You are a multimodal assistant. Keep your answers concise."},
{
"role": "user",
"content": [
{
"image": "https://storage.googleapis.com/memories-test-data/gun5.png" # url or base64
},
{
"video": "https://storage.googleapis.com/memories-test-data/test_1min.mp4" # url only
},
{"text": "Please summarize the content of this image and video."}
]
}
],
temperature=0.7, # Controls randomness: 0.0-2.0, higher = more random
max_tokens=1024, # Maximum number of tokens to generate
top_p=0.9, # Nucleus sampling: 0.0-1.0, consider tokens with top_p probability mass
frequency_penalty=0.0, # -2.0 to 2.0, reduces repetition of frequent tokens
presence_penalty=0.0, # -2.0 to 2.0, increases likelihood of new topics
n=1, # Number of completions to generate
stream=False, # Whether to stream the response
stop=None, # Stop sequences (list of strings)
extra_body={
"metadata": {
"enable_thinking": True,
"thinking_budget": 1024,
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "answer",
"schema": {
"type": "object",
"properties": {
"result": {"type": "string"}
},
"required": ["result"]
}
}
}
}
}
)
print(resp)
Response
Returns the chat completion response with structured output.{
"id": "9212f247-2372-95b3-8c9b-968368a952fc",
"object": "completion",
"model": "qwen3-vl-plus",
"created_at": 1767095035,
"status": "completed",
"choices": [
{
"text": "This video shows an interesting scientific experiment conducted in a vacuum environment, titled \"Vacuum vs Orange\".\n\n**Experimental Setup and Preparation:**\n- The experiment is conducted in a transparent vacuum chamber with a red lid on top, equipped with a pressure gauge and valve.\n- Three items are placed inside the chamber:\n 1. A whole orange placed on a metal stand.\n 2. A peeled orange (or small orange) also placed on a stand.\n 3. A glass of orange juice in a wine glass.\n\n**Experimental Process:**\n1. **Vacuum begins (around 0:02)**: The operator opens the valve and starts evacuating. As the pressure inside the chamber decreases (pressure gauge needle moves), the orange juice begins to bubble and expand vigorously.\n2. **Orange juice reacts violently (around 0:14)**: The orange juice rapidly expands and overflows from the wine glass, forming a large amount of foam and flowing to the bottom of the chamber. This is due to dissolved gases in the liquid rapidly releasing under low pressure.\n3. **Fruit changes (around 0:28)**: The peeled orange surface begins to exude juice, the flesh expands and becomes moist and juicy; the whole orange surface also begins to have slight water seepage, but the changes are less obvious.\n4. **Sustained low pressure state (around 0:35-0:53)**: Orange juice continues to bubble, foam gradually stabilizes; peeled orange continues to exude juice, flesh significantly expands; whole orange surface has water droplets condensing.\n5. **Ending stage (around 0:55)**: The operator closes the valve, stops evacuating, pressure gauge needle swings back, and the pressure inside the chamber recovers. Orange juice foam gradually subsides, but the spilled liquid and exuded juice remain at the bottom of the chamber.\n\n**Experimental Results Summary:**\n- **Orange juice**: Under vacuum, due to sudden pressure drop, dissolved gases rapidly escape, causing violent boiling and overflow.\n- **Peeled orange**: Flesh exposed to low pressure environment, intracellular gas expands, causing flesh expansion and exuding large amounts of juice.\n- **Whole orange**: Protected by the peel, changes are minimal, only slight water vapor condensation on the surface.\n\n**Scientific Principle:**\nThis experiment visually demonstrates the physical phenomena of \"pressure reduction causing liquid boiling point to decrease\" and \"gas solubility decreases as pressure decreases\", commonly used in science education to vividly demonstrate the effects of vacuum environment on different forms of matter.\n\nThe entire video reveals the effects of pressure changes on matter states in a vivid and interesting way by comparing the different reactions of three forms of orange products in vacuum.",
"index": 0
}
],
"usage": {
"input_tokens": 34578,
"output_tokens": 561,
"total_tokens": 35139
},
"meta": {
"provider": "qwen",
"provider_model": "qwen3-vl-plus"
}
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| id | string | Unique identifier for the completion |
| object | string | Object type, always “completion” |
| model | string | The model used for the completion |
| created_at | integer | Unix timestamp of when the completion was created |
| status | string | Status of the completion (e.g., “completed”) |
| choices | array | Array of completion choices |
| choices[].text | string | Text content of the completion |
| choices[].index | integer | Index of the choice in the choices array |
| usage | object | Token usage information |
| usage.input_tokens | integer | Number of input tokens used |
| usage.output_tokens | integer | Number of output tokens generated |
| usage.total_tokens | integer | Total number of tokens used |
| meta | object | Metadata about the completion |
| meta.provider | string | Provider name (e.g., “qwen”) |
| meta.provider_model | string | Provider-specific model name |
Authorizations
Body
The model to use (e.g., qwen:qwen3-vl-plus)
"qwen:qwen3-vl-plus"
Array of message objects
Show child attributes
Show child attributes
Controls randomness: 0.0-2.0, higher = more random
0 <= x <= 2Maximum number of tokens to generate
Nucleus sampling: 0.0-1.0
0 <= x <= 1Reduces repetition of frequent tokens: -2.0 to 2.0
-2 <= x <= 2Increases likelihood of new topics: -2.0 to 2.0
-2 <= x <= 2Number of completions to generate
Whether to stream the response
Stop sequences
Show child attributes
Show child attributes
Response
Chat completion response with structured output
Unique identifier for the completion
"9212f247-2372-95b3-8c9b-968368a952fc"
Object type, always 'completion'
"completion"
The model used for the completion
"qwen3-vl-plus"
Unix timestamp of when the completion was created
1767095035
Status of the completion
"completed"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
