Independent/Reader-funded/Infrastructure, not tokens
DeAINEWS

AI you control — open models, private inference, and the networks that run them.

Open-Weights Releases

How to Run Llama 4 (Maverick & Scout) via API in 2026 — License Traps

Run Llama 4 Maverick or Scout through any OpenAI-compatible API — plus the two license traps to check first: the 700M MAU clause and EU multimodal carve-out.

DeAI is powered by Morpheus (mor.org). We cover competing providers on the same terms — see our methodology.

How to Run Llama 4 (Maverick & Scout) via API in 2026 — License Traps Illustration: DeAI
How to Run Llama 4 (Maverick & Scout) via API in 2026 — License Traps Illustration: DeAI

You can run Llama 4 Maverick or Scout through almost any hosted inference provider by swapping the base URL and model ID of an OpenAI-compatible client; no Meta sign-up required. The real gate is legal: Meta's community license includes a 700 million monthly-active-user clause and an EU multimodal carve-out that decide whether you may build on it at all.

Key takeaways

  • Both Llama 4 models are mixture-of-experts with 17B active parameters per token: Maverick totals roughly 400B parameters across 128 experts; Scout totals roughly 109B across 16 experts.
  • The 700M MAU clause forces companies above 700 million monthly active users to negotiate a separate license with Meta; everyone below that line uses the standard community license.
  • The EU carve-out withholds rights to Llama 4's multimodal models from EU-domiciled builders, and both Maverick and Scout are natively multimodal, so text-only usage does not obviously escape it.
  • Integration is provider-agnostic: nearly every Llama 4 host exposes an OpenAI-compatible /v1/chat/completions endpoint, so switching providers is a two-line change.
  • Scout's model card lists a 10M-token context window, but most hosted providers serve far less. Verify the actual context limit before architecting around it.

What are Llama 4 Maverick and Scout?

