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": "nova:amazon.nova-lite-v1:0",
"messages": [
{
"content": "<string>"
}
],
"temperature": 1,
"max_tokens": 1000,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0,
"n": 1,
"stream": false,
"stop": "<string>",
"extra_body": {
"metadata": {
"toolConfig": {
"tools": [
{
"toolSpec": {
"name": "<string>",
"description": "<string>",
"inputSchema": {
"json": {}
}
}
}
]
}
}
}
}
'import requests
url = "https://mavi-backend.memories.ai/serve/api/v2/vu/chat/completions"
payload = {
"model": "nova:amazon.nova-lite-v1:0",
"messages": [{ "content": "<string>" }],
"temperature": 1,
"max_tokens": 1000,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0,
"n": 1,
"stream": False,
"stop": "<string>",
"extra_body": { "metadata": { "toolConfig": { "tools": [{ "toolSpec": {
"name": "<string>",
"description": "<string>",
"inputSchema": { "json": {} }
} }] } } }
}
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: 'nova:amazon.nova-lite-v1:0',
messages: [{content: '<string>'}],
temperature: 1,
max_tokens: 1000,
top_p: 1,
frequency_penalty: 0,
presence_penalty: 0,
n: 1,
stream: false,
stop: '<string>',
extra_body: {
metadata: {
toolConfig: {
tools: [
{toolSpec: {name: '<string>', description: '<string>', inputSchema: {json: {}}}}
]
}
}
}
})
};
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' => 'nova:amazon.nova-lite-v1:0',
'messages' => [
[
'content' => '<string>'
]
],
'temperature' => 1,
'max_tokens' => 1000,
'top_p' => 1,
'frequency_penalty' => 0,
'presence_penalty' => 0,
'n' => 1,
'stream' => false,
'stop' => '<string>',
'extra_body' => [
'metadata' => [
'toolConfig' => [
'tools' => [
[
'toolSpec' => [
'name' => '<string>',
'description' => '<string>',
'inputSchema' => [
'json' => [
]
]
]
]
]
]
]
]
]),
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\": \"nova:amazon.nova-lite-v1:0\",\n \"messages\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"temperature\": 1,\n \"max_tokens\": 1000,\n \"top_p\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"n\": 1,\n \"stream\": false,\n \"stop\": \"<string>\",\n \"extra_body\": {\n \"metadata\": {\n \"toolConfig\": {\n \"tools\": [\n {\n \"toolSpec\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"inputSchema\": {\n \"json\": {}\n }\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\": \"nova:amazon.nova-lite-v1:0\",\n \"messages\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"temperature\": 1,\n \"max_tokens\": 1000,\n \"top_p\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"n\": 1,\n \"stream\": false,\n \"stop\": \"<string>\",\n \"extra_body\": {\n \"metadata\": {\n \"toolConfig\": {\n \"tools\": [\n {\n \"toolSpec\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"inputSchema\": {\n \"json\": {}\n }\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\": \"nova:amazon.nova-lite-v1:0\",\n \"messages\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"temperature\": 1,\n \"max_tokens\": 1000,\n \"top_p\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"n\": 1,\n \"stream\": false,\n \"stop\": \"<string>\",\n \"extra_body\": {\n \"metadata\": {\n \"toolConfig\": {\n \"tools\": [\n {\n \"toolSpec\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"inputSchema\": {\n \"json\": {}\n }\n }\n }\n ]\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "chatcmpl_705304384e4143db9e162cda30295762",
"object": "chat.completion",
"created": 1767098064,
"model": "nova:amazon.nova-lite-v1:0",
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"content": "At the start of the video, the screen displays the words \"VACUUM VS ORANGE\". The objects in the video are visible. The first is an orange resting on a stand. The second involves a small orange placed on a stand that is inside of a tall glass. The third is a glass filled with a yellow, orange-like liquid. The background is blurry. At 3 seconds, there is a small burst of citrus juice from the small orange that was resting on a stand. The juice splatters and travels onto the large orange. At 7 seconds, there is another burst of juice. This time, the juice comes from the glass, and more juices splatters onto the large orange. A hand can be seen at the top of the screen. This hand adjusts some sort of machinery, which is the metal pipe and circular object that is directly above the objects in the glass box. At around 14 seconds, liquid pours from the glass. At 17 seconds, the person adjusts the machinery again. The same things happens around 27 seconds. By 34 seconds, there is an excessive amount of juice and liquid inside of the glass box. At 43 seconds, all of the juice and liquid is gone from the glass box. At 46 seconds, there is no juice or liquid inside of the glass box. At 53 seconds, the person adjusts the machinery again."
},
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 17463,
"output_token": 290,
"total_tokens": 17753
}
}
Nova Video
Generate chat completions using Nova 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": "nova:amazon.nova-lite-v1:0",
"messages": [
{
"content": "<string>"
}
],
"temperature": 1,
"max_tokens": 1000,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0,
"n": 1,
"stream": false,
"stop": "<string>",
"extra_body": {
"metadata": {
"toolConfig": {
"tools": [
{
"toolSpec": {
"name": "<string>",
"description": "<string>",
"inputSchema": {
"json": {}
}
}
}
]
}
}
}
}
'import requests
url = "https://mavi-backend.memories.ai/serve/api/v2/vu/chat/completions"
payload = {
"model": "nova:amazon.nova-lite-v1:0",
"messages": [{ "content": "<string>" }],
"temperature": 1,
"max_tokens": 1000,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0,
"n": 1,
"stream": False,
"stop": "<string>",
"extra_body": { "metadata": { "toolConfig": { "tools": [{ "toolSpec": {
"name": "<string>",
"description": "<string>",
"inputSchema": { "json": {} }
} }] } } }
}
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: 'nova:amazon.nova-lite-v1:0',
messages: [{content: '<string>'}],
temperature: 1,
max_tokens: 1000,
top_p: 1,
frequency_penalty: 0,
presence_penalty: 0,
n: 1,
stream: false,
stop: '<string>',
extra_body: {
metadata: {
toolConfig: {
tools: [
{toolSpec: {name: '<string>', description: '<string>', inputSchema: {json: {}}}}
]
}
}
}
})
};
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' => 'nova:amazon.nova-lite-v1:0',
'messages' => [
[
'content' => '<string>'
]
],
'temperature' => 1,
'max_tokens' => 1000,
'top_p' => 1,
'frequency_penalty' => 0,
'presence_penalty' => 0,
'n' => 1,
'stream' => false,
'stop' => '<string>',
'extra_body' => [
'metadata' => [
'toolConfig' => [
'tools' => [
[
'toolSpec' => [
'name' => '<string>',
'description' => '<string>',
'inputSchema' => [
'json' => [
]
]
]
]
]
]
]
]
]),
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\": \"nova:amazon.nova-lite-v1:0\",\n \"messages\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"temperature\": 1,\n \"max_tokens\": 1000,\n \"top_p\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"n\": 1,\n \"stream\": false,\n \"stop\": \"<string>\",\n \"extra_body\": {\n \"metadata\": {\n \"toolConfig\": {\n \"tools\": [\n {\n \"toolSpec\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"inputSchema\": {\n \"json\": {}\n }\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\": \"nova:amazon.nova-lite-v1:0\",\n \"messages\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"temperature\": 1,\n \"max_tokens\": 1000,\n \"top_p\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"n\": 1,\n \"stream\": false,\n \"stop\": \"<string>\",\n \"extra_body\": {\n \"metadata\": {\n \"toolConfig\": {\n \"tools\": [\n {\n \"toolSpec\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"inputSchema\": {\n \"json\": {}\n }\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\": \"nova:amazon.nova-lite-v1:0\",\n \"messages\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"temperature\": 1,\n \"max_tokens\": 1000,\n \"top_p\": 1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"n\": 1,\n \"stream\": false,\n \"stop\": \"<string>\",\n \"extra_body\": {\n \"metadata\": {\n \"toolConfig\": {\n \"tools\": [\n {\n \"toolSpec\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"inputSchema\": {\n \"json\": {}\n }\n }\n }\n ]\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "chatcmpl_705304384e4143db9e162cda30295762",
"object": "chat.completion",
"created": 1767098064,
"model": "nova:amazon.nova-lite-v1:0",
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"content": "At the start of the video, the screen displays the words \"VACUUM VS ORANGE\". The objects in the video are visible. The first is an orange resting on a stand. The second involves a small orange placed on a stand that is inside of a tall glass. The third is a glass filled with a yellow, orange-like liquid. The background is blurry. At 3 seconds, there is a small burst of citrus juice from the small orange that was resting on a stand. The juice splatters and travels onto the large orange. At 7 seconds, there is another burst of juice. This time, the juice comes from the glass, and more juices splatters onto the large orange. A hand can be seen at the top of the screen. This hand adjusts some sort of machinery, which is the metal pipe and circular object that is directly above the objects in the glass box. At around 14 seconds, liquid pours from the glass. At 17 seconds, the person adjusts the machinery again. The same things happens around 27 seconds. By 34 seconds, there is an excessive amount of juice and liquid inside of the glass box. At 43 seconds, all of the juice and liquid is gone from the glass box. At 46 seconds, there is no juice or liquid inside of the glass box. At 53 seconds, the person adjusts the machinery again."
},
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 17463,
"output_token": 290,
"total_tokens": 17753
}
}
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 thenova: prefix when used in the model parameter (e.g., nova:us.amazon.nova-lite-v1:0).
Amazon Nova Models
| Model | Input Price | Output Price |
|---|---|---|
| us.amazon.nova-premier-v1:0 | $2.50/1M tokens | $12.50/1M tokens |
| us.amazon.nova-pro-v1:0 | $0.80/1M tokens | $3.20/1M tokens |
| us.amazon.nova-2-lite-v1:0 | $0.33/1M tokens | $2.75/1M tokens |
| us.amazon.nova-lite-v1:0 | $0.06/1M tokens | $0.24/1M tokens |
- All prices are per 1,000,000 (1M) tokens
- Nova Premier offers the highest quality for complex multimodal tasks
- Nova Pro provides balanced performance and cost
- Nova 2 Lite and Nova Lite are optimized for cost-effective operations
- Remember to include the
nova:prefix:"model": "nova:us.amazon.nova-lite-v1:0"
Request Body
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| model | string | Yes | - | The model to use (e.g., nova:us.amazon.nova-lite-v1:0) |
| messages | array | Yes | - | Array of message objects. Each message contains: - role: Role type, values: system, user, assistant- content: Message content, can be a string or array. Array items can contain:- type: Content type, text or video_url- text: Text content (when type is text)- video_url: Video URL or base64 encoded video (when type is video_url) |
| temperature | number | No | 1.0 | Controls randomness: 0.0-2.0, higher = more random |
| max_tokens | integer | No | 1000 | Maximum number of tokens to generate |
| top_p | number | No | 1.0 | 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- toolConfig: Tool configuration- tools: Array of tool specifications |
Code Example
from openai import OpenAI
client = OpenAI(
api_key="sk-mavi-...",
base_url="https://mavi-backend.memories.ai/serve/api/v2/vu"
)
def call_my_vlm():
resp = client.chat.completions.create(
model="nova:us.amazon.nova-lite-v1:0",
messages=[
{"role": "system", "content": "You are a multimodal assistant. Keep your answers concise."},
{
"role": "user",
"content": [
{
"type": "video_url",
"video_url": {
"url": "https://storage.googleapis.com/memories-test-data/test_1min.mp4"
# or use base64: "url": f"data:video/mp4;base64,{base64_string}"
}
},
{"type": "text", "text": "What is the content of this video?"}
]
}
],
temperature=1.0, # Controls randomness: 0.0-2.0, higher = more random
max_tokens=1000, # Maximum number of tokens to generate
top_p=1.0, # 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": {
"toolConfig": {
"tools": [
{
"toolSpec": {
"name": "extract_video_summary",
"description": "Extract a concise summary of the video",
"inputSchema": {
"json": {
"type": "object",
"properties": {
"result": {"type": "string", "description": "Summary content."}
},
"required": ["result"]
}
}
}
}
]
}
}
}
)
return resp
# Usage example
result = call_my_vlm()
print(result)
Response
Returns the chat completion response.{
"id": "chatcmpl_705304384e4143db9e162cda30295762",
"object": "chat.completion",
"created": 1767098064,
"model": "nova:amazon.nova-lite-v1:0",
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"content": "At the start of the video, the screen displays the words \"VACUUM VS ORANGE\". The objects in the video are visible. The first is an orange resting on a stand. The second involves a small orange placed on a stand that is inside of a tall glass. The third is a glass filled with a yellow, orange-like liquid. The background is blurry. At 3 seconds, there is a small burst of citrus juice from the small orange that was resting on a stand. The juice splatters and travels onto the large orange. At 7 seconds, there is another burst of juice. This time, the juice comes from the glass, and more juices splatters onto the large orange. A hand can be seen at the top of the screen. This hand adjusts some sort of machinery, which is the metal pipe and circular object that is directly above the objects in the glass box. At around 14 seconds, liquid pours from the glass. At 17 seconds, the person adjusts the machinery again. The same things happens around 27 seconds. By 34 seconds, there is an excessive amount of juice and liquid inside of the glass box. At 43 seconds, all of the juice and liquid is gone from the glass box. At 46 seconds, there is no juice or liquid inside of the glass box. At 53 seconds, the person adjusts the machinery again."
},
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 17463,
"output_token": 290,
"total_tokens": 17753
}
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| id | string | Unique identifier for the chat completion |
| object | string | Object type, always “chat.completion” |
| created | integer | Unix timestamp of when the completion was created |
| model | string | The model used for the completion |
| choices | array | Array of completion choices |
| choices[].index | integer | Index of the choice in the choices array |
| choices[].message | object | Message object containing the assistant’s response |
| choices[].message.role | string | Role of the message, always “assistant” |
| choices[].message.content | string | Content of the message |
| choices[].finish_reason | string | Reason why the completion finished |
| usage | object | Token usage information |
| usage.prompt_tokens | integer | Number of tokens in the prompt |
| usage.output_token | integer | Number of tokens in the completion output |
| usage.total_tokens | integer | Total number of tokens used |
Authorizations
Body
The model to use (e.g., nova:amazon.nova-lite-v1:0)
"nova:amazon.nova-lite-v1:0"
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
Unique identifier for the chat completion
"chatcmpl_705304384e4143db9e162cda30295762"
Object type, always "chat.completion"
"chat.completion"
Unix timestamp of when the completion was created
1767098064
The model used for the completion
"nova:amazon.nova-lite-v1:0"
Array of completion choices
Show child attributes
Show child attributes
Token usage information
Show child attributes
Show child attributes
