Granite Code 8B

CodeAvailable
by IBMModel ID: granite-code-8b

IBM 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
01

Playground

Try Granite Code 8B

Input & output

$0.060/1M in
Try Granite Code 8B
Output
The answer appears here.

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.

02

Examples

Real outputs from the public examples of this model on Replicate, with the prompt and settings that produced them. They were not generated live on this page.
  • 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.

03

About Granite Code 8B

TL;DRAs of September 23, 2026

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.

04

Pricing

Prices in US dollars. Usage is charged from prepaid credits.
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

/ req.
/ req.

Total

$0.03

3 credits

Per request

$0.0003 · 0.03 credits

Each request is rounded up to 0.01 credits.

05

API

Call Granite Code 8B with your Railwail API key. Use this model ID in the request:

No verified API example

The public API passes a different input format than this model needs. Use the playground above.

06

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
07

Use cases

08

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 Instruct
09

Comparable models

All in this category

All models through one API

One API key for every model on Railwail. Usage is charged from prepaid credits, 1 credit = $0.01.