Granite 4.2 8B
Open-weights chat model from IBM. One API key reaches all 2 providers, with automatic failover.
No card required. Start with 1 million free tokens.
About Granite 4.2 8B
Granite 4.2 8B is an open-weights chat model published by IBM, with a 131,072-token context window. It scores 94 on AI IQ, ranked #151. Through TrustedRouter it runs on 2 providers, with options in the US and EU, from $0.063 per million input tokens.
- Model ID
ibm-granite/granite-4.2-8b- Publisher
- IBM
- Modes
- chat
- Billing
- Credits or your own provider key
Set it up with your agent
Paste this into Claude Code, Cursor or any coding agent.
Use Granite 4.2 8B through TrustedRouter in this project.
1. Read https://trustedrouter.com/llms.txt
2. Point the OpenAI-compatible client at
https://api.trustedrouter.com/v1 and read the key from
TRUSTEDROUTER_API_KEY.
3. Set the model to ibm-granite/granite-4.2-8b.
4. Run the tests, then show me the diff before committing.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.trustedrouter.com/v1",
api_key=os.environ["TRUSTEDROUTER_API_KEY"],
)
response = client.chat.completions.create(
model="ibm-granite/granite-4.2-8b",
messages=[{"role": "user", "content": "What is the capital of France?"}],
)
print(response.choices[0].message.content)
curl https://api.trustedrouter.com/v1/chat/completions \
-H "Authorization: Bearer $TRUSTEDROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ibm-granite/granite-4.2-8b",
"messages": [{"role": "user", "content": "What is the capital of France?"}]
}'
Providers
Your key goes to the cheapest healthy provider and fails over on its own. Open a row for retention, location and weight format, or see how we check privacy claims and the live speed leaderboard.
| Provider | Input | Cached | Output | Cost per 1M in + out | Details |
|---|---|---|---|---|---|
|
|
$0.0633 | $0.0158 | $0.158 | $0.22 | |
|
Retention Verification: no verified privacy claim. W&B Serverless Inference runs on CoreWeave infrastructure. W&B does not publish a zero-retention, confidential-compute, or end-to-end-encryption commitment for this service, so these routes use the Standard privacy tier. TrustedRouter does not enable W&B Weave tracing for provider calls. Location Operator country: US Headquarters / registered office: Not verified. Inference: Inference location not verified; no country-specific residency commitment. No inference-location declaration has been verified for this provider. Region pinning through TR: No verified provider-specific location pin documented here. Weight format Unknown Price and speed Input $0.0633/1M · Cached input $0.015825/1M · Output $0.15825/1M TTFT: insufficient data Speed: insufficient data Last sample: |
|||||
|
|
$0.0633 | $0.0158 | $0.264 | $0.33 | |
|
Retention Verification: no verified privacy claim. Tracked as no-store, not strict ZDR. DeepInfra documents memory-only handling and no training for ordinary inference, but reserves the right to log a small portion of requests for debugging or security. Google- and Anthropic-backed routes also inherit those vendors' terms. Location Operator country: US Headquarters / registered office: Palo Alto, California, United States. Company location source (reviewed 2026-09-27). Inference: US infrastructure plus announced Canadian capacity; model-specific residency unconfirmed. DeepInfra describes US infrastructure and announced its first international data center in Toronto on July 8, 2026. This is a provider footprint, not an exhaustive or model-specific placement list. DeepSeek V4.1 Flash placement has not been confirmed; do not declare this route US-only. Region pinning through TR: Not supported by the current TrustedRouter integration. Reviewed 2026-09-27. DeepInfra infrastructure statement Weight format Unknown Price and speed Input $0.0633/1M · Cached input $0.015825/1M · Output $0.26375/1M TTFT: insufficient data Speed: insufficient data |
|||||
Append :nitro to the model ID, or send "provider": {"sort": "throughput"}, to route to the fastest provider instead.
Questions
What model ID should I use for Granite 4.2 8B?
Use ibm-granite/granite-4.2-8b as the model field with the TrustedRouter OpenAI-compatible API. Credits routing and provider fallback happen behind that model ID.
Do you log my prompts or outputs?
No. Prompt and output content are intentionally excluded from the control plane and metadata systems. Optional content export requires explicit destination-level configuration.
Which providers serve Granite 4.2 8B?
TrustedRouter currently lists DeepInfra, and Weights & Biases for Granite 4.2 8B. Provider availability and routing eligibility can change as catalog and health data update.
How much does Granite 4.2 8B cost through TrustedRouter?
The current lowest Credits input price is $0.0633/1M and the lowest Credits output price is $0.15825/1M. Prices are per one million tokens and come from the current route catalog.
How do I require zero data retention for Granite 4.2 8B?
Set provider.min_privacy to zdr on the request. TrustedRouter considers only routes with a recorded zero-data-retention posture and fails closed if no eligible route remains.
Granite 4.2 8B vs other models
Start building with Granite 4.2 8B.
No card required. Start with 1 million free tokens.