Meta shut down its Llama API in 2026: migrate your app and compare host costs

How to migrate off Meta's shut-down Llama API to Groq, Together AI, AWS Bedrock or self-hosting, with verified July 2026 host costs.

Read time
12 min
Word count
1.8K
Sections
11
FAQs
8
Share
Data pipeline rerouting from a closed API gateway to new cloud hosts
Migrating a Llama app from Meta's closed API to a new inference host.
On this page · 11 sections
  1. What Meta shut down, and what it did not
  2. Your migration options at a glance
  3. What each host charges for Llama 4
  4. The migration itself: most hosts are OpenAI-compatible
  5. Differences that will bite you
  6. Should you self-host instead?
  7. India-specific considerations
  8. A migration checklist
  9. FAQ
  10. How eCorpIT can help
  11. References

Summary. Meta shut down its hosted Llama API on 6 July 2026, and requests to the old endpoint now return a sunset response with redirect guidance. The models are not gone: Llama weights are still downloadable, and Llama 4 Scout and Maverick run on every major inference host. If your app called Meta's endpoint directly, you have a migration on your hands, and it is smaller than it looks, because most hosts speak an OpenAI-compatible API. Verified per-million-token prices as of July 2026: Llama 4 Scout is $0.10 input and $0.30 output on OpenRouter, about $0.13 blended on Groq, and about $0.17 on-demand on AWS Bedrock, while Together AI lists Llama 4 Maverick from $0.27. This guide covers what Meta actually retired, the five real hosting options, what each charges, the code change that moves most apps in an afternoon, and the differences that will break your app if you miss them. It also covers the India-specific question, data residency under the DPDP Act, that decides whether you host abroad or in-country.

What Meta shut down, and what it did not

The shutdown is narrow but real. Meta's official deprecation notice states that the Llama API Public Preview wound down on 6 July 2026, and that Llama models remain available to download and to run through third-party providers. So the thing that stopped working is the first-party hosted endpoint at Meta's domain. Your API key against that endpoint no longer returns completions.

Three facts matter for planning. The Llama weights are still open and downloadable under the Llama Community License, so self-hosting is unaffected. Every serious inference provider already serves Llama 4, so there is somewhere to go. And Meta has shifted its own attention to a proprietary model, Muse Spark, while keeping the existing Llama weights available as open releases rather than a maintained hosted service.

The strategic backdrop explains the timing. Open-weight inference has become a large business in its own right. Together AI closed an $800 million Series C on 1 July 2026 at an $8.3 billion valuation, days before Meta's API sunset, and reported annual bookings above $1.15 billion as open-weight usage grew. Vipul Ved Prakash, co-founder and chief executive of Together AI, put the company's thesis plainly: "Our mission is to ensure that intelligence is abundant, not expensive." When independent hosts run Llama faster and cheaper than the model's own maker, a first-party preview API is the piece that gets cut.

Your migration options at a glance

There are five places a Llama app can land. The right one depends on latency, cost, compliance and how much infrastructure you want to own.

Host Llama models served API style Best for
Groq Llama 4 Scout, Llama 3.3 70B, Llama 3.1 8B OpenAI-compatible Lowest latency, very high tokens per second
Together AI Llama 4 Maverick and Scout, Llama 3.x OpenAI-compatible and native Enterprise: SOC 2 Type II, HIPAA, dedicated capacity
AWS Bedrock Llama 4 Scout and Maverick Bedrock Converse API Teams already on AWS, with IAM and VPC controls
OpenRouter Llama 4 Scout and Maverick, routed OpenAI-compatible One key, automatic multi-provider fallback
Self-host (vLLM) Any downloadable Llama weight Your own gateway Data residency and full control

Groq is the speed play. It runs Llama on custom LPU hardware and, per Artificial Analysis, offers an OpenAI-compatible API where every tracked model supports JSON mode and function calling. Together AI is the enterprise play, with SOC 2 Type II certification, HIPAA compliance, dedicated endpoints and reserved capacity. AWS Bedrock suits teams that want Llama inside their existing AWS account with IAM, VPC and billing already in place. OpenRouter is a router: one key, and it spreads requests across providers for uptime. Self-hosting is for teams that need the weights on their own hardware for data-residency or cost reasons.

What each host charges for Llama 4

Prices move, and the aggregator sites disagree with each other, so the figures below are taken from each provider's own listing or an independent benchmark, dated, and labelled by input, output or blended. Confirm them against the live pricing page before you commit spend.

Model and host Input Output Basis
Llama 4 Scout, OpenRouter $0.10 / 1M $0.30 / 1M OpenRouter model listing
Llama 4 Scout, Groq ~$0.13 / 1M blended Artificial Analysis (7:2:1)
Llama 4 Scout, AWS Bedrock ~$0.17 / 1M on-demand AWS on-demand, US regions
Llama 4 Maverick, Together AI from $0.27 / 1M Together AI listing
Llama 3.1 8B, Groq ~$0.05 / 1M blended Artificial Analysis

