Granite 4.0 H Micro

Models

Model details

Model
workers-ai/@cf/ibm-granite/granite-4.0-h-micro
Provider
cloudflare-ai-gateway
API
openai-completions
Base URL
https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/compat
Input
text
Reasoning
No
Context window
131,000
Max tokens
131,000
Show configuration
{
  "providers": {
    "cloudflare-ai-gateway": {
      "apiKey": "YOUR_API_KEY",
      "models": [
        {
          "id": "workers-ai/@cf/ibm-granite/granite-4.0-h-micro",
          "name": "Granite 4.0 H Micro",
          "reasoning": false,
          "input": [
            "text"
          ],
          "contextWindow": 131000,
          "maxTokens": 131000,
          "cost": {
            "input": 0.017,
            "output": 0.112,
            "cacheRead": 0,
            "cacheWrite": 0
          },
          "compat": {
            "supportsStore": false,
            "supportsDeveloperRole": false,
            "supportsReasoningEffort": false,
            "maxTokensField": "max_tokens",
            "supportsLongCacheRetention": false,
            "sendSessionAffinityHeaders": true
          }
        }
      ],
      "api": "openai-completions",
      "baseUrl": "https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/compat"
    }
  }
}

Pricing

USD per million tokens. A tier is selected from the total input tokens in each request and applies to that entire request.

Pricing rates for Granite 4.0 H Micro
Request inputInputOutputCache readCache write
All requests$0.017$0.112$0$0

Session cost calculator

Estimate the requests made during an agent session. A user turn can make several model calls while using tools, so costs are calculated per model request.

Session shape
Rounded median shapes from recent Pi agent sessions.
Warm-request cache reuse
Effective token reuse combines partial hits and occasional complete misses.
Estimated session$0.00
Uncached input
—
Cache reads
—
Uncached prefixes
—
Cache writes
—
Output
—
Without caching
—

The first request starts cold unless marked otherwise. Output is billed separately from context growth because reasoning tokens are not always retained. This remains a directional estimate: providers differ in eligibility, rounding, and retention.

Compatibility flags

Effective values after applying Pi's API defaults and model overrides.

Effective compatibility flags for Granite 4.0 H Micro
FeatureValue
supportsStoreNo
supportsDeveloperRoleNo
supportsReasoningEffortNo
supportsUsageInStreamingYes
maxTokensFieldmax_tokens
requiresToolResultNameNo
requiresAssistantAfterToolResultNo
requiresThinkingAsTextNo
requiresReasoningContentOnAssistantMessagesNo
thinkingFormatopenai
openRouterRoutingEmpty
vercelGatewayRoutingEmpty
chatTemplateKwargsEmpty
zaiToolStreamNo
supportsStrictModeYes
cacheControlFormatNone
sendSessionAffinityHeadersYes
supportsLongCacheRetentionNo