What is Granite 4.0 Micro API?
Granite 4.0 Micro is available through AIMLAPI.
Technical Specifications
- Supported inputs: Image, Text
- Output: Text
- Context window: 131,000 tokens / Max output: 131,000 tokens
- Endpoint: /chat/completions
Performance Benchmarks
[embed]
Granite 4.0 Micro API Pricing
- Input: $0.0221 / 1M tokens
- Output: $0.1456 / 1M tokens
Where to Use Granite 4.0 Micro
Coding and code review
Generate, debug, and review code across languages, reading whole files or repos in a single prompt.
Agentic and multi-step workflows
Reliable tool-calling and instruction-following suit agent loops that plan, call tools, and iterate.
Complex reasoning
Extended reasoning improves reliability on multi-step math, logic, and technical analysis.
Long-document analysis
Summarize and extract from contracts, papers, and reports without aggressive chunking.
Code Sample
[embed]
Measured on the AI/ML API gateway across live traffic. Figures are medians unless stated. Last updated 2026-10-12.
Granite 4.0 Micro is documented as suited to low-latency, edge, and local applications. It is also positioned as a building block for agentic workflows, where it can perform key tasks such as function calling quickly. It is documented for retrieval-augmented generation (RAG) use cases. It is also documented for multi-agent workflows and multi-tool agent automation.
import requests r = requests.post( "https://api.aimlapi.com/v1/chat/completions", headers={"Authorization": "Bearer " + AIMLAPI_KEY}, json={ "model": "ibm-granite/granite-4.0-h-micro", "messages": [ { "role": "user", "content": "Hello!" } ] }, ) print(r.json())
const r = 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.0-h-micro", "messages": [ { "role": "user", "content": "Hello!" } ] }), }); console.log(await r.json());
curl -X POST https://api.aimlapi.com/v1/chat/completions \ -H "Authorization: Bearer $AIMLAPI_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"ibm-granite/granite-4.0-h-micro","messages":[{"role":"user","content":"Hello!"}]}'
OpenAI-compatible — swap the base URL and it works with your existing SDK.
| Type | Price |
|---|---|
| Input | |
| Output | |
| Benchmark | Score | What it measures | Source | Retrieved |
|---|---|---|---|---|
| Intelligence | 5.1 | Composite score across standardised reasoning, knowledge and problem-solving evaluations, measured independently by Artificial Analysis | Source | September 12, 2026 |
| Math | 6 | Composite score across standardised mathematics evaluations, measured independently by Artificial Analysis | Source | September 12, 2026 |
| MMLU | 65.98 | Multi-discipline knowledge across 57 school and professional subjects | Source | September 21, 2026 |
| MMLU-Pro | 44.5 | Multi-discipline knowledge + reasoning (harder MMLU) | Source | September 21, 2026 |
| Model | Input | Output | Context | Best for |
|---|---|---|---|---|
Granite 4.0 Micro This page | Reasoning + agents | |||
| Reasoning + agents | ||||
| Balanced coding + agents | ||||
| Long-context, multimodal & agentic workflows | ||||
| Reasoning + agents |
Granite 4.0 Micro has a 131,000 tokens context window and can return up to 131,000 tokens.
Granite 4.0 Micro takes image, text as input and returns text.
Use ibm-granite/granite-4.0-h-micro as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.
Granite 4.0 Micro is priced at input $0.0233818 / 1M tokens, output $0.1540448 / 1M tokens.
Yes, Granite 4.0 Micro can stream responses as they are generated.
Yes, Granite 4.0 Micro accepts image input alongside text.
Yes, it includes reasoning as a supported feature and capability.
Yes, it supports function calling along with parallel tool calls.