Two things stand out. First, Llama 4 Scout is cheap everywhere, in the region of $0.10 to $0.17 per million tokens, because it is a mixture-of-experts model that activates only 17 billion of its 109 billion parameters per token. Second, the spread across hosts is real: Artificial Analysis measured up to a 16x price range across the models a single provider serves, so the host and the exact model you pick matter more than any headline "Llama is cheap" claim. For a structured way to model this against closed APIs, our LLM hybrid routing and API spend framework walks through the cost maths, and the per-token economics of B200 versus H100 cover the self-hosting side.

The migration itself: most hosts are OpenAI-compatible

Here is the part that surprises teams: for Groq, Together AI and OpenRouter, migrating off the Llama API is mostly a change of base URL, key and model string. All three expose an OpenAI-compatible surface, so if you were already using the OpenAI SDK against Meta's compatibility endpoint, the request and response shapes stay the same.


            from openai import OpenAI

# Before: Meta's hosted Llama API (sunset on 6 July 2026)
# client = OpenAI(base_url="https://api.llama.com/compat/v1", api_key=META_KEY)

# After: Groq, OpenAI-compatible
client = OpenAI(
    base_url="https://api.groq.com/openai/v1",
    api_key=GROQ_KEY,
)

resp = client.chat.completions.create(
    model="llama-4-scout-17b-16e-instruct",   # host-specific model id
    messages=[{"role": "user", "content": "Summarise this support ticket."}],
)
          

The base URLs and the one gotcha, model naming, look like this:

Host OpenAI-compatible base URL Migration note
Groq https://api.groq.com/openai/v1 Use Groq's exact Llama model id from its model list
Together AI https://api.together.xyz/v1 Native and OpenAI-compatible routes both work
OpenRouter https://openrouter.ai/api/v1 One key; prefix model ids with meta-llama/
AWS Bedrock Not OpenAI-compatible Use the Bedrock Converse API or an OpenAI-to-Bedrock proxy

The model id is where migrations quietly break. Each host names Llama 4 Scout differently, so a string that worked against Meta's endpoint will 404 against Groq or Together. Read the target host's model list, map every model name your code sends, and keep the mapping in config rather than hard-coded. AWS Bedrock is the exception to the easy path: it does not offer an OpenAI-compatible endpoint, so you either adopt the Bedrock Converse API or put a small translation proxy in front of it.

Differences that will bite you

The transport is compatible. The behaviour around it is not always. Check each of these before you cut over production traffic.

Context window and output caps differ by host, even for the same model. Llama 4 Scout advertises a 10 million token context, but a given provider may cap the usable window or the maximum output tokens well below that, so a prompt that worked on one host can be rejected on another.

Tool calling and JSON mode are not universal. Groq reports that all of its models support function calling and JSON mode, but not every provider does for every model, and the exact schema for forcing JSON can vary. If your app depends on structured output, test it on the target host first.

Rate limits and burst behaviour are per-provider. A migration that passes functional tests can still fail under load if the new host's tier gives you fewer tokens per minute than Meta did. Size the tier against your real peak, not your average.

Safety tooling has to move too. If you relied on Llama Guard for input and output moderation, confirm your new host serves it. Together AI, for example, lists Llama Guard 4 12B alongside the base models, so you can keep the same moderation layer rather than rebuilding it.

Should you self-host instead?

For some teams the sunset is the prompt to stop renting inference. Because the weights are open, you can run Llama on your own GPUs with a serving stack like vLLM, expose your own endpoint, and pay only for infrastructure. That buys full control and data residency, at the cost of running the platform yourself. Our guide to local LLM production with vLLM, Ollama and LM Studio covers the serving choices, and Meta's own enterprise Llama compute options sit alongside them.

The economics are a crossover, not a slam dunk. Serverless hosts at $0.10 to $0.17 per million tokens are almost always cheaper until your volume is high and steady enough to keep a reserved GPU busy. Self-hosting wins when utilisation is high, when data cannot leave your environment, or when you need a model version or fine-tune no host offers. Below that line, a managed host is cheaper and far less work. The honest rule: self-host for control and compliance, not to shave cents off a low-volume bill.

India-specific considerations

For Indian teams the deciding factor is usually not price, it is where the data sits. AWS Bedrock serves Llama 4 from US East (N. Virginia) and US West (Oregon), with US East (Ohio) via cross-region inference, and no India region for these models at launch. If your workload processes personal data governed by the Digital Personal Data Protection Act 2023, routing it to a US region is a decision you have to make deliberately, with consent and contracts to match.

Two paths keep the data in India. Self-host Llama on an Indian cloud region or on-premises GPUs, which puts you in full control of residency. Or pick a provider that offers an India region and a data-processing agreement that satisfies your DPDP obligations. The per-token cost difference between hosts, a few cents per million tokens, is trivial next to the compliance cost of getting residency wrong. For the closed-model comparison that often runs in parallel with this decision, see how the current frontier models stack up.

A migration checklist

