Llama (Meta) api
★★★★★ 4.7 CE

Llama (Meta) API: Access, Rate Limits & SDKs 2026

Meta's Llama API is a Meta-hosted, OpenAI-compatible preview. The same open weights also run on any cloud, self-hosted, or via Llama Stack.

Llama (Meta) API verdict

Verified today·7 sources checked

Meta's Llama API is a Meta-hosted, OpenAI-compatible service in preview.

A bearer LLAMA_API_KEY plus the base URL https://api.llama.com/v1, or /compat/v1 for the OpenAI client, reaches Llama-4-Maverick and Scout, which take text and image at a 128k context, and the Llama-3.3 models. It covers chat completion, image understanding, JSON structured output, tool calling, a moderation safety model and fine-tuning, with Meta-maintained Python and TypeScript SDKs alongside the OpenAI client.

How to build on it

Llama's API story is openness with options. Meta's own preview Llama API is the quickest start, with a bearer key, an OpenAI-compatible base URL and Meta SDKs. The real advantage is broader: the same open weights also run on every major cloud provider, self-hosted, or behind Llama Stack. You are never locked to one endpoint. Build against the OpenAI compatibility endpoint to keep your client and port with light changes, use Llama model names, and test which parameters are silently ignored. Budget around the preview limits, at 10 RPM and 250,000 TPM per team, and the 128k API context, and lean on the no-training data commitment for privacy-sensitive workloads. For volume or full control, move to a cloud provider or self-host the weights.

Honest limits
  • The API is a preview release. Endpoints, parameters and models are still changing, and access is via waitlist.
  • Preview rate limits are modest and per team, at 10 RPM and 250,000 TPM per model, aggregated across all API keys, with 429s over the limit.
  • The Llama API serves Maverick at a 128k context even though the model supports up to 1M, so plan context budgets to the API limit.
  • On the OpenAI compatibility endpoint, use Llama model names, expect some parameters to be ignored or 400, and note moderation responses differ from OpenAI's.
Auth
Bearer LLAMA_API_KEY
Base URL
api.llama.com/v1 (+/compat/v1)
Status
Preview (waitlist)
Rate limit
10 RPM / 250k TPM per team
Data
No training on your content
View sources

Build with the Llama (Meta) API

Your first Llama (Meta) API request

POST /v1/chat/completionsbash
curl https://api.llama.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${LLAMA_API_KEY}" \
  -d '{
    "model": "Llama-4-Maverick-17B-128E-Instruct-FP8",
    "messages": [{"role": "user", "content": "Hello, world!"}]
  }'

How to authenticate with the Llama (Meta) API

AspectDetailNotes
AuthBearer LLAMA_API_KEYCreate a key in the API platform dashboard
Base URLhttps://api.llama.com/v1 (chat completions)OpenAI-compat base path: /compat/v1
StatusPreview release (waitlist)Endpoints, parameters and models still changing
ModelsLlama-4-Maverick / Scout, Llama-3.3-70B / 8BMaverick & Scout: text + image; 128k context
SDKsMeta Python & TypeScript SDKs, or OpenAI clientOpenAI compatibility endpoint
Data commitmentNo training on your inputs or outputsEncryption at rest and in transit; not used for ads
Other waysCloud providers, self-host, Llama StackOpen weights run anywhere

Llama (Meta) core endpoints and features

CapabilityHowPurpose
Chat completionPOST /v1/chat/completionsText generation; response in completion_message.content.text
Image understandingMultimodal messages (Maverick / Scout)Analyze images, charts and visual data
Structured outputJSON schemaResponses that follow a predefined JSON schema
Tool callingtools[] definitionsCall developer-defined tools during generation
ModerationPOST /compat/v1/moderationsSafety model checks user and model text
Fine-tuningFine-tuning & evaluationAdapt a Llama model on specialized datasets
OpenAI compat/compat/v1/chat/completions, /compat/v1/modelsUse OpenAI clients against Llama API
StreamingOpenAI client streamingStream chat completions chunk by chunk

