Collection of example client-side recipes for calling paid X402 API endpoints using the @x402/fetch library with EVM-based payment signing
This server exposes 5 HTTP-based tools for paid API calls (article summarization, FX rates, image generation, translation, web search). All tools have descriptions and basic input schemas with typed parameters. However, critical gaps undermine production readiness: (1) No output schemas documented, LLMs cannot predict response structure for chaining; (2) Parameter descriptions lack constraints (enums, ranges, formats), e.g., 'tier' in image-generate has no valid values listed, 'recency' in answer-web is undocumented; (3) No error handling guidance, tools fail silently with no recovery hints; (4) Tool names lack action verbs, 'article-brief', 'exchange-rates', 'image-generate' are noun-heavy, not verb_noun pattern; (5) No idempotency or retry semantics documented despite payment-per-call model where retries are critical. Descriptions are adequate (50-100 chars) but generic. This is a thin wrapper around external paid APIs with minimal agent-optimization.
Get a cited answer to a question from live web search, in one call
Turn a news article URL into a summary, entities, and sentiment in one paid call
Get current FX rates without a data-vendor subscription
Turn a text prompt into a hosted PNG, paying per call
Translate text between languages without an i18n API contract
No output schemas documented. LLMs cannot predict response structure, breaking tool chaining and forcing exploratory calls.
Tool names lack action verbs. 'article-brief', 'exchange-rates', 'image-generate' are noun-heavy; should be 'summarize_article', 'get_exchange_rate', 'generate_image' to match verb_noun convention.
Parameter constraints missing. 'tier' in image-generate has no enum; 'recency' in answer-web lacks valid values; 'target_language' in translate has no format hint. LLMs will hallucinate invalid values.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 40 | 2026-07-28+ | v2 |
No error handling guidance. Tools fail with no recovery hints. E.g., if image-generate times out or translate hits an unsupported language, LLM has no guidance on retry strategy or fallback.
Idempotency and retry semantics undocumented. Payment-per-call model requires explicit idempotency guarantees. No mention of request deduplication, idempotency keys, or safe retry windows.