We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.

IBM: Granite 4.2 8B

ibm-granite/granite-4.2-8b
TextInput: textToolsReasoning131KAdded Aug 31, 2026

Try IBM: Granite 4.2 8B now

Runs on your balance at the prices above. New accounts start with free usage.

One API. Every model.

5 of 5 free messages left today. A free account adds free usage and an API key.Create free accountSign in

Session cost $0.00

IBM: Granite 4.2 8B at a glance

  • Input price is 87% lower than the median of 434 Text models.
  • Context window of 131,072 tokens, enough for long documents and multi-turn conversations.
  • Supports tool (function) calling for agents and integrations.
  • Supports structured JSON output with a schema.
  • Supports reasoning effort control.
  • A typical request (1,000 input / 500 output tokens) costs about $0.000648.

About IBM: Granite 4.2 8B

IBM: Granite 4.2 8B is a dense reasoning model from IBM, released under the model id ibm-granite/granite-4.2-8b. It belongs to the text category, so it is built for language work rather than image, audio or video processing. IBM positions it for mathematics, code generation, multilingual dialogue, and agentic workflows that need multi-step reasoning, which tells you the intended audience is developers who want a general purpose text model with reasoning behaviour rather than a narrow single-task system.

On the input side the model accepts text only and returns text only. It has a context window of 131,072 tokens, and the maximum output is 117,964 tokens, so long inputs and long generations are both feasible within the same request. The supported parameters include the usual sampling controls (temperature, top_p, top_k, min_p, frequency_penalty, presence_penalty, repetition_penalty, seed, stop, logit_bias, logprobs, top_logprobs) alongside reasoning-specific options such as reasoning, reasoning_effort and include_reasoning. It also supports structured_outputs and response_format, plus tools and tool_choice for function calling.

Those capabilities point to a few practical uses. Mathematics and code generation fit naturally, since the model is described as a reasoning model and can be asked to work through problems step by step. Multilingual dialogue makes it a candidate for chat assistants that serve users in more than one language. Because it supports tools and tool_choice, it can sit inside agentic workflows where the model decides which function to call and then continues from the result, including multi-step chains. Structured outputs and response_format help when you need JSON or another schema-shaped reply that downstream code can parse without extra cleanup.

Calling it through api14 works the same way as any other OpenAI-compatible model. Point your client at the api14 base URL, send a request to the chat completions endpoint, and set the model field to ibm-granite/granite-4.2-8b. You can pass any of the parameters listed above in the request body, including max_tokens to cap the reply, temperature and the other sampling knobs to control randomness, seed for reproducibility, stop sequences, and tools or tool_choice when you want function calling. Reasoning behaviour is controlled through reasoning, reasoning_effort and include_reasoning, and logprobs with top_logprobs are available if you need token-level probabilities.

The main constraint to keep in mind is modality: this is a text-in, text-out model, so tasks that require image or audio understanding need a different model. If your workload is purely text and benefits from reasoning, tool use or structured output, Granite 4.2 8B is a reasonable fit, and the 131,072 token context gives you room for large prompts and long answers.

How to call the IBM: Granite 4.2 8B API

  1. Create an API key in your dashboard.
  2. Install the official openai SDK for your language.
  3. Set baseURL to https://api14.com/api/v1 and model to "ibm-granite/granite-4.2-8b".
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api14.com/api/v1",
  apiKey: process.env.API14_API_KEY,
});

const result = await client.chat.completions.create({
  "model": "ibm-granite/granite-4.2-8b",
  "messages": [
    {
      "role": "user",
      "content": "Explain vector databases in two sentences."
    }
  ]
});
console.log(result.choices[0].message.content);

Supported parameters

frequency_penaltyinclude_reasoninglogit_biaslogprobsmax_tokensmin_ppresence_penaltyreasoningreasoning_effortrepetition_penaltyresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_ktop_logprobstop_p

Specifications

Context length
131,072
Max output
117,964
Input
text
Output
text

Requests on api14 · last 7 days

10-1710-1810-1910-2010-2110-2210-23

IBM: Granite 4.2 8B: frequently asked questions

How much does the IBM: Granite 4.2 8B API cost?
IBM: Granite 4.2 8B costs Input $0.21 / 1M tokens. It is charged from your USD balance only for successful requests; failed requests are free.
What is the context window of IBM: Granite 4.2 8B?
IBM: Granite 4.2 8B reads up to 131,072 tokens per request: prompt, history and documents together. It writes up to 117,964 output tokens per response.
What can IBM: Granite 4.2 8B do?
IBM: Granite 4.2 8B accepts text and returns text. It supports tool calling, structured JSON output, reasoning effort control.
How do I call IBM: Granite 4.2 8B from my code?
Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "ibm-granite/granite-4.2-8b". No other code changes. Copy a ready example from the code panel on this page.
What are alternatives to IBM: Granite 4.2 8B?
Comparable Text models at a similar price: Anthropic: Claude Haiku 5.5 (batch), OpenAI: GPT-6 Luna Pro (batch), OpenAI: GPT-6 Luna (batch). Each runs through the same API key, so switching is one string.

IBM: Granite 4.2 8B community

New topic

This community has no topics yet. Open the first one about IBM: Granite 4.2 8B.