# Granite 20B Code Instruct 8K API Pricing

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

- Page: https://models.litellm.ai/models/granite-20b-code-instruct-8k
- LiteLLM model name: `replicate/ibm-granite/granite-20b-code-instruct-8k`
- 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-20b-code-instruct-8k` | $0.10 | $0.50 | – | – | – | – |

## Cost examples

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

- Replicate: $0.45

## Use it with LiteLLM

```python
from litellm import completion

response = completion(
    model="replicate/ibm-granite/granite-20b-code-instruct-8k",
    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.00035 per request, $3.50 per day, $105 per month (30 days). Try other numbers at https://models.litellm.ai/calculator?model=granite-20b-code-instruct-8k

## FAQ

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

Granite 20B Code Instruct 8K costs $0.10 per 1M input tokens and $0.50 per 1M output tokens on Replicate.

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

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

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

Use the LiteLLM Python SDK with model="replicate/ibm-granite/granite-20b-code-instruct-8k", 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 20B Code Instruct 8K?

Granite 20B Code Instruct 8K 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.
