Last refreshed 2026-07-09. Next refresh: weekly.
Why use CodeLlama 34B on Replicate API?
Replicate API offers CodeLlama 34B with pay-as-you-go pricing at $0.20/1M input tokens. Replicate is a cloud-based platform that enables users to run machine learning models easily and efficiently.
Compare CodeLlama 34B across 6 providers to find the best fit for your use caseSetup recipe
Python + curlpip install replicateexport REPLICATE_API_TOKEN=...import replicate
output = replicate.run(
"meta/codellama-34b",
input={"prompt": "Hello"}meta/codellama-34bRequest example
import replicate
# reads REPLICATE_API_TOKEN from env
# meta/codellama-34b format: "owner/model-name" (latest version) or "owner/model-name:version-hash"
output = replicate.run(
"meta/codellama-34b",
input={"prompt": "Hello"}
)
# Output is a list or generator depending on the model
print("".join(output))Gotchas
- Use provider model ID "meta/codellama-34b", not the LLMReference slug "codellama-34b".
- Replicate uses "owner/model-name" format (e.g. "meta/meta-llama-3-8b-instruct") for the latest version, or "owner/model-name:version-sha" to pin to a specific version. The REST endpoint splits owner and model-name into the path: /v1/models/{owner}/{model-name}/predictions.
- The examples expect REPLICATE_API_TOKEN; rename it only if your application config maps the new variable.
Compare CodeLlama 34B Across Providers
| Provider | Input (per 1M) | Output (per 1M) |
|---|---|---|
| Together AI | $0.80 | $0.80 |
| DeepInfra | $0.20 | $0.45 |
| Fireworks AI | $0.90 | $0.90 |
| IBM watsonx | $1.80 | $1.80 |
| Microsoft Foundry | $1.54 | $1.77 |
Pricing
| Type | Price (per 1M) |
|---|---|
| Input tokens | $0.20 |
| Output tokens | $1.00 |
Capabilities
About CodeLlama 34B
CodeLlama 34B is a powerful generative text model developed by Meta, specifically tailored for code synthesis and understanding. With 34 billion parameters, it excels in code completion, infilling, and instruction following, particularly for Python programming. The model utilizes an auto-regressive transformer architecture and has been trained on a diverse dataset of programming languages, making it versatile for various coding tasks. Designed for both commercial and research applications, CodeLlama 34B offers AI engineers a robust tool for integrating advanced code generation capabilities into their projects. More details can be found on the model's Hugging Face page .