Intelligence
Index v5.0
Custom pricing for production workloads
IBM's dense 8B reasoning model with configurable reasoning effort and Apache 2.0 licensing.
Granite 4.2 8B is IBM's dense reasoning model, fine-tuned from Granite 4.1 8B, with configurable reasoning effort, tool calling and structured outputs over a 131K-token context.
ibm-granite/granite-4.2-8bhttps://api.aimlapi.com/v1Granite 4.2 8B is IBM's dense reasoning model, fine-tuned from Granite 4.1 8B for mathematics, code generation, multilingual dialogue and agentic workflows that need multi-step reasoning.
Reasoning is on by default and its effort is configurable, high, low or none, so the same endpoint serves both quick lookups and deliberate multi-step work.
Agentic workflows
Tool calling and structured outputs suit agent loops that plan, call tools and iterate.
Cost-sensitive reasoning
Turning reasoning effort down keeps routine calls cheap, while high effort stays available when the task needs it.
Available on AI/ML API since August 31, 2026.
Granite 4.2 8B is documented as suitable for reasoning-intensive enterprise applications, with IBM describing it as a balanced reasoning model for general-purpose enterprise use. It is also suited to complex math and multi-step logic tasks.
The model is documented for coding-related work, including code generation and software engineering workflows. IBM also says Granite 4.2 can support terminal-based coding and other multi-step development tasks in agentic settings.
It is documented for tool-calling and agentic workflows, including evaluating which applications to use and in what order, and integrating with agent frameworks. The model is also described as useful for search-driven workflows and web-search-based agent behavior.
It is documented for multilingual dialogue tasks and multilingual use cases. The model is also listed as suitable for structured output or structured data extraction in provider documentation.
See how Granite 4.2 8B compares in intelligence, generation speed, cost per task and latency. Data retrieved Nov 3, 2026.
Compare 18 models available on AI/ML API across 5 independent benchmarks.
Expert-written questions across academic subjects.
Graduate-level science questions written to resist web search.
Agentic tasks completed in a command-line environment.
Reasoning across long documents of about 100k tokens.
Python coding tasks drawn from scientific research.
| Usage | Price | Unit |
|---|---|---|
| Input | $0.1058 | 1M tokens |
| Output | $0.2645 | 1M tokens |
| Cached input | $0.0529 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $0.1058 | $0.2645 | |
| $0.0529 | $0.2433 | |
| Nova Lite 1.0 | $0.0635 | $0.2539 |
| $0.26 | $0.26 | |
| $0.26 | $0.26 |
Give your agent the model details, code and documentation.
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"curl 'https://api.aimlapi.com/v1/chat/completions' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "ibm-granite/granite-4.2-8b",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "ibm-granite/granite-4.2-8b",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}
response = requests.post("https://api.aimlapi.com/v1/chat/completions", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/chat/completions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "ibm-granite/granite-4.2-8b",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Granite 4.2 8B is an 8-billion-parameter dense reasoning model from IBM, fine-tuned from Granite 4.1 8B for mathematics, code generation, multilingual dialogue and agentic workflows.
Apache 2.0, which permits unrestricted commercial use. IBM also publishes cryptographic signatures for the weights and holds ISO certification for the development process.
Reasoning is on by default and its effort is configurable: high, low or none. That lets you keep routine calls short and reserve deliberate reasoning for the requests that need it.
Yes. Reasoning is emitted natively inside think tags, which IBM reports improves results on math, coding and multi-step problems.
Yes, the model supports function calling.
A dense, decoder-only transformer built on 40 layers, using Grouped Query Attention and Rotary Position Embeddings.
No. Granite 4.2 8B takes text and returns text.
Yes. The Apache 2.0 licence and published weights allow local or on-premise deployment, and the 8B size keeps hardware requirements modest.
Send a request to the chat completions endpoint with the model id ibm-granite/granite-4.2-8b.
Use ibm-granite/granite-4.2-8b as the model parameter. Requests go to the OpenAI-compatible endpoint with your AI/ML API key.