{"uid":"cap_2U4oLBJBdx6uiNBNCT7k1","slug":"tenjin-x402-router-ece8d9e3","name":"Tenjin x402 Router","description":"Tenjin is the tool router for coding agents. Install it once, and it hands your agent the right tool when it helps, paid from one wallet.","url":"https://tenjin.sh/api/x402-router/route?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"anyOf":[{"type":"object","required":["schemaVersion","packet"],"properties":{"packet":{"type":"object","required":["current","history","literalUrls","historyStatus"],"properties":{"current":{"type":"object","required":["role","text"],"properties":{"role":{"enum":["user","assistant"],"type":"string"},"text":{"type":"string","maxLength":16000,"minLength":1}},"additionalProperties":false},"history":{"type":"array","items":{"type":"object","required":["role","text"],"properties":{"role":{"enum":["user","assistant"],"type":"string"},"text":{"type":"string","maxLength":16000,"minLength":1}},"additionalProperties":false},"maxItems":6},"literalUrls":{"type":"array","items":{"type":"string","maxLength":2000},"maxItems":8},"pendingCall":{"anyOf":[{"type":"object","required":["tool","query"],"properties":{"tool":{"type":"string","const":"WebSearch"},"query":{"type":"string","maxLength":4000,"minLength":1}},"additionalProperties":false},{"type":"object","required":["tool","url"],"properties":{"url":{"type":"string","maxLength":4000,"minLength":1},"tool":{"type":"string","const":"WebFetch"}},"additionalProperties":false},{"type":"object","required":["tool","question"],"properties":{"tool":{"type":"string","const":"AskUserQuestion"},"question":{"type":"string","maxLength":4000,"minLength":1}},"additionalProperties":false}]},"historyStatus":{"enum":["ok","unavailable"],"type":"string"},"nativeOutcome":{"type":"object","properties":{"code":{"type":"integer","maximum":999,"minimum":0},"bytes":{"type":"integer","maximum":9007199254740991,"minimum":0},"error":{"type":"string","maxLength":1000,"minLength":1},"reason":{"enum":["no_main_content"],"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"accepts":{"type":"array","items":{"type":"string","maxLength":32,"minLength":1},"maxItems":8},"gateHint":{"type":"object","required":["category","turnId","lookupId"],"properties":{"turnId":{"type":"string","maxLength":64,"minLength":1},"category":{"enum":["web research","read an exact page","crypto price quote","company profile by domain","company match by name or social URL","email verification","person enrichment","computation","library or API documentation","x post search","reddit post search"],"type":"string"},"lookupId":{"type":"string","maxLength":64,"minLength":1}},"additionalProperties":false},"sessionId":{"type":"string","maxLength":200,"minLength":1},"schemaVersion":{"type":"number","const":1}},"additionalProperties":false},{"type":"object","required":["schemaVersion","query"],"properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"query":{"type":"string","maxLength":8000,"minLength":1},"accepts":{"type":"array","items":{"type":"string","maxLength":32,"minLength":1},"maxItems":8},"gateHint":{"type":"object","required":["category","turnId","lookupId"],"properties":{"turnId":{"type":"string","maxLength":64,"minLength":1},"category":{"enum":["web research","read an exact page","crypto price quote","company profile by domain","company match by name or social URL","email verification","person enrichment","computation","library or API documentation","x post search","reddit post search"],"type":"string"},"lookupId":{"type":"string","maxLength":64,"minLength":1}},"additionalProperties":false},"schemaVersion":{"type":"number","const":1}},"additionalProperties":false}]},"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"}}}}},"responseSchema":{"type":"json","example":{"jev":{"calls":1,"latencyMs":420},"decision":{"action":"native","reason":"The host assistant and its own tools are enough for this step.","diagnostics":{"stage":"capability","missing":[],"nextAction":"Answer with the host assistant and its own tools; no paid capability fits this step.","reasonCode":"native_sufficient"}},"routerVersion":"2026-10-02.3","schemaVersion":1}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dPvevb7SqYbNTD2YSPaRY","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Routes an agent's current conversation turn to the best matching pay-per-call x402 service, returning its spec for the agent to fill and pay","exampleAgentPrompt":"I'm at a step in my research task where the user asked me to find recent news about battery technology — can you check Tenjin's router with the current conversation turn and tell me which x402 service fits this step best, so I know what to call and pay next?","exampleUseCases":[{"title":"Mid-task tool selection for research agent","prompt":"My agent just got a user message asking to summarize the latest papers on mRNA vaccines — send the conversation packet to Tenjin's router and tell me which x402 service should handle this research step."},{"title":"Web fetch routing during agentic browsing","prompt":"The user wants me to pull the content from a specific URL they mentioned — route this conversation turn through Tenjin to find out which x402 fetch service I should pay to get that page."},{"title":"Real-time query routing for a coding assistant","prompt":"A user just asked my coding agent how to fix a Python memory leak — use Tenjin's x402 router to figure out if there's a paid specialized service that fits this step better than my default tools."}],"resultDescription":"A routing decision identifying the best-matched x402 pay-per-call service for the given conversation turn, including the service spec the agent needs to fill out and pay. If no matching service is found, the answer settles at $0 with no routing gate. The response includes enough detail for the agent to immediately proceed with calling and paying the matched service.","failureModes":["No matching x402 service found — response indicates no fit, settles at $0","Malformed conversation packet — validation error on required fields (type, method, bodyType, body)","Conversation history exceeds 6 items — rejected by schema","Current turn text exceeds 16,000 characters — rejected","Payment not completed through x402 routing gate — answer settles at $0 and may be degraded","Rate limiting or service unavailability — HTTP 5xx response"],"whenToPreferThis":"Choose this endpoint when your agent needs dynamic, turn-level tool routing across the x402 ecosystem and wants a single call to determine the best-fit paid service for the current conversation step. Prefer it over static tool registries or hardcoded API selection when the task domain is uncertain, the conversation context matters, or you want to avoid paying for the wrong service. Especially valuable for orchestrators managing multi-step agentic workflows where different steps may require different specialized paid APIs.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T18:31:23.344Z","isFirstParty":false,"canonicalSlug":"tenjin-x402-router-ece8d9e3"}