Skip to content

Llama 4 Maverick API

1M context · Released Apr 5, 2025 · By Meta · Llama 4 Community

Llama 4 Maverick costs $0.14 per million input tokens and $0.52 per million output tokens, against an official rate of $0.22 and $0.85 — 39% below official pricing. It is a Meta model under the Llama 4 Community licence, with a 1M context window, callable through an OpenAI-compatible endpoint with the model id meta-llama/llama-4-maverick. On an agent or chat workload that resends a fixed prompt prefix, where that prefix is billed at the cached rate of $0.028 per million, the saving reaches 65%. This model is listed for reference and is not currently served by an upstream provider, so requests for it return no available channel.

Not currently available. No configured upstream serves this model, so a request for it returns no available channel. The rate below is what it will cost when it is enabled.

Input

$0.14/M

$0.22/M

Output

$0.52/M

$0.85/M

Savings

39%

off official

  • No markup
  • OpenAI SDK compatible
  • No minimum spend
  • Llama 4 Community

A million tokens of context and native multimodal input. The pragmatic pick when your bottleneck is how much you can stuff into one call.

Copy this and go

The model id is already filled in. Nothing in this snippet needs editing except your key.

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://router.xark.io/api/v1"   # ← the only line that changes
)

response = client.chat.completions.create(
    model="meta-llama/llama-4-maverick",
    messages=[{"role": "user", "content": "Hello"}]
)
Llama 4 Maverick: our rate against Meta's own
The official rate is the one the model's own publisher charges, and it is the only benchmark this page claims to beat. Llama 4 Maverick is $0.52 per 1M tokens on output. That is 39% below the model publisher's own rate.Our published rates, read from the same table the API bills from.

Llama 4 Maverick pricing across providers

Rates as published by each provider. We update these when they change; if you spot one that's stale, tell us and we'll fix it.

ProviderInputOutput
AI Token Router$0.14/M$0.52/M
Official (Meta)$0.22/M$0.85/M
OpenRouter$0.21/M$0.82/M
DeepInfra$0.17/M$0.60/M
Together AI$0.20/M$0.80/M

Cached input on Llama 4 Maverick is billed at $0.028/M — roughly 80% below the standard input rate. For agent loops with a large fixed system prompt this is usually the number that matters most.

What it's good at

  • Very long document and transcript processing
  • Image + text understanding
  • Migrations off Llama 3.x with no prompt rewrite
Full technical documentation

Related

Other text models

Llama 4 Maverick questions

Every figure below is read from the same catalogue entry as the table above, so the two cannot disagree.

What does Llama 4 Maverick cost on AI Token Router, and what is the official rate?

Input is $0.14/M here against $0.22/M official, and output is $0.52/M against $0.85/M official — $0.080/M off every million input tokens and $0.33/M off every million output tokens. The headline 39% blends the two, weighted three to one towards output, because real workloads write far more than they read and a flat average of the two percentages would overstate what you actually save. Both figures are printed side by side on this page: the official rate is the only benchmark that makes ours mean anything.

Can I call Llama 4 Maverick right now?

No. Llama 4 Maverick is catalogued but not currently servable — no configured upstream provider carries it, so a request naming meta-llama/llama-4-maverick returns no available channel instead of a result. The rate on this page is what it will cost once an upstream serves it, not something you can spend today. The text models you can call today are Kimi K2.6, Kimi K3, GLM-5.2, DeepSeek V4 Pro and DeepSeek V4 Flash. 7 of the 24 catalogued models are callable, and every page says which it is.

Does Llama 4 Maverick support prompt caching, and what does a cached token cost?

Yes. A repeated prefix — a fixed system prompt, a tool schema, a document you keep querying — is served from the model's KV cache and billed at $0.028/M instead of the standard $0.14/M, which is 80% below the input rate. Meta's own cached rate is $0.044/M, so the discount applies on top of a rate that is already below official. Nothing has to be set on the request; the prefix is matched automatically. On an agent loop, where most of every request is unchanged from the last one, this is usually the largest single line on the bill.

How do I call Llama 4 Maverick from my code?

Point an OpenAI SDK at https://router.xark.io/api/v1 and pass model="meta-llama/llama-4-maverick" — the chat completions endpoint is https://router.xark.io/api/v1/chat/completions. Request shape, streaming frames, the usage block and the error envelope all match what your OpenAI client already handles, so the base URL and the model id are the only two lines that change. The bare name llama-4-maverick, without the provider prefix, resolves to the same model. An integration written before the ids were namespaced therefore keeps working.

How large is Llama 4 Maverick's context window?

1M — 1,048,576 tokens in a single request, shared between everything you send and everything the model generates back. That is the largest context window of any text model in this catalogue. Context is billed like any other input: filling the window costs the input rate on every token in it, every turn, which is why the cached-input rate matters more than the window size on a workload that resends the same prefix.

What licence is Llama 4 Maverick under, and can I use it commercially?

Llama 4 Maverick is published by Meta under the Llama 4 Community licence. That is Meta's own licence rather than a standard open-source text, so what it permits is set by the document and not by anything inferable from its name. What we can state: it allows third-party hosting, which is the condition for a model appearing in this catalogue at all — we do not resell access to closed-weight models. Conditions such as user thresholds, attribution requirements or acceptable-use terms are common in licences of this kind, so read Meta's text before you ship.

How does Llama 4 Maverick pricing here compare with other providers carrying it?

Of the 3 other providers we track carrying Llama 4 Maverick, the lowest is DeepInfra at $0.17/M input and $0.60/M output, against our $0.14/M input and $0.52/M output. That is where the rates stood when we last reconciled them, and it can change without notice — we are not claiming to be the cheapest source for this model, only that our rate sits below Meta's official $0.22/M. If you find one of these figures stale, tell us and we will correct it.

What is Llama 4 Maverick actually good at?

A million tokens of context and native multimodal input. The pragmatic pick when your bottleneck is how much you can stuff into one call. In practice that points at very long document and transcript processing, image + text understanding and migrations off Llama 3.x with no prompt rewrite. The specifics that actually decide a fit — the rate, the licence and what it will and will not serve today — are all on this page rather than behind a sales conversation.

Start using Llama 4 Maverick today

$5 in free credits, no credit card required.