Skip to content
IbmChatgranite-4.2-8b

Granite 4.2 8B

Granite 4.2 8B for OpenAI-style Chat Completions, Anthropic-style Messages, OpenAI-style Responses.

Explore Granite 4.2 8B for OpenAI-style Chat Completions, Anthropic-style Messages, OpenAI-style Responses through the unified API. Supported interfaces and current availability are shown below.

  • OpenAI-style Chat Completions
  • Anthropic-style Messages
  • OpenAI-style Responses

Model details

Context window
131K tokens
Max output
118K tokens
Input
Text
Output
Text
Capabilities
Reasoning, Tool calling, Streaming, JSON output
Interfaces
OpenAI-style Chat Completions, Anthropic-style Messages, OpenAI-style Responses

Pricing

Per 1M tokens. The Cloakray price is what you are charged — no gateway fee is added on top of it.

Granite 4.2 8B pricing.
MetricPrice
Input$0.06
Cached input$0.015
Output$0.25

Why teams pick it

  • Granite 4.2 8B for OpenAI-style Chat Completions, Anthropic-style Messages, OpenAI-style Responses.

Call Granite 4.2 8B

Granite 4.2 8B answers on any of the APIs below — pick the one your code already speaks and just swap in your Cloakray key.

/v1/chat/completionsOpenAI-style Chat Completions · openai SDK or plain HTTP
curl https://api.cloakray.com/v1/chat/completions \
  -H "Authorization: Bearer ckr_..." \
  -H "Content-Type: application/json" \
  -d '{
  "model": "granite-4.2-8b",
  "messages": [
    {
      "role": "user",
      "content": "Hello"
    }
  ]
}'
/v1/messagesAnthropic-style Messages · @anthropic-ai/sdk SDK or plain HTTP
curl https://api.cloakray.com/v1/messages \
  -H "Authorization: Bearer ckr_..." \
  -H "Content-Type: application/json" \
  -d '{
  "model": "granite-4.2-8b",
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "Hello"
    }
  ]
}'
/v1/responsesOpenAI-style Responses · openai SDK or plain HTTP
curl https://api.cloakray.com/v1/responses \
  -H "Authorization: Bearer ckr_..." \
  -H "Content-Type: application/json" \
  -d '{
  "model": "granite-4.2-8b",
  "input": "Hello"
}'

Conversation compaction is also available at POST /v1/responses/compact.