inference-providers

Granite 4.2 8B

by ibm · family granite

Facts

Release date2026-08-07
Retired date
Knowledge cutoff
Context (max)131,072
Max output
Modalitiestext → text
Aliasesgranite-4.2-8b
Open weightsyes (ibm-granite/granite-4.2-8b)
DescriptionIBM's Granite 4.2 8B: successor to 4.1 with reasoning controls added; 131K context, text-only. $0.06/$0.25 per Mtok on OpenRouter.

Unknown values are shown as —.

Offerings

ProviderWire IDVariantEndpointProtocolStatusPrice (USD / Mtok)Reasoning
OpenRouteribm-granite/granite-4.2-8bchat-completionsopenai-chatga0.06 / 0.25effort · default on · returns reasoning_content · round-trips reasoning_content

Reasoning controls

OpenRouter· ibm-granite/granite-4.2-8b· chat-completions effort

reasoning.effort nonelowmedium●highxhighmax

effort · default on · returns reasoning_content · round-trips reasoning_content

Example requests

OpenRouter · openai-chat · ibm-granite/granite-4.2-8b

curl 'https://openrouter.ai/api/v1/chat/completions' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "ibm-granite/granite-4.2-8b",
  "messages": [
    {
      "role": "user",
      "content": "Tell me about the weather."
    }
  ],
  "reasoning": {
    "effort": "medium"
  }
}'
Python (requests)
import requests

resp = requests.post(
    "https://openrouter.ai/api/v1/chat/completions",
    headers={
      "Authorization": "Bearer <YOUR_API_KEY>",
      "Content-Type": "application/json"
    },
    json={
      "model": "ibm-granite/granite-4.2-8b",
      "messages": [
        {
          "role": "user",
          "content": "Tell me about the weather."
        }
      ],
      "reasoning": {
        "effort": "medium"
      }
    },
)
print(resp.json())
TypeScript (fetch)
const resp = await fetch("https://openrouter.ai/api/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "model": "ibm-granite/granite-4.2-8b",
    "messages": [
      {
        "role": "user",
        "content": "Tell me about the weather."
      }
    ],
    "reasoning": {
      "effort": "medium"
    }
  }),
})
console.log(await resp.json())
  • ⚠ Responses include reasoning_content artifacts — pass them back unmodified on subsequent turns (dropping them triggers 400s or quality loss).