Integration guides · 2026-10-17
Muse Spark Open API: OpenAI SDK usage and pricing
Call Meta's Muse Spark Open as meta/muse-spark-open through an OpenAI-compatible API: 1,048,576-token context, four reasoning levels and pricing.
Short answer: model id meta/muse-spark-open, base URL https://llmtr.com/v1
LLMTR (llmtr.com) is a gateway that gives access to language models from many providers through one OpenAI-compatible API. You call Meta's Muse Spark Open there with the model id meta/muse-spark-open on the /v1/chat/completions endpoint at https://llmtr.com/v1. In an existing OpenAI client, only the base_url, the API key and the model name change.
Meta released Muse Spark Open as an open-weight model on 15 October 2026 under the Muse Model License. According to Meta's announcement and model card, it is a mixture-of-experts (MoE) model with 816 billion parameters in total and about 42 billion active per token, trained for coding and agentic work: it reads a codebase, writes and debugs code, and calls tools in multi-step workflows. It accepts image, video and audio input alongside text and produces text. On LLMTR the context window is 1,048,576 tokens.
How do you use the Muse Spark Open API?
Create an API key on LLMTR, set the OpenAI client's base_url to https://llmtr.com/v1 and pass meta/muse-spark-open as the model. The Python example below asks for the bug in a short function and sends reasoning_effort as medium. The answer arrives in content, the model's reasoning trace in reasoning_content and the token counts in usage. The path is the same for applications that use Node.js, Go or curl: the request body is in the OpenAI Chat Completions format.
The model reasons before every answer. Reasoning tokens are counted inside completion_tokens, billed at the output price and taken from the max_tokens budget, so keep the budget at a few thousand tokens even when you expect a short reply. A response whose finish_reason is length is incomplete: raise max_tokens or pick a lower level. For streaming, send stream: true; with include_usage: true inside stream_options, usage arrives in the last chunk, and the reasoning trace streams in delta.reasoning_content.
A meta/muse-spark-open call with the OpenAI Python SDK that prints the answer, the reasoning trace and the token usage separately.
import os
from openai import OpenAI
client = OpenAI(base_url="https://llmtr.com/v1", api_key=os.environ["LLMTR_API_KEY"])
response = client.chat.completions.create(
model="meta/muse-spark-open",
messages=[
{"role": "system", "content": "You are a senior software engineer."},
{"role": "user", "content": "Find the bug and suggest a fix: def mean(xs): return sum(xs) / len(xs) - 1"},
],
reasoning_effort="medium",
max_tokens=4096,
)
message = response.choices[0].message
print(message.content)
print(getattr(message, "reasoning_content", None))
print(response.usage)
Muse Spark Open pricing, context and capabilities
Per 1M tokens the price is $1.25 for input, $0.15 for input read from cache and $4.25 for output. Image, video and audio tokens are counted inside prompt_tokens and billed at the input price. Each request is deducted from your balance at the catalog price in effect when it is processed.
A worked example: a 20,000-token prompt with 15,000 tokens read from cache, and a 3,000-token response with the reasoning included. The cost is (5,000 x $1.25 + 15,000 x $0.15 + 3,000 x $4.25) / 1M = $0.02125. Had the prompt missed the cache entirely, the input side alone would have been 20,000 x $1.25 / 1M = $0.025. In agent loops that resend a long, fixed system prompt on every turn, this difference grows with the number of turns.
The LLMTR model card lists tool calling, JSON mode, structured outputs and prompt caching. The card's data note reads: this model is served through a third-party provider.
| Property | Value |
|---|---|
| Model id | meta/muse-spark-open |
| Endpoint | /v1/chat/completions |
| Context window | 1,048,576 tokens |
| Input | text, image, video, audio |
| Output | text |
| reasoning_effort | low, medium, high, xhigh |
| Input price | $1.25 / 1M tokens |
| Input read from cache | $0.15 / 1M tokens |
| Output price (reasoning included) | $4.25 / 1M tokens |
Reasoning level: four options, no off switch
The reasoning_effort field takes low, medium, high and xhigh. You can also give the same level as a suffix on the model id, such as meta/muse-spark-open:low. If you send no level, the request goes out without one and the model reasons at its own default, a high effort; Meta's model card names that default as xhigh. Send low or medium for shorter, cheaper replies.
A max value is applied as xhigh. none and minimal return 400 invalid_request, and the error message lists the four accepted levels. Reasoning cannot be turned off: sending "reasoning": false or "reasoning": {"enabled": false} also returns 400, and the message suggests low for the least reasoning. include_reasoning is not supported on this model, so do not rely on it to hide the trace. How to pick a level and what it does to the bill is covered in a separate article in this series.
Tool calling and JSON output
The model card lists tool calling. Send the tools array in the standard OpenAI format; when the model wants to call a tool, the response carries a tool_calls field. Run the tool in your own code, return its result in a role: tool message, and the model completes its answer. On this model LLMTR accepts every form of tool_choice: auto, required, none and a named function.
For JSON, set response_format to json_object, or to json_schema with a schema; the LLMTR model card also lists JSON mode and structured outputs. The curl request below defines a tool named get_weather, leaves the decision to the model and keeps reasoning at low, which suits short decisions such as whether to call a tool.
A curl request that defines the get_weather tool and sends tool_choice auto.
curl https://llmtr.com/v1/chat/completions \
-H "Authorization: Bearer $LLMTR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "meta/muse-spark-open",
"reasoning_effort": "low",
"max_tokens": 2048,
"messages": [
{"role": "user", "content": "What is the weather in Istanbul right now?"}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather for a city",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"]
}
}
}
],
"tool_choice": "auto"
}'
Common errors and first steps
File parts such as PDF are not supported on this model; add the document's text to the request as a text part instead. The prompt and max_tokens both count against the context window: with a large prompt, do not set max_tokens to the whole window, because a request whose total exceeds 1,048,576 tokens is rejected. Repeated prompt prefixes can be cached, and the number of tokens read from cache arrives in usage.prompt_tokens_details.cached_tokens. A hit is not guaranteed, so keep a long, fixed system prompt identical across requests.
To get started, create an account at llmtr.com, top up your balance under Dashboard > Billing and create a key under Dashboard > API Keys. The raw key is shown only once, so store it in the LLMTR_API_KEY environment variable. The same key works for the other models in the catalog.
Call Muse Spark Open through LLMTR
Create an account, top up your balance, create an API key and send the first request to https://llmtr.com/v1 with meta/muse-spark-open.
- Account and balance. Create an account at llmtr.com and top up your balance under Dashboard > Billing.
- API key. Create a key under Dashboard > API Keys and store it in the LLMTR_API_KEY environment variable.
- First request. In an OpenAI-compatible SDK, set base_url to https://llmtr.com/v1, pass meta/muse-spark-open as the model and send the first request with reasoning_effort.
Frequently asked questions
How much does the Muse Spark Open API cost?
On LLMTR, per 1M tokens: $1.25 input, $0.15 input read from cache and $4.25 output. Reasoning tokens are counted inside completion_tokens and billed at the output price.
Can I use Muse Spark Open with the OpenAI SDK?
Yes. Set base_url to https://llmtr.com/v1, use your LLMTR key as the API key and pass meta/muse-spark-open as the model. Requests go to the /v1/chat/completions endpoint.
Can reasoning be turned off on Muse Spark Open?
No. The model reasons before every answer; none, minimal and reasoning: false return 400. For the least reasoning, set reasoning_effort to low.