# x402-gateway LLM Chat Completion (IBM Granite 4.0 Micro)

> x402-gateway LLM Chat Completion (IBM Granite 4.0 Micro) is a paid API for AI agents from x402-gateway.blackwoodstate8.workers.dev, paid per call via x402, $0.03/call, status unknown (last checked 2026-10-23).

Runs an asynchronous LLM chat completion using IBM Granite 4.0 Micro on Workers AI, returning a jobId and pollUrl for lightweight tasks like summarization, extraction, and classification.

## Facts

- Endpoint: POST https://x402-gateway.blackwoodstate8.workers.dev/v1/llm-chat?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-gateway-llm-chat-completion-ibm-granite-4-0-micro-5c203978
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UcN3v-pEYUrDR3M_sTgU4

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-gateway-llm-chat-completion-ibm-granite-4-0-micro-5c203978 -d '<json body>'
```

Example prompt: Use the cheap Granite model to classify this customer review as positive, negative, or neutral — here's the review: 'Shipping was fast but the product broke after two days.' Keep temperature at 0.1 and limit the response to 50 tokens.

## When to prefer this

Choose this endpoint when you need fast, cheap text inference for summarization, classification, or extraction tasks and do not need frontier model quality, tool calling, or streaming. It is ideal for high-volume, cost-sensitive pipelines where IBM Granite 4.0 Micro's capability is sufficient. Avoid it for complex reasoning, multi-step tool use, code generation requiring high accuracy, or tasks needing real-time streaming responses.

## Known failure modes

- Messages array missing or empty — returns validation error
- Content exceeds 32,000 character limit per message — returns schema error
- maxTokens set above 4096 — rejected by schema validation
- Poll URL expires before the job is retrieved — result unavailable
- Workers AI backend unavailable — job may fail or timeout beyond p95 8000ms
- Temperature outside 0-2 range — rejected by schema
- Payment not completed via x402 — call not initiated

## How this service works

Use when you need an llm chat completion for summaries, extraction or classification from a cheap open model. Do not use for frontier models, tool calling or streaming. Returns JSON with a chat completion from IBM Granite 4.0 Micro on Workers AI, with token usage for 0.002 USDC per thousand tokens, up to 0.03 USDC per call (clients without upto pay the cap). Asynchronous: the paid call returns a jobId and a free pollUrl; typical job time 8000 ms (p95). Category: Inference.

## Output

An asynchronous job response containing a jobId, a pollUrl to check status, an expiresAt timestamp, and a status field. After polling, the final result includes the chat completion text from IBM Granite 4.0 Micro, token usage counts, and a 'next' field suggesting the next call in the same family for chaining.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "messages"
     ],
     "properties": {
      "messages": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "role",
         "content"
        ],
        "properties": {
         "role": {
          "enum": [
           "system",
           "user",
           "assistant"
          ],
          "type": "string",
          "description": "Who wrote the message"
         },
         "content": {
          "type": "string",
          "maxLength": 32000,
          "minLength": 1,
          "description": "Message text"
         }
        }
       },
       "maxItems": 50,
       "minItems": 1,
       "description": "Conversation so far, oldest first, e.g. [{\"role\": \"user\", \"content\": \"Summarize: ...\"}]"
      },
      "maxTokens": {
       "type": "integer",
       "maximum": 4096,
       "minimum": 1,
       "description": "Maximum tokens to generate (1-4096, 512 when omitted); billed as requested"
      },
      "temperature": {
       "type": "number",
       "maximum": 2,
       "minimum": 0,
       "description": "Sampling temperature (0-2), e.g. 0.2 for near-deterministic output"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "jobId",
      "pollUrl",
      "expiresAt",
      "status"
     ],
     "properties": {
      "next": {
       "type": "object",
       "required": [
        "service",
        "tool",
        "method",
        "url",
        "useWhen",
        "sample"
       ],
       "properties": {
        "url": {
         "type": "string",
         "description": "Paid route of the next call"
        },
        "tool": {
         "type": "string",
         "description": "MCP tool name of the same call"
   
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "jobId": "job_00000000000000000000000000000000",
  "status": "queued",
  "pollUrl": "https://gateway.example/v1/llm-chat/jobs/job_00000000000000000000000000000000",
  "expiresAt": "2026-01-31T00:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-gateway-llm-chat-completion-ibm-granite-4-0-micro-5c203978/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-gateway.blackwoodstate8.workers.dev](https://www.zero.xyz/host/x402-gateway.blackwoodstate8.workers.dev/llms.txt)
