Granite Code 8B
granite-code-8bIBM Granite 8B Code Instruct. Trained on permissively-licensed code, strong on multi-language code completion and instruction-following.
- Price · 1M in / out
- $0.060 / $0.30
- Context
- 128,000 tokens
- Max. output
- 8,192 tokens
- Input → output
- Text → Text
- Developer
- IBM
- Updated
- September 23, 2026
Playground
Try Granite Code 8B
Input & output
This run
at most $0.0013 · 0.13 credits reserved
Billed by the tokens actually used; the unused part of the reservation is refunded.
New here?
10 free credits ($0.10) when you sign up with Google
Usable 24 hours after sign-up, up to 5 runs per day and at most 2 credits per run. Other sign-in methods start without credits. Enough for 76 runs of this model.
Examples
Prompt
Now, please explain APR meaning with a simple example, so that even a 5 years old kid can understand you.
Response
APR stands for Annual Percentage Rate. It's a way to show how much interest you'll pay on a loan over a year. Let's say you take out a loan of $100 at a 5% APR. That means you'll pay $5 in interest every year. So, after one year, you'll have paid $105. After two years, you'll have paid $110.25, and so on. The more you pay over the life of the loan, the more interest you'll pay in the end.
Settings
system_prompt: You are an expert in finance that knows many concepts related to loans and credit.
About Granite Code 8B
Granite Code 8B is a model by IBM in the Code category. On Railwail, Granite Code 8B costs $0.060 per 1M input tokens and $0.30 per 1M output tokens. The context window holds 128,000 tokens, and one response can be up to 8,192 tokens long.
Pricing
| Input | $0.060 / 1M tokens |
|---|---|
| Output | $0.30 / 1M tokens |
- Billed by the tokens each request actually uses.
- 1 credit = $0.01
Cost calculator
Price calculator
Total
$0.03
3 credits
Per request
$0.0003 · 0.03 credits
Each request is rounded up to 0.01 credits.
API
No verified API example
The public API passes a different input format than this model needs. Use the playground above.
Specifications
- Model ID
granite-code-8b- Developer
- IBM
- Category
- Code
- Input
- Text
- Output
- Text
- Context window
- 128,000 tokens
- Max. output
- 8,192 tokens
- Billing
- By usage (tokens or GPU time)
- Catalog entry updated
- September 23, 2026
Tags
- replicate
- code-generation
- ibm
- granite
- open-weights
- apache-2
Use cases
Frequently asked questions
What is Granite Code 8B?
Granite Code 8B is a model by IBM in the Code category.
How much does Granite Code 8B cost on Railwail?
On Railwail, Granite Code 8B costs $0.060 per 1M input tokens and $0.30 per 1M output tokens. You are charged for what each request actually uses. Usage is paid from prepaid credits; 1 credit equals $0.01.
What is the context window of Granite Code 8B?
The context window of Granite Code 8B holds 128,000 tokens. One response can be up to 8,192 tokens long.
How fast is Granite Code 8B?
There are not enough measured runs of Granite Code 8B on Railwail yet to state a run time. It depends on the input, the settings and the load at the provider.
Is Granite Code 8B better than Code Llama 13B Instruct?
That depends on the task. Granite Code 8B (IBM) and Code Llama 13B Instruct (Meta) are both models in the Code category. The comparison page shows their prices and specifications side by side.
Compare Granite Code 8B and Code Llama 13B InstructComparable models
All in this categoryIBM Granite 20B Code Instruct. Larger Granite code model balancing quality and inference cost for enterprise CI/CD code-review automation.
Meta's 13B Code Llama tuned for instruction following. A faster mid-size option for code generation and completion, supporting infilling for inserting code at a cursor position. Served on Replicate per call.
≈ $0.0065/run
Compare Granite Code 8B vs. Code Llama 13B InstructMeta's 34B Code Llama tuned for instruction following. A balance of size and quality for code generation, completion, and explanation, with strong coverage of Python, JavaScript, and other common languages. Runs on Replicate per call.
≈ $0.0408/run
Compare Granite Code 8B vs. Code Llama 34B Instruct
All models through one API
One API key for every model on Railwail. Usage is charged from prepaid credits, 1 credit = $0.01.