Rate limits and OpenAI-compat rules

LimitDetailNotes
Per-model limit10 RPM / 250,000 TPMSame across Maverick, Scout, 3.3-70B, 3.3-8B
ScopePer team, aggregated across API keysNot per key
Over-limitHTTP 429 too many requestsResumes once RPM/TPM falls below limit
Rate-limit headersx-ratelimit-limit/remaining-tokens & -requestsOn every chat completion response
API context128k tokens on Llama APIModel supports up to 1M; API serves 128k
Compat model namesUse Llama model names, not OpenAI namesList via /compat/v1/models
Unsupported paramsSilently ignored or 400Test before migrating from OpenAI

SDKs, compatibility and developer fit

AspectDetailNotes
Compat feature supportChat, streaming, vision, JSON mode, toolsModeration supported with response differences
Compat endpoints/compat/v1 chat, models, moderationsMaps to OpenAI client functions
Structured outputPydantic models (OpenAI client)Generate schema-conforming JSON
Moderation differencecategory_scores & applied_input_types not supportedCategories match Llama moderations endpoint
PlaygroundChat completion playground with your keyTest prompts before coding
Self-host & StackLlama Everywhere guide; Llama Stack REST layerRun your own or finetuned models
API pricing (median)$0.35/1M in, $0.85/1M outIndependent cross-reference; varies by provider

Llama (Meta) API FAQ

How do I authenticate with the Llama API?

Create an API key in the Llama API platform dashboard, store it in the LLAMA_API_KEY environment variable, and send it as a bearer token in the Authorization header. The chat completion endpoint is https://api.llama.com/v1/chat/completions, and for OpenAI clients you use the /compat/v1 base path. The API is a preview release, so access is via waitlist and the surface is still changing.

Can I use the OpenAI SDK with the Llama API?

Yes. Llama API supports the OpenAI Python and TypeScript client libraries through the /compat/v1 base path, covering chat completions, streaming, image understanding, structured output through JSON mode, and function calling. Use Llama model names rather than OpenAI names, and list them with client.models.list(). Test your code, since some unsupported parameters are silently ignored, others return a 400, and moderation responses differ from OpenAI's.

Which models does the Llama API serve, and what context?

Llama-4-Maverick-17B-128E-Instruct-FP8 and Llama-4-Scout-17B-16E-Instruct-FP8, both taking text and image input, plus the text-only Llama-3.3-70B-Instruct and Llama-3.3-8B-Instruct. All are served with a 128k-token context on the Llama API, even though Maverick supports up to 1M as a model, so plan context budgets to the API limit.

What are the Llama API rate limits?

In preview the limits are modest and applied per team, not per API key and aggregated across all keys: 10 requests per minute and 250,000 tokens per minute for each model. Exceeding either returns an HTTP 429, and every chat completion response carries x-ratelimit-limit-remaining-tokens and -requests headers, so you can track usage.

What are the other ways to run Llama besides the API?

Because the weights are open, Llama runs three other ways. Cloud providers offer Llama inference, listed under Meta Llama in the Cloud. You can self-host it on your own infrastructure, which the Llama Everywhere guide covers for desktop and Linux. You can also use Llama Stack, a REST-like server and client layer you host yourself with Meta or your own fine-tuned models. Meta also commits not to train on your API inputs or outputs.

Sources & verification

Verified by ComparEdgeMethod: Vendor docs, official pages, and selected independent sources
SourceWhat was checkedLast checked
Llama OfficialOfficial product pageJuly 10, 2026
Artificial AnalysisIndependent referenceJuly 10, 2026
Meta Features CompatibilityFeatures CompatibilityJuly 10, 2026
Meta ModelsModelsJuly 10, 2026
Meta OverviewOverviewJuly 10, 2026
Meta QuickstartQuickstartJuly 10, 2026
Meta Rate LimitsRate LimitsJuly 10, 2026

Every fact on this Llama (Meta) page is tied to a named source and a verification date. Freshness-sensitive figures trace to the sources above; verify against the vendor before relying on them.