This page describes multimodal input for the chat APIs. SilvaMux passes multimodal content through to the model side; whether it can be processed depends on the model itself.
Supports the OpenAI vision format — pass image_url inside the content of messages:
curl https://www.silvamux.com/api/v1/chat/completions \
-H "Authorization: Bearer $SILVAMUX_API_KEY " \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-m3",
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "What's in this image?"},
{"type": "image_url", "image_url": {"url": "https://example.com/cat.jpg"}}
]
}
]
}'
# pip install openai
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["SILVAMUX_API_KEY"],
base_url="https://www.silvamux.com/api/v1",
)
response = client.chat.completions.create(
model="minimax-m3",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "What's in this image?"},
{"type": "image_url", "image_url": {"url": "https://example.com/cat.jpg"}},
],
}
],
)
print(response.choices[0].message.content)
// npm install openai
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.SILVAMUX_API_KEY,
baseURL: "https://www.silvamux.com/api/v1",
});
const response = await client.chat.completions.create({
model: "minimax-m3",
messages: [
{
role: "user",
content: [
{ type: "text", text: "What's in this image?" },
{ type: "image_url", image_url: { url: "https://example.com/cat.jpg" } },
],
},
],
});
console.log(response.choices[0].message.content);
// Standard library only
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
payload := []byte(`{
"model": "minimax-m3",
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "What's in this image?"},
{"type": "image_url", "image_url": {"url": "https://example.com/cat.jpg"}}
]
}
]
}`)
req, err := http.NewRequest("POST", "https://www.silvamux.com/api/v1/chat/completions", bytes.NewReader(payload))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("SILVAMUX_API_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
cURL Python JavaScript Go
image_url.url can be a public URL or base64-encoded data (data:image/jpeg;base64,...).The platform does not parse or strip image content; it is forwarded to the model as-is. Whether image input is supported is decided by the model (some multimodal models support it; text-only models return errors). Supports the OpenAI audio format — pass input_audio inside content:
{
"type" : "input_audio" ,
"input_audio" : { "data" : "<base64>" , "format" : "wav" }
}
Passed through by the platform; processability is decided by the model. Audio tokens are billed as regular input tokens (no separate multimodal price).