Public beta. Coverage is source-backed and intentionally scoped. Rankings are metadata views, not universal quality claims. Read the data policy

Meta (Llama models) — quickstart

Open weights, runnable in your own infrastructure, no per-token API tax. Pick when you need full inference control (privacy, latency, custom fine-tuning), or when you want to avoid the closed-model lock-in.

Recommended starting model Llama 4 Maverick meta-llama/llama-4-maverick

Get a key

  1. Meta doesn't ship a first-party hosted API. Use one of: OpenRouter (router across providers), Together AI, Groq (fastest), Fireworks, or self-host via vLLM / Ollama.
  2. This guide uses OpenRouter (simplest cross-host adapter). Get a key at openrouter.ai.
  3. Set `OPENROUTER_API_KEY` env var.

Make a request

Three equivalent ways to call the recommended model. Pick the one that matches your stack.

curl
curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "meta-llama/llama-4-maverick",
    "messages": [
      {"role": "user", "content": "Summarize the last week of AI model releases."}
    ]
  }'
python pip install openai
# Using OpenAI SDK pointed at OpenRouter (it's OpenAI-compatible).
from openai import OpenAI

client = OpenAI(
    base_url="https://openrouter.ai/api/v1",
    api_key=__import__("os").environ["OPENROUTER_API_KEY"],
)
res = client.chat.completions.create(
    model="meta-llama/llama-4-maverick",
    messages=[{"role": "user", "content": "Summarize the last week of AI model releases."}],
)
print(res.choices[0].message.content)
node npm install openai
// Using OpenAI SDK pointed at OpenRouter (it's OpenAI-compatible).
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://openrouter.ai/api/v1",
  apiKey: process.env.OPENROUTER_API_KEY,
});
const res = await client.chat.completions.create({
  model: "meta-llama/llama-4-maverick",
  messages: [{ role: "user", content: "Summarize the last week of AI model releases." }],
});
console.log(res.choices[0].message.content);

Pricing

Hosted Llama via OpenRouter / Together / Groq is dramatically cheaper than closed-model APIs at comparable scale. Self-hosted is free per-token but you pay GPU-hours.

Alternatives in this lineup

Gotchas