impulse

Code Llama 34B Instruct

Open weights
API id codellama-34b-instruct
Input / 1M
$0.35
at Perplexity
Output / 1M
$1.40
at Perplexity
Context window
16K
tokens
Max output
16K
tokens per reply
Hosts
2
2 listings
Released
-
date not published

Pricing

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

TierInput / 1MOutput / 1M
Standard$0.35$1.40

What it costs a month

At Perplexity list prices, 30 days.

  • Chat assistant5,000 requests a day, 2K in / 0.5K out$210
  • RAG over documents2,000 requests a day, 8K in / 0.6K out$218
  • Coding agent1,000 requests a day, 40K in / 2K out$504
  • Overnight batch20,000 requests a day, 4K in / 0.4K out$1,176
Use your own numbers

Where to run it

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

HostIn / out per 1M
PerplexityGateway
codellama-34b-instruct
$0.35 / $1.40
Together AIInference
CodeLlama-34b-Instruct
-

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 Perplexity.

Smaller Meta models

Other frontier labs

  • GPT-5.4 Nano
    OpenAI · on OpenAI
    $0.20 / $1.25
    Has every key capability
    24% less
  • Claude Haiku 5.5
    Anthropic · on Anthropic
    $0.10 / $0.50
    Has every key capability
    67% less
  • GPT-6 Luna
    OpenAI · on OpenAI
    $0.10 / $0.50
    Has every key capability
    67% less
  • GPT-4o Mini
    OpenAI · on OpenAI
    $0.15 / $0.60
    Has every key capability
    57% less

Open-weight picks

  • DeepSeek Flash
    DeepSeek · on DeepSeek
    $0.30 / $1.20
    Has every key capability
    14% less
  • Longcat 2.0
    Independent · on OpenCode Go
    $0.30 / $1.20
    Has every key capability
    14% less
  • Qwen3.7 Plus
    Alibaba Qwen · on Replicate
    $0.276 / $1.10
    Has every key capability
    21% less
  • GLM 4 6v
    Zhipu AI · on Novita AI
    $0.30 / $0.90
    Has every key capability
    27% less

Call it

Using Perplexity's API.

Python
from litellm import completion

response = completion(
    model="perplexity/codellama-34b-instruct",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

Quick answers

How much does Code Llama 34B Instruct cost?

On Perplexity, Code Llama 34B Instruct costs $0.35 per million input tokens and $1.40 per million output tokens.

Which APIs offer Code Llama 34B Instruct?

Code Llama 34B Instruct runs on 2 APIs: Perplexity and Together AI.

What is Code Llama 34B Instruct's context window?

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

Is Code Llama 34B Instruct being retired?

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

What are cheaper alternatives to Code Llama 34B Instruct?

Models that cost less and keep most of what it can do: Muse Spark 1.3 Contributor on Meta Model API (80% less), GPT-5.4 Nano on OpenAI (24% less), Claude Haiku 5.5 on Anthropic (67% less) and DeepSeek Flash on DeepSeek (14% less). Savings are on a mix of 3 input tokens to 1 output token.

What is Code Llama 34B Instruct's API model id?

Use codellama-34b-instruct with Perplexity. Other hosts use their own ids: CodeLlama-34b-Instruct on Together AI.

Sources

Raw catalog entry for codellama-34b-instruct on Perplexity
{
  "input_cost_per_token": 3.5e-7,
  "litellm_provider": "perplexity",
  "max_input_tokens": 16384,
  "max_output_tokens": 16384,
  "mode": "chat",
  "output_cost_per_token": 0.0000014
}