Meta released the first Llama 4 models in April 2025: two natively multimodal (image-plus-text in, text out) mixture-of-experts models. Maverick is the larger one (17B active parameters, roughly 400B total, 128 experts), built for general-purpose chat, coding, and image understanding. Scout (17B active, roughly 109B total, 16 experts) is the efficiency play: Meta says it was designed to fit on a single datacenter-class GPU, and its model card lists a 10M-token context length (Maverick's card lists 1M tokens).

Both are distributed as downloadable weights through llama.com and Hugging Face behind a license acceptance gate, and both are served as managed APIs by a long list of third-party providers. That second route is what this guide covers.

The two Llama 4 license traps (and the fine print)

Llama 4 is open-weight, not open source. The distinction matters because Meta's community license attaches conditions that a true open-source license cannot. DeAI's explainer on open-weight vs. open-source licensing covers the general picture; here are the Llama 4-specific traps.

What is the Llama 4 license 700M MAU clause?

The Llama 4 Community License says, in substance: if the products or services made available by you or your affiliates had more than 700 million monthly active users in the month preceding the Llama 4 version release date, you must request a license from Meta, which Meta may grant or decline.

Practically, this touches only a handful of platform-scale companies. But two edge cases deserve attention:

  • Affiliates count. If you are acquired by a company whose products exceed the threshold, expect the acquirer's counsel to re-examine your Llama 4 usage during due diligence.
  • The test is pegged to the release date of the Llama version you use, per the license text, so read the current wording rather than assuming your growth trajectory is irrelevant.

For a typical startup or enterprise team, the clause is a non-issue. Document it, note it in your compliance file, and move on.

What is the Llama 4 EU multimodal restriction?

This is the trap that actually bites. The license provides that, with respect to Llama 4's multimodal models, the usage rights are not granted to individuals domiciled in, or companies with a principal place of business in, the European Union. A carve-out within the carve-out exempts end users of a product or service that incorporates the models.

The practical reading, widely adopted since release:

  • An EU consumer can use an app powered by Maverick. A company headquartered in the EU building that app is not licensed to use the model.
  • Because both Maverick and Scout are multimodal models, restricting yourself to text-only prompts does not clearly remove you from scope. The restriction attaches to the model, not the modality you happen to call.

Meta has publicly pointed to European regulatory uncertainty as its rationale. Many EU-domiciled teams respond by choosing models without the carve-out rather than structuring around it. This is a legal judgment call, so involve counsel before you build a product on a model your entity may not be licensed to touch.

Attribution, naming, and the acceptable use policy

Three more obligations builders routinely miss: products built on Llama 4 must display "Built with Llama"; derivative models you distribute must carry names beginning with "Llama"; and all use is subject to Meta's Acceptable Use Policy, which you must pass through to downstream users. None of these are onerous, but they are conditions of the license, not suggestions.

How to run Llama 4 via API, step by step

1. Confirm your license position

Before writing code: under 700M MAU (including affiliates)? Not EU-domiciled (or have a legal opinion saying you're clear)? Comfortable with the attribution and AUP terms? If yes on all counts, proceed.

2. Choose a serving route

As of this writing (August 2026), Llama 4 Maverick and Scout are available across four categories of providers:

  • Hyperscalers: AWS Bedrock, Azure AI Foundry, Google Cloud Vertex AI. Convenient if your data and compliance perimeter already lives there.
  • Specialist inference clouds: Together AI, Fireworks AI, Groq, Deep Infra, SambaNova, Cerebras, Cloudflare Workers AI, and similar GPU-cloud APIs.
  • Aggregators: OpenRouter and peers, which expose multiple backends behind one key and simplify failover.
  • Decentralized networks: Morpheus, a decentralized inference marketplace, routes requests to independent operators and can be evaluated on the same criteria as any hosted provider.

Compare candidates on identical criteria: the exact model ID served, the context window actually exposed (frequently far below the model card's number), tool-calling and structured-output support, region availability, retention policy, and published pricing. Treat privacy claims (zero-retention promises, "operators can't see prompts") as policy statements by each provider, not independently verified guarantees. Output behavior also varies by serving stack; DeAI's refusal-index methodology scores how often a deployment declines benign prompts, and results will appear on the model pages as they are published.

3. Get a key and find the exact model ID

Model identifiers differ per provider: one may use meta-llama/Llama-4-Maverick-17B-128E-Instruct, another a shorter slug. Copy the exact string from the provider's docs; a wrong ID is the most common cause of first-call 404s.

4. Make the call (OpenAI-compatible)

Python:

from openai import OpenAI

client = OpenAI(
    base_url="https://api.your-provider.example/v1",  # provider's endpoint
    api_key="YOUR_PROVIDER_KEY",
)

resp = client.chat.completions.create(
    model="meta-llama/Llama-4-Maverick-17B-128E-Instruct",  # exact ID varies by provider
    messages=[
        {"role": "system", "content": "You are a concise assistant."},
        {"role": "user", "content": "Summarize mixture-of-experts routing in two sentences."},
    ],
    temperature=0.3,
)

print(resp.choices[0].message.content)

curl:

curl https://api.your-provider.example/v1/chat/completions \
  -H "Authorization: Bearer $PROVIDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "meta-llama/Llama-4-Scout-17B-16E-Instruct",
    "messages": [
      {"role": "user", "content": "Summarize mixture-of-experts routing in two sentences."}
    ]
  }'

For image input, use the standard OpenAI multimodal message shape (image_url content parts). Most Llama 4 hosts support it, but confirm per provider.

5. Build in portability

Because the interface is uniform, keep the base URL, key, and model ID in configuration. That gives you a same-day failover path to a second provider or an aggregator: cheap insurance against capacity crunches and deprecations.

Should you self-host Llama 4 instead?

If you have steady, high-volume traffic or hard data-residency requirements, self-hosting is worth pricing out. Scout is the realistic candidate: Meta says it fits on a single datacenter-class GPU, and vLLM, SGLang, or TensorRT-LLM all serve it with an OpenAI-compatible front end. Maverick's roughly 400B total parameters demand a multi-GPU node and real operational maturity. Downloading weights from llama.com or Hugging Face means accepting the same community license; self-hosting changes your infrastructure, not your legal position.

How much does the Llama 4 Maverick API cost?

There is no single answer, and any article quoting one number is quoting one provider's rate card on one day. What holds generally: hosted Llama 4 access is billed per million tokens, input tokens are usually priced below output tokens, and rates for open-weight models of this class are typically a fraction of frontier proprietary API pricing. Aggregator listings make cross-provider comparison easy, and provider pricing pages are the authoritative source. Check them at the time you commit, and watch for context-window tiers and batch discounts.

FAQ

What is the Llama 4 license 700M MAU clause?

If the products or services made available by you or your affiliates had more than 700 million monthly active users in the month before the Llama 4 version release date, you must request a separate license from Meta instead of using the standard community license. Below the threshold, it has no practical effect.

What is the Llama 4 EU multimodal restriction?

The Llama 4 Community License does not grant rights to its multimodal models to individuals domiciled in, or companies with a principal place of business in, the EU. End users of products built on those models are exempt. Since both Maverick and Scout are multimodal, EU-domiciled builders should get legal advice before using either.

How much does the Llama 4 Maverick API cost?

There is no single rate: each provider sets its own per-token pricing, typically a fraction of frontier proprietary API pricing. Compare current figures on provider pricing pages or an aggregator such as OpenRouter before committing.

Is Llama 4 open source?

No. Llama 4 is open-weight: the weights are downloadable, but the license adds restrictions (the 700M MAU clause, the EU multimodal carve-out, attribution duties), so it fails the Open Source Initiative's definition of open source.

Questions

What is the Llama 4 license 700M MAU clause?
If the products or services made available by you or your affiliates had more than 700 million monthly active users in the month before the Llama 4 version release date, you must request a separate license from Meta instead of using the standard community license.
What is the Llama 4 EU multimodal restriction?
The Llama 4 Community License does not grant rights to its multimodal models to individuals domiciled in, or companies with a principal place of business in, the EU. End users of products built on those models are exempt from the restriction.
How much does the Llama 4 Maverick API cost?
There is no single rate: each provider sets its own per-token pricing, typically a fraction of frontier proprietary API pricing. Compare current figures on provider pricing pages or an aggregator such as OpenRouter before committing.
Is Llama 4 open source?
No. Llama 4 is open-weight: the weights are downloadable, but the license adds restrictions (the 700M MAU clause, the EU multimodal carve-out, attribution duties), so it fails the Open Source Initiative's definition of open source.

Sources

  1. Llama 4 Maverick 17B-128E-Instruct model card — Meta / Hugging Face
  2. Llama 4 Scout 17B-16E-Instruct model card — Meta / Hugging Face
  3. Llama 4 — official site, downloads, and license — Meta
  4. llama-models repository (Llama 4 license text and model code) — Meta

About DeAI

DeAI is an independent publication covering open-weight AI models, private inference, and decentralized infrastructure — the tools for running AI you actually control. We test providers on price, privacy, and refusal behavior and publish the numbers, not the vibes. DeAI is powered by Morpheus (mor.org), a decentralized inference marketplace, and covers it on the same terms as every other provider.

Powered by Morpheus and StrandCMS

Morpheus is a decentralized inference marketplace, covered on the same terms as every other provider — we rank it wherever the data lands. StrandCMS is the open-source, agent-first framework this site is built on.

Learn more about the Morpheus Inference API →

Sponsor disclosure — not editorial

Powered by Morpheus and StrandCMS. Morpheus is a decentralized inference marketplace, covered on the same terms as every other provider. StrandCMS is the open-source, agent-first framework this site is built on.

Learn more →