AI Engineering2026-07-259 min read

Meta Model API Tutorial: How to Get Started with Muse Spark 1.1 (Pricing, Setup, First Agent)

A hands-on Meta Model API guide: Muse Spark 1.1 pricing at $1.25/$4.25 per million tokens, OpenAI- and Anthropic-compatible endpoints, working Python setup code, and an honest look at what the public preview is missing.

Varun Raj Manoharan
Varun Raj Manoharan
Muse SparkMeta Model APIMeta AIAgentsCost OptimizationPython

Meta Superintelligence Labs shipped Muse Spark 1.1 on July 9 alongside something the company had never offered before: a paid developer API. The Meta Model API is in public preview for US developers, with a waitlist for everyone else, and it arrived at $1.25 per million input tokens and $4.25 per million output tokens — roughly a quarter of what the comparable Anthropic and OpenAI tiers charge.

We've spent the past two weeks running it in real pipelines. This post is the getting-started guide I wanted on day one: how to connect, what the pricing actually buys, where it fits, and what the public preview is still missing. Later posts in this series cover the computer-use and subagent-delegation capabilities in depth.

Connecting to the Meta Model API

The nice surprise is that there's no new SDK to learn. Meta shipped both OpenAI-compatible and Anthropic-compatible request formats, so whichever client library your codebase already uses, the integration is a base URL and a model name:

Python
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["META_API_KEY"],
    base_url=os.environ["META_MODEL_API_BASE_URL"],  # from the Meta Model API console
)

response = client.chat.completions.create(
    model="muse-spark-1.1",
    messages=[{"role": "user", "content": "Summarize this changelog for a release note."}],
    tools=tools,
)

Tool and function calling work, structured output works, and multimodal inputs work. New API accounts get $20 in free credits, which at these rates is a genuinely useful amount of evaluation budget rather than a token gesture. At $1.25 per million input tokens, twenty dollars buys roughly 16 million input tokens of testing. You can run a real eval suite on the free tier, which is not something I can say about most previews.

I'd suggest reading the base URL from an environment variable rather than hardcoding it. Public-preview endpoints move, and the docs are thin enough right now (more on that below) that you want the swap to be a config change.

What the pricing actually means

Put the current agentic tier side by side and the position is obvious:

ModelInput / output per MTok
Muse Spark 1.1$1.25 / $4.25
Grok 4.5$2 / $6
Claude Sonnet 5$3 / $15
Claude Opus 5$5 / $25
Claude Fable 5$10 / $50

Output tokens are where agent workloads actually spend, and that's where the gap widens. An agent loop generating 500K output tokens a day costs about $2.13 on Muse Spark, $3 on Grok 4.5, and $12.50 on Opus 5. Over a month of production traffic that difference funds a headcount.

The caveat every honest comparison needs: cheap tokens don't equal cheap outcomes. A model that needs three attempts where another needs one isn't cheaper, and a model that fails silently on hour six of an overnight run costs you an engineer's morning. We'll get to where Muse Spark lands on that in the comparison post. For evaluation purposes, though, the price makes the experiment nearly free, which is the point.

The 1M context window, actively managed

Muse Spark 1.1 carries a 1M-token context window, matching the current Claude and Grok generations. What Meta emphasizes is that the model was trained to manage that window rather than just tolerate it — planning mode, goal conditioning, and context compaction are described as trained behaviors rather than harness features you bolt on.

In practice this showed up in our long-running tests as fewer of the classic mid-run failures: the model kept referring back to constraints stated in the opening message rather than drifting toward whatever was most recent. It's the same architectural bet the rest of the frontier is making, and the fact that a model at a quarter of the price is making it is the newsworthy part.

First agent: keep the loop boring

Because the endpoint is OpenAI-compatible, the standard agent loop needs no adaptation:

Python
messages = [{"role": "user", "content": TASK}]

while True:
    response = client.chat.completions.create(
        model="muse-spark-1.1",
        messages=messages,
        tools=tools,
    )
    msg = response.choices[0].message
    messages.append(msg)

    if not msg.tool_calls:
        break

    for call in msg.tool_calls:
        result = execute_tool(call.function.name, json.loads(call.function.arguments))
        messages.append({
            "role": "tool",
            "tool_call_id": call.id,
            "content": json.dumps(result),
        })

If you already have a harness with tool execution, retries, and transcript logging behind an interface, adding Muse Spark is a config entry. This is the third time this month I've made that observation about a new model, and it keeps being the highest-leverage architectural advice I can give anyone building on LLMs: abstract the provider, and launch weeks become experiments instead of projects.

What the preview is missing

Being straight about this, because several independent write-ups have noted the same thing. The documentation is sparse. There's no detailed model card, and some core specs have no official, precise confirmation — you end up triangulating from Meta's announcement, third-party listings, and your own measurements. For a public preview from a company of Meta's size, it's thinner than you'd expect.

Practical consequences for anyone evaluating right now:

  • Measure, don't assume. Token counting, latency percentiles, and rate limits are things you should establish empirically on your own workloads rather than reading off a spec sheet that doesn't exist yet.
  • Availability is US-first. If your team or infrastructure is elsewhere, you're on the waitlist, which matters for planning.
  • Preview means preview. Pin what you can, expect the surface to move, and don't put it on a critical path with no fallback.

Where we've put it

After two weeks, Muse Spark 1.1 has earned a place in our stack for high-volume bounded work, where the price difference compounds and the failure modes are cheap to catch: bulk classification, first-draft generation ahead of a stronger reviewer, and the computer-use workflows covered in the next post. It has not displaced Claude Opus 5 for unattended long-horizon runs or instruction-dense extraction, for reasons worth their own post.

The broader read: Meta shipping a paid developer API at all is the story here, not just this model. The frontier now has four vendors competing on agentic capability, and one of them just set the price floor considerably lower. Spend the $20 in credits. The experiment costs you an afternoon.

Available for new projects

Let's build something great.

Have a project in mind? We are an elite software and AI development studio ready to bring your ideas to production. Let's talk about your roadmap.