Integration guides · 2026-10-17
Send images, video and audio to Muse Spark Open
Send images, video and audio to meta/muse-spark-open with image_url, video_url and input_audio parts: formats, base64, billing and a Python example.
Short answer: three content parts, one endpoint
LLMTR (llmtr.com) is a gateway that gives access to language models from many providers through one OpenAI-compatible API. You send images, video and audio to Muse Spark Open (meta/muse-spark-open) on the /v1/chat/completions endpoint at https://llmtr.com/v1, each as a content part in the message's content array: image_url for an image, video_url for a video and input_audio for audio.
Meta describes Muse Spark Open as a model that takes text, image, video and audio input and produces text. The model card on LLMTR also lists image, video and audio input, and the answer is always text. Reading an error message from a screenshot, pulling attributes out of a product photo, listing the steps in a short training video or transcribing a meeting recording are examples of work these inputs make possible. The context window is 1,048,576 tokens. This article covers the format of each part, how it is billed and which inputs are not supported.
How do you send images, video and audio to Muse Spark Open?
Write the message's content field as an array instead of plain text. The first item is a text part that carries the question, the second is the media part. An image part has the type image_url, and its address goes in image_url.url. A video part has the type video_url, and its address sits in video_url.url. An audio part has the type input_audio: the base64 data goes in input_audio.data and the format in input_audio.format.
The Python example below defines a small helper that turns a file into base64 and an ask function that sends one media part per request. All three calls go to the same model and the same endpoint; only the content part changes. A reasoning_effort of low is the level at which the model reasons least, which keeps output tokens down on tasks such as describing or transcribing. The usage field of each call shows how many input tokens the media took. Put the same function in a loop to process the files in a folder one by one; each file is a separate request and is billed separately.
Three separate requests that send an image, a video and an audio file to meta/muse-spark-open with the OpenAI Python SDK; each request carries one media part.
import base64
import os
from openai import OpenAI
client = OpenAI(base_url="https://llmtr.com/v1", api_key=os.environ["LLMTR_API_KEY"])
def b64(path):
with open(path, "rb") as f:
return base64.b64encode(f.read()).decode("ascii")
def ask(question, media_part):
response = client.chat.completions.create(
model="meta/muse-spark-open",
reasoning_effort="low",
max_tokens=4096,
messages=[{"role": "user", "content": [{"type": "text", "text": question}, media_part]}],
)
return response.choices[0].message.content, response.usage
# Image: base64 data URL (a public https URL also works)
print(ask("What colour is the shirt in this photo?",
{"type": "image_url", "image_url": {"url": "data:image/png;base64," + b64("photo.png")}}))
# Video: video_url part with a base64 MP4 data URL
print(ask("Which colours appear in this clip, in order?",
{"type": "video_url", "video_url": {"url": "data:video/mp4;base64," + b64("clip.mp4")}}))
# Audio: input_audio part with base64 WAV data
print(ask("Transcribe this recording.",
{"type": "input_audio", "input_audio": {"data": b64("speech.wav"), "format": "wav"}}))
Images: a base64 data URL or an https address
You can send an image in two ways: the file as a data URL in the form data:image/png;base64,..., or a public https address. LLMTR accepts only https addresses; addresses that start with http:// or point at a local network return 400. With a data URL the image travels inside the request, so you do not depend on an address being reachable.
Write the question plainly in the text part. Asking one thing, such as "what colour is the shirt in the photo" rather than "describe this image", gives a short answer you can check. Image tokens are counted inside prompt_tokens and billed at the input price of $1.25 per 1M tokens.
Video: the video_url part and an MP4 data URL
Send a video with a video_url part: turn the MP4 file into base64 and put it in the url field in the form data:video/mp4;base64,... Base64 encoding makes a file about a third larger, so send the smallest file that does the job rather than an unnecessarily long or high-bitrate one. Video tokens are also counted inside prompt_tokens and billed at the input price, so a long clip grows the input side the way a long prompt does.
Meta's model card notes a limitation for video: with very short or low-resolution clips (a few seconds at around 100 pixels), the model may sometimes reply that it cannot view the video. For reliable results the card recommends longer clips or a resolution of at least 448 pixels on the short side. If you are asking about an order, a count or a colour in the clip, phrase the question just as precisely.
Audio: the input_audio part and base64 WAV
Audio goes in an input_audio part: the base64-encoded WAV file in the data field and the value wav in the format field. Unlike images and video, this field is not a data URL but plain base64 data without a prefix; in the docs example the data starts with UklGR. If your recording is in another format such as MP3, convert it to WAV before sending; WAV is the format the docs describe.
The model card lists audio input, and the format in the docs is base64-encoded WAV. For tasks such as transcription, a summary or answering a question about a recording, say what you want in the text part, for example "transcribe this recording" or "which date does the speaker mention". Audio tokens are also counted inside prompt_tokens and billed at the input price. Splitting long recordings into meaningful pieces makes both the answer and the cost easier to control.
Billing, unsupported inputs and the data note
Media input has no separate price line: image, video and audio tokens are billed inside prompt_tokens at the input price of $1.25 per 1M tokens. Answer and reasoning tokens are billed inside completion_tokens at the output price of $4.25. You can see how many tokens a media file took in the usage field of the response; to estimate the cost, try a single file first.
File parts such as PDF are not supported on this model; add the document's text as a text part instead. The LLMTR model card also lists structured outputs; for work that extracts fields from an image or a recording, try sending response_format with json_schema on your own samples. The card's data note reads: this model is served through a third-party provider.
| Input | Content part | Format | Price |
|---|---|---|---|
| Image | image_url | base64 data URL or https address | $1.25 / 1M tokens (input) |
| Video | video_url | base64 data URL (data:video/mp4;base64,...) | $1.25 / 1M tokens (input) |
| Audio | input_audio | base64 WAV, format: wav | $1.25 / 1M tokens (input) |
| PDF and other files | file, file_url | not supported | not applicable |
| Answer (reasoning included) | text | content and reasoning_content | $4.25 / 1M tokens (output) |
Send a media file to Muse Spark Open
Prepare an API key, turn the file into base64 and send it to meta/muse-spark-open through https://llmtr.com/v1 with the right content part.
- API key. Create a key under Dashboard > API Keys on llmtr.com and store it in the LLMTR_API_KEY environment variable.
- Turn the file into base64. Prepare a data URL in the form data:image/png;base64,... or data:video/mp4;base64,... for images and video, and plain base64 WAV without a prefix for audio.
- Send the request. Put a text part and an image_url, video_url or input_audio part in the content array, and send the request to https://llmtr.com/v1/chat/completions with meta/muse-spark-open.
Frequently asked questions
How do I send a video to Muse Spark Open?
With a video_url part. Turn the MP4 file into base64, put it in the url field in the form data:video/mp4;base64,... and send the request to https://llmtr.com/v1/chat/completions with meta/muse-spark-open.
Can Muse Spark Open read an audio file?
The model card lists audio input. Send the audio in an input_audio part: base64-encoded WAV in the data field and wav in the format field.
How are images, video and audio billed?
Media tokens are counted inside prompt_tokens and billed at the input price of $1.25 per 1M tokens. Answer and reasoning tokens are billed at the output price of $4.25.