# Granite 8B Code Instruct 128K API Pricing

As of November 21, 2026, Granite 8B Code Instruct 128K costs $0.05 per 1M input tokens and $0.25 per 1M output tokens on Replicate.

- Page: https://models.litellm.ai/models/granite-8b-code-instruct-128k
- LiteLLM model name: `replicate/ibm-granite/granite-8b-code-instruct-128k`
- Added to LiteLLM: November 11, 2026
- Prices updated: November 11, 2026

## Pricing by provider

Token prices in USD per 1M tokens.

| Provider | Model name | Input | Output | Cache read | Per image | Per second | Context |
|---|---|---|---|---|---|---|---|
| Replicate | `replicate/ibm-granite/granite-8b-code-instruct-128k` | $0.05 | $0.25 | – | – | – | – |

## Cost examples

1,000 requests with 2,000 input and 500 output tokens each:

- Replicate: $0.225

## Use it with LiteLLM

```python
from litellm import completion

response = completion(
    model="replicate/ibm-granite/granite-8b-code-instruct-128k",
    messages=[{"role": "user", "content": "Hello!"}],
)
```

## Cost calculator

10,000 requests a day with 1,000 input and 500 output tokens each, at Replicate's price: $0.000175 per request, $1.75 per day, $52.50 per month (30 days). Try other numbers at https://models.litellm.ai/calculator?model=granite-8b-code-instruct-128k

## FAQ

### How much does Granite 8B Code Instruct 128K cost?

Granite 8B Code Instruct 128K costs $0.05 per 1M input tokens and $0.25 per 1M output tokens on Replicate.

### Which providers offer Granite 8B Code Instruct 128K?

Granite 8B Code Instruct 128K is available from Replicate through LiteLLM, using the model name replicate/ibm-granite/granite-8b-code-instruct-128k.

### How do I call Granite 8B Code Instruct 128K with an OpenAI-compatible API?

Use the LiteLLM Python SDK with model="replicate/ibm-granite/granite-8b-code-instruct-128k", or add the model to the LiteLLM proxy's config.yaml and send requests to /v1/chat/completions from any OpenAI client. LiteLLM tracks the cost of every request at the prices on this page.

### When did LiteLLM add Granite 8B Code Instruct 128K?

Granite 8B Code Instruct 128K was added to LiteLLM's model price file on November 11, 2026.

Source: LiteLLM model price file, https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json. Maintainers update it from each provider's published pricing, and this page is usually rebuilt within 20 minutes of every change.