Work through these in order and the cutover is dull, which is the goal. Inventory every call site that points at the old Llama API base URL, and every model string you send. Choose a target host against four axes: OpenAI compatibility, price at your real token volume, latency, and data residency. Swap the base URL and key, then map each model name to the host's exact id. Re-test tool calling, JSON mode, context limits and streaming on the new host. Load-test against your peak, not your average. Keep a fallback: a router like OpenRouter, or a second configured host, so a single provider outage does not take you down. The failure we see most often is a hard-coded model string with no fallback, so a provider rename or outage becomes an incident. Build the config and the fallback before you cut over.

FAQ

How eCorpIT can help

eCorpIT migrates production LLM workloads off deprecated endpoints and onto the right host for each team, whether that is a managed provider like Groq or Together AI, AWS Bedrock inside your account, or a self-hosted vLLM stack for data residency. Our senior engineering teams are CMMI Level 5 and ISO 27001:2022 certified, and we design deployments aligned with DPDP requirements. If the Llama API sunset left you scrambling, talk to our engineering team or see our LLM migration and cost-optimization service.

References

  1. Upcoming changes to Llama API, Meta, Llama API deprecation notice (sunset 6 July 2026).
  1. Meta's Llama 4 models now available on AWS, About Amazon.
  1. Llama 4 Maverick 17B Instruct, Amazon Bedrock model card, AWS documentation.
  1. Meta's Llama 4 now available fully managed in Amazon Bedrock, AWS what's new.
  1. Llama 4 Scout, API pricing and benchmarks, OpenRouter.
  1. Groq, intelligence, performance and price analysis, Artificial Analysis.
  1. Meta models on Together AI, Together AI.
  1. Together AI raises $800M at $8.3B valuation as enterprises move to open models, Tech Funding News, July 2026.
  1. Meta abandons open-source Llama for proprietary Muse Spark, The New Stack.
  1. Meta Llama API key and developer console, Meta.
  1. Amazon Bedrock pricing in 2026, CloudZero.

_Last updated: 31 July 2026._

Frequently asked

Quick answers.

01 When did Meta shut down the Llama API?
Meta's hosted Llama API Public Preview wound down on 6 July 2026, and requests now return a sunset response with redirect guidance, per Meta's official deprecation notice. The models themselves are not gone. Llama weights remain downloadable under the Llama Community License, and every major inference host still serves Llama 4 Scout and Maverick.
02 Do I need to rewrite my app to migrate?
For most hosts, no. Groq, Together AI and OpenRouter all expose an OpenAI-compatible API, so migrating is mainly a change of base URL, API key and model id. AWS Bedrock is the exception: it uses the Bedrock Converse API rather than an OpenAI-compatible endpoint, so you adopt that API or run a small translation proxy in front of it.
03 What does Llama 4 Scout cost after migration?
As of July 2026, Llama 4 Scout is about $0.10 input and $0.30 output per million tokens on OpenRouter, roughly $0.13 blended on Groq, and about $0.17 on-demand on AWS Bedrock. Together AI lists Llama 4 Maverick from $0.27. Confirm each figure on the provider's pricing page before committing.
04 Which host is best for enterprise workloads?
Together AI targets enterprise directly, with SOC 2 Type II certification, HIPAA compliance, dedicated endpoints and reserved capacity. AWS Bedrock suits teams already on AWS who want Llama inside their account with IAM, VPC and consolidated billing. Both run Llama 4 as fully managed services, so you avoid operating the inference stack yourself.
05 Can I keep using Llama without any provider?
Yes. The Llama weights are open and downloadable under the Llama Community License, so you can self-host on your own GPUs with a serving stack like vLLM and expose your own endpoint. You pay only for infrastructure and gain full control and data residency, at the cost of running the platform, which pays off at high, steady utilisation.
06 Is Groq really OpenAI-compatible?
Yes. Per Artificial Analysis, Groq offers an OpenAI-compatible API, and all of its tracked models support JSON mode and function calling. In practice you point the OpenAI SDK at Groq's base URL, swap the API key, and change the model string to Groq's Llama identifier. Test structured output and tool calling before moving production traffic.
07 Why did Meta shut the API down?
Meta wound down the first-party hosted preview and shifted its own focus to a proprietary model, Muse Spark, while keeping the existing Llama weights available as open releases. Independent hosts already run Llama faster and cheaper than a first-party preview, so the hosted endpoint was the piece Meta chose to retire rather than the models.
08 What about data residency in India?
AWS Bedrock serves Llama 4 from US regions only at launch, with no India region for these models. For data governed by the DPDP Act 2023, either self-host Llama on an Indian region or on-premises, or choose a provider with an India region and a data-processing agreement. The per-token saving from any host is trivial next to a residency mistake.

About the author

Manu Shukla

Founder & Director

Founder of eCorpIT. Hands-on engineer leading senior-only delivery for AI apps, custom software, and cloud systems for global clients.

Subscribe

One engineering note a week. No fluff, no spam.

Senior-architect playbooks on AI agents, mobile apps, cloud, security, data, and marketing — delivered every Wednesday.

Past the reading

Read enough. Let's build something.

A senior architect responds in 24 working hours with scope, indicative cost, and a timeline. NDA before any technical conversation.