---
title: IBM: Granite 4.1 8B API | Text Generation | ModelsLab
description: Build with IBM: Granite 4.1 8B API by Ibm Granite. Text generation, chat, code, and reasoning. Pay-per-use. Free tier.
url: https://modelslab.com/models/ibm-granite/ibm-granite-granite-4.1-8b.md
canonical: https://modelslab.com/models/ibm-granite/ibm-granite-granite-4.1-8b.md
type: product
component: Playground/LLM/Index
generated_at: 2026-05-05T18:46:20.067197Z
---

IBM: Granite 4.1 8B
---

 [LLMs.txt](https://modelslab.com/models/open_router/ibm-granite-granite-4.1-8b/llms.txt) [.md](https://modelslab.com/models/ibm-granite/ibm-granite-granite-4.1-8b.md)

ibm-granite-granite-4.1-8b ibm-granite Closed Source Model $0.075000 / call

IBM: Granite 4.1 8B
---

Choose a prompt below to get started or type your own message

 Explain quantum computing in simple terms

 Write a Python function to sort a list

 Create a marketing email for a SaaS product

 Compare REST vs GraphQL APIs

Send

### IBM: Granite 4.1 8B

ibm-granite ibm-granite-granite-4.1-8b

Copy model ID

PricingInput $0.05 / 1M tokens

Output $0.10 / 1M tokens

API EndpointsOpenAI Compatible

`https://modelslab.com/api/v7/llm/chat/completions`Endpoint

Anthropic Compatible

`https://modelslab.com/api/v7/llm/v1/messages`Messages

`https://modelslab.com/api/v7/llm/v1/messages/count_tokens`Count Tokens

`https://modelslab.com/api/v7/llm/v1/models`Models

Use with Claude Code

cURL Example

ParametersSystem MessageYou are a helpful AI assistant specialized in providing accurate and detailed responses.

Temperature0.7

Max Tokens1000

Top P0.9

Frequency Penalty0

Presence Penalty0

Model Info

Support

Related Models
---

Discover similar models you might be interested in

 [View all LLM Models](https://modelslab.com/models?feature=llmaster)

[OG](https://modelslab.com/models/open_router/openai-gpt-5-codex)[Open Router](https://modelslab.com/models/open_router)

 [OpenAI: GPT-5 Codex

Closed Source Model](https://modelslab.com/models/open_router/openai-gpt-5-codex)

[OO](https://modelslab.com/models/open_router/openai-o4-mini-high)[Open Router](https://modelslab.com/models/open_router)

 [OpenAI: o4 Mini High

Closed Source Model](https://modelslab.com/models/open_router/openai-o4-mini-high)

[QC](https://modelslab.com/models/together_ai/Qwen-Qwen3-Coder-30B-A3B-Instruct)[Together AI](https://modelslab.com/models/together_ai)

 [Qwen3 Coder 30B A3b Instruct

Closed Source Model](https://modelslab.com/models/together_ai/Qwen-Qwen3-Coder-30B-A3B-Instruct)

[ML](https://modelslab.com/models/open_router/meta-llama-llama-3.2-3b-instruct)[Open Router](https://modelslab.com/models/open_router)

 [Meta: Llama 3.2 3B Instruct

Closed Source Model](https://modelslab.com/models/open_router/meta-llama-llama-3.2-3b-instruct)

[AC](https://modelslab.com/models/open_router/anthropic-claude-3.5-haiku)[Open Router](https://modelslab.com/models/open_router)

 [Anthropic: Claude 3.5 Haiku

Closed Source Model](https://modelslab.com/models/open_router/anthropic-claude-3.5-haiku)

[L3](https://modelslab.com/models/together_ai/nvidia-Llama-3.1-Nemotron-70B-Instruct-HF)[Together AI](https://modelslab.com/models/together_ai)

 [Llama 3.1 Nemotron 70B Instruct HF

Closed Source Model](https://modelslab.com/models/together_ai/nvidia-Llama-3.1-Nemotron-70B-Instruct-HF)

[IL](https://modelslab.com/models/open_router/inclusionai-ling-2.6-1t-free)[Open Router](https://modelslab.com/models/open_router)

 [inclusionAI: Ling-2.6-1T (free)

Closed Source Model](https://modelslab.com/models/open_router/inclusionai-ling-2.6-1t-free)

[TD](https://modelslab.com/models/open_router/alibaba-tongyi-deepresearch-30b-a3b)[Open Router](https://modelslab.com/models/open_router)

 [Tongyi DeepResearch 30B A3B

Closed Source Model](https://modelslab.com/models/open_router/alibaba-tongyi-deepresearch-30b-a3b)

[GG](https://modelslab.com/models/open_router/google-gemma-3-4b-it)[Open Router](https://modelslab.com/models/open_router)

 [Google: Gemma 3 4B

Closed Source Model](https://modelslab.com/models/open_router/google-gemma-3-4b-it)

[AA](https://modelslab.com/models/open_router/aion-labs-aion-rp-llama-3.1-8b)[Open Router](https://modelslab.com/models/open_router)

 [AionLabs: Aion-RP 1.0 (8B)

Closed Source Model](https://modelslab.com/models/open_router/aion-labs-aion-rp-llama-3.1-8b)

[AN](https://modelslab.com/models/open_router/amazon-nova-micro-v1)[Open Router](https://modelslab.com/models/open_router)

 [Amazon: Nova Micro 1.0

Closed Source Model](https://modelslab.com/models/open_router/amazon-nova-micro-v1)

[Q7](https://modelslab.com/models/together_ai/Qwen-Qwen2.5-7B)[Together AI](https://modelslab.com/models/together_ai)

 [Qwen2.5 7B

Closed Source Model](https://modelslab.com/models/together_ai/Qwen-Qwen2.5-7B)

[DC](https://modelslab.com/models/open_router/deepcogito-cogito-v2.1-671b)[Open Router](https://modelslab.com/models/open_router)

 [Deep Cogito: Cogito v2.1 671B

Closed Source Model](https://modelslab.com/models/open_router/deepcogito-cogito-v2.1-671b)

[Q7](https://modelslab.com/models/together_ai/Qwen-Qwen2.5-7B-Instruct-Turbo)[Together AI](https://modelslab.com/models/together_ai)

 [Qwen2.5 7B Instruct Turbo

Closed Source Model](https://modelslab.com/models/together_ai/Qwen-Qwen2.5-7B-Instruct-Turbo)

[MM](https://modelslab.com/models/open_router/mistralai-ministral-14b-2512)[Open Router](https://modelslab.com/models/open_router)

 [Mistral: Ministral 3 14B 2512

Closed Source Model](https://modelslab.com/models/open_router/mistralai-ministral-14b-2512)

[ML](https://modelslab.com/models/together_ai/meta-llama-Llama-3.3-70B-Instruct-Turbo-test)[Together AI](https://modelslab.com/models/together_ai)

 [Meta Llama 3.3 70B Instruct Turbo

Closed Source Model](https://modelslab.com/models/together_ai/meta-llama-Llama-3.3-70B-Instruct-Turbo-test)

[PS](https://modelslab.com/models/open_router/perplexity-sonar)[Open Router](https://modelslab.com/models/open_router)

 [Perplexity: Sonar

Closed Source Model](https://modelslab.com/models/open_router/perplexity-sonar)

[Q7](https://modelslab.com/models/together_ai/Qwen-Qwen2.5-72B-Instruct)[Together AI](https://modelslab.com/models/together_ai)

 [Qwen2.5 72B Instruct

Closed Source Model](https://modelslab.com/models/together_ai/Qwen-Qwen2.5-72B-Instruct)

About IBM: Granite 4.1 8B
---

Granite 4.1 8B is a dense, decoder-only 8-billion-parameter language model from IBM, part of the Granite 4.1 family. It supports a 131K-token context window and is designed for enterprise tasks...

### Technical Specifications

Model IDibm-granite-granite-4.1-8bCategoryLLM ModelsTaskText GenerationPrice$0.075000 per million tokensAddedApril 30, 2026

### Key Features

- Chat completion and multi-turn conversation API
- Streaming response with token-by-token output
- Function calling and tool use support
- System prompts and role-based messaging
- JSON mode and structured output

### Quick Start

Integrate IBM: Granite 4.1 8B into your application with a single API call. Get your API key from the [pricing page](https://modelslab.com/pricing) to get started.

PythonJavaScriptcURLPHP

```
<code>import requests
import json

url = "https://modelslab.com/api/v7/llm/chat/completions"

headers = {
    "Content-Type": "application/json"
}

data = {
        "model_id": "ibm-granite-granite-4.1-8b",
        "messages": [
            {
                "role": "user",
                "content": "Hello!"
            }
        ],
        "max_tokens": 1000,
        "key": "YOUR_API_KEY"
    }

try:
    response = requests.post(url, headers=headers, json=data)
    response.raise_for_status()  # Raises an HTTPError for bad responses (4XX or 5XX)
    result = response.json()
    print("API Response:")
    print(json.dumps(result, indent=2))
except requests.exceptions.HTTPError as http_err:
    print(f"HTTP error occurred: {http_err} - {response.text}")
except Exception as err:
    print(f"Other error occurred: {err}")</code>
```

View the [full API documentation](https://modelslab.com/models/ibm-granite/ibm-granite-granite-4.1-8b/api) for SDKs, code examples in Python, JavaScript, and more.

### Pricing

IBM: Granite 4.1 8B API costs $0.075000 per million tokens. Pay only for what you use with no minimum commitments. [View pricing plans](https://modelslab.com/pricing)

### Use Cases

- AI chatbots and virtual assistants
- Code generation and developer tools
- Content writing and copywriting automation
- Data analysis, summarization, and extraction

[Browse LLM Models](https://modelslab.com/models?feature=llmaster) [More from Ibm Granite](https://modelslab.com/models/open_router) [View Pricing](https://modelslab.com/pricing)

IBM: Granite 4.1 8B FAQ
---

### What is IBM: Granite 4.1 8B?

Granite 4.1 8B is a dense, decoder-only 8-billion-parameter language model from IBM, part of the Granite 4.1 family. It supports a 131K-token context window and is designed for enterprise tasks...

### How do I use the IBM: Granite 4.1 8B API?

You can integrate IBM: Granite 4.1 8B into your application with a single API call. Sign up on ModelsLab to get your API key, then use the model ID "ibm-granite-granite-4.1-8b" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

### How much does IBM: Granite 4.1 8B cost?

IBM: Granite 4.1 8B costs $0.075000 per million tokens. ModelsLab uses pay-per-use pricing with no minimum commitments. A free tier is available to get started.

### What is the IBM: Granite 4.1 8B model ID?

The model ID for IBM: Granite 4.1 8B is "ibm-granite-granite-4.1-8b". Use this ID in your API requests to specify this model.

### Does IBM: Granite 4.1 8B have a free tier?

Yes, ModelsLab offers a free tier that lets you try IBM: Granite 4.1 8B and other AI models. Sign up to get free API credits and start building immediately.

---

*This markdown version is optimized for AI agents and LLMs.*

**Links:**
- [Website](https://modelslab.com)
- [API Documentation](https://docs.modelslab.com)
- [Blog](https://modelslab.com/blog)

---
*Generated by ModelsLab - 2026-05-06*