Returns JSON with a concise summary of the plain text you send (up to 20,000 characters): one short paragraph and key bullet points, written by IBM Granite 4.0 Micro on Workers AI.
Use this when you need to summarize text such as an article, notes or a transcript into a short summary.
Do not use for URLs or PDFs (extract the text first), exact quotes or citations.
Price: 0.008 USDC per call (x402, eip155:8453). Typical response time: 8000 ms (p95).
POST https://x402-gateway.blackwoodstate8.workers.dev/v1/summarize. A request without payment gets 402 Payment Required with the
PAYMENT-REQUIRED header; any x402 client signs an EIP-3009 authorization and retries with
PAYMENT-SIGNATURE (or X-PAYMENT). Invalid input is answered with 400 and not charged.
curl -i -X POST https://x402-gateway.blackwoodstate8.workers.dev/v1/summarize -H 'content-type: application/json' -d '{"text":"The x402 protocol turns the old HTTP 402 Payment Required status into a working payment step. When a client asks for a paid resource, the server answers 402 with machine-readable terms: price, network, asset and the address that receives the money. The client, often an AI agent, signs a USDC authorization and sends the request again. A facilitator checks the signature, settles the payment on-chain and the server returns the data. Sellers never handle cards or accounts, and buyers pay only for the calls they make.","maxBullets":3}'
| Pay to | 0x94732367107EB976574574C762709DEE88881474 |
|---|---|
| Asset | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 (USDC) |
| Amount | 8000 atomic units (0.008 USDC) |
| Authorization window | 60 s |
Streamable HTTP at https://x402-gateway.blackwoodstate8.workers.dev/mcp, tool blackwood_text_summarize. Payment goes in
_meta["x402/payment"]; without it the tool returns the payment requirements.
| Field | Type | Meaning |
|---|---|---|
text | string | Plain text to summarize, e.g. an article or a transcript (80 to 20,000 characters) |
maxBullets (optional) | integer | Most bullet points to return (1-10, default 5) |
language (optional) | string | Language for the summary, e.g. English or Portuguese (default: the language of the text) |
Example:
{
"text": "The x402 protocol turns the old HTTP 402 Payment Required status into a working payment step. When a client asks for a paid resource, the server answers 402 with machine-readable terms: price, network, asset and the address that receives the money. The client, often an AI agent, signs a USDC authorization and sends the request again. A facilitator checks the signature, settles the payment on-chain and the server returns the data. Sellers never handle cards or accounts, and buyers pay only for the calls they make.",
"maxBullets": 3
}
Real example:
{
"summary": "The x402 protocol updates the outdated HTTP 402 Payment Required status to enable a functional payment process. When a client requests a paid resource, the server responds with 402, including machine-readable details like price, network, asset, and the receiving address. The client, typically an AI agent, signs a USDC authorization and resubmits the request. A facilitator verifies the signature, processes the payment on-chain, and the server delivers the data. Sellers never manage cards or accounts, and buyers only pay for the actual calls they make.",
"bullets": [
"x402 protocol replaces HTTP 402 Payment Required with a functional payment step",
"Server sends 402 with machine-readable terms (price, network, asset, receiving address) to the client",
"AI agent signs USDC authorization, facilitator verifies and processes payment on-chain"
],
"model": "@cf/ibm-granite/granite-4.0-h-micro",
"inputChars": 518,
"usage": {
"promptTokens": 200,
"completionTokens": 173
}
}
{
"type": "object",
"properties": {
"summary": {
"type": "string"
},
"bullets": {
"type": "array",
"items": {
"type": "string"
}
},
"model": {
"type": "string"
},
"inputChars": {
"type": "number"
},
"usage": {
"type": "object",
"properties": {
"promptTokens": {
"type": [
"number",
"null"
]
},
"completionTokens": {
"type": [
"number",
"null"
]
}
},
"required": [
"promptTokens",
"completionTokens"
],
"additionalProperties": false
}
},
"required": [
"summary",
"bullets",
"model",
"inputChars",
"usage"
],
"additionalProperties": false
}Free schema and example: GET https://x402-gateway.blackwoodstate8.workers.dev/v1/summarize.
OpenAPI 3.1 · llms.txt · All services