# x402 AI Gateway – Text Summarization

> x402 AI Gateway – Text Summarization is a paid API for AI agents from x402-ai-gateway-rosy.vercel.app, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Summarizes a block of text using Gemini 2.0 Flash, returning a concise summary, with payment via USDC on Base or Solana.

## Facts

- Endpoint: POST https://x402-ai-gateway-rosy.vercel.app/api/summarize
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-ai-gateway-text-summarization-18b86ec9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bZAV9ntaCK3JgykGeI9Hz

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-ai-gateway-text-summarization-18b86ec9 -d '<json body>'
```

Example prompt: Summarize the following article in no more than 3 sentences, paying with USDC: 'Artificial intelligence has rapidly transformed industries ranging from healthcare to finance, enabling automation of complex tasks that once required human expertise. Companies are investing billions in AI research, and governments are scrambling to regulate the technology before it outpaces oversight.'

## When to prefer this

Choose this endpoint when you need fast, AI-powered text summarization backed by Gemini 2.0 Flash and are willing to pay micro-transactions in USDC per call. Ideal for agents operating in crypto-native environments that already handle x402 payment flows on Base or Solana.

## Known failure modes

- Missing required 'text' field returns a 400 validation error
- Payment not provided or insufficient USDC returns a 402 Payment Required response
- Text too long or malformed causes a 500 server error
- Network timeout if Gemini 2.0 Flash API is slow or unavailable
- Invalid maxSentences value (e.g. negative number) may cause unexpected output or error

## How this service works

AI-powered API endpoints powered by Gemini 2.0 Flash. Pay with USDC on Base or Solana.

## Output

Returns a JSON object containing the summarized version of the input text, condensed to the specified number of sentences or a reasonable default length if not specified.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "text"
 ],
 "properties": {
  "text": {
   "type": "string",
   "description": "Text to summarize"
  },
  "maxSentences": {
   "type": "integer"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-ai-gateway-text-summarization-18b86ec9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-ai-gateway-rosy.vercel.app](https://www.zero.xyz/host/x402-ai-gateway-rosy.vercel.app/llms.txt)
