impulse

Llama 2 7B Chat

Open weights
API id llama-2-7b-chat
Input / 1M
$0.05
at Replicate
Output / 1M
$0.25
at Replicate
Context window
4K
tokens
Max output
4K
tokens per reply
Hosts
3
4 listings
Released
-
date not published

Pricing

List prices at Replicate, in US dollars per million tokens.

TierInput / 1MOutput / 1M
Standard$0.05$0.25

What it costs a month

At Replicate list prices, 30 days.

  • Chat assistant5,000 requests a day, 2K in / 0.5K out$33.75
  • RAG over documents2,000 requests a day, 8K in / 0.6K out$33.00
  • Coding agent1,000 requests a day, 40K in / 2K out$75.00
  • Overnight batch20,000 requests a day, 4K in / 0.4K out$180
Use your own numbers

Where to run it

3 hosts serve Llama 2 7B Chat. The comparison is on blended price, 3 parts input to 1 part output.

HostIn / out per 1M
ReplicateInference
llama-2-7b-chat
$0.05 / $0.25
Fireworks AIInference
llama-v2-7b-chat
$0.20 / $0.20
+100% vs headline
llama-2-7b-chat-fp16
$1.92 / $1.92
+1823% vs headline
Show 1 more listings: regions, snapshots and variants
Cloudflare Workers AI
Alias
llama-2-7b-chat-int8
$1.92 / $1.92
+1823% vs headline

Capabilities

Core

  • Streaming
  • Function calling
  • JSON mode
  • Structured outputs

Multimodal

  • Vision
  • Image input
  • Audio
  • Image generation
  • Video

Advanced

  • Reasoning
  • Tool calling
  • MCP
  • Prompt caching
  • Batch API
  • Embeddings
Takes in
Text
Produces
Text
Open weights
License: Llama Community License
Runtimes: Ollama, TGI, llama.cpp, vLLM

Cheaper alternatives

Current models that cost less and keep most of what this one can do: tools, vision, reasoning, structured output, caching and enough context.

Same model, cheaper host

No host sells it for less than Replicate.

Smaller Meta models

No cheaper Meta model keeps its key capabilities.

Other frontier labs

No cheaper match from another frontier lab.

Open-weight picks

  • GLM 5.3 Flash
    Zhipu AI · on CLF AI Gateway
    $0.06 / $0.20
    Has every key capability
    5% less
  • Ling 3.0 Flash
    Independent · on DeepInfra
    $0.06 / $0.18
    Has every key capability
    10% less
  • Nemotron 3 Nano 30B A3B
    NVIDIA · on DeepInfra
    $0.05 / $0.20
    Has every key capability
    13% less
  • DeepSeek R1 7B Qwen
    DeepSeek · on LlamaGate
    $0.08 / $0.15
    Has every key capability
    3% less

Call it

Using Replicate's API.

Python
from litellm import completion

response = completion(
    model="replicate/llama-2-7b-chat",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

Quick answers

How much does Llama 2 7B Chat cost?

On Replicate, Llama 2 7B Chat costs $0.05 per million input tokens and $0.25 per million output tokens.

Which APIs offer Llama 2 7B Chat?

Llama 2 7B Chat runs on 3 APIs: Replicate, Fireworks AI and Cloudflare Workers AI.

What is Llama 2 7B Chat's context window?

4K tokens, with up to 4K tokens in one reply.

Is Llama 2 7B Chat being retired?

No retirement date is scheduled for it on any API we track.

What are cheaper alternatives to Llama 2 7B Chat?

Models that cost less and keep most of what it can do: GLM 5.3 Flash on CLF AI Gateway (5% less). Savings are on a mix of 3 input tokens to 1 output token.

What is Llama 2 7B Chat's API model id?

Use llama-2-7b-chat with Replicate. Other hosts use their own ids: llama-v2-7b-chat on Fireworks AI, llama-2-7b-chat-fp16 on Cloudflare Workers AI.

Sources

Raw catalog entry for llama-2-7b-chat on Replicate
{
  "input_cost_per_token": 5e-8,
  "litellm_provider": "replicate",
  "max_input_tokens": 4096,
  "max_output_tokens": 4096,
  "mode": "chat",
  "output_cost_per_token": 2.5e-7,
  "source": "https://replicate.com/meta/llama-2-7b-chat",
  "supports_system_messages": true,
  "supports_tool_choice": true
}