{"components":{"securitySchemes":{}},"info":{"contact":{"email":"x402@capousd-student-tools.me","name":"Tarnak x402 Toolkit","url":"https://api.capousd-student-tools.me"},"description":"Keyless pay-per-call APIs for AI agents on Base. USDC settlement via x402 v2 (PayAI facilitator). Every priced route returns HTTP 402 with a PAYMENT-REQUIRED header.","title":"Tarnak x402 Toolkit","version":"1.0.0","x-guidance":"Paid routes answer HTTP 402 before input validation; read the PAYMENT-REQUIRED header (x402 v2, eip155:8453, USDC) and retry with PAYMENT-SIGNATURE. Free sample: GET /v1/token/verdict/free?address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 (10/IP/day). Machine docs: /.well-known/x402, /llms.txt, /agents.json, /v1/tools."},"openapi":"3.1.0","paths":{"/v1/extract":{"post":{"description":"URL or HTML -> clean markdown, title, meta","operationId":"post-v1-extract","requestBody":{"content":{"application/json":{"schema":{"properties":{"html":{"type":"string"},"url":{"type":"string"}},"required":["url"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Result (payment settled)"},"402":{"description":"Payment required (x402 challenge in PAYMENT-REQUIRED header)"}},"summary":"URL or HTML -> clean markdown, title, meta","x-payment-info":{"price":{"amount":"0.004000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/gas":{"get":{"description":"Get the gas price on Base mainnet: base fee, priority fee and suggested max fee (gwei) before sending a transaction","operationId":"get-v1-gas","parameters":[],"responses":{"200":{"description":"Result (payment settled)"},"402":{"description":"Payment required (x402 challenge in PAYMENT-REQUIRED header)"}},"summary":"Get the gas price on Base mainnet: base fee, priority fee and suggested max fee (gwei) before sending a transaction","x-payment-info":{"price":{"amount":"0.002000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/gpu/prices":{"get":{"description":"Compare GPU rental prices and find the cheapest H100/A100/RTX rental per hour: a GPU rental comparison across DePIN networks covering decentralized GPU rental, H100 vs A100 cost, GPU cloud pricing and AI compute cost per hour. Use before renting AI compute or choosing the cheapest A100/H100. GET ?model=A100 (or H100), no API key. $0.01/call in USDC on Base.","operationId":"get-v1-gpu-prices","parameters":[{"in":"query","name":"model","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Result (payment settled)"},"402":{"description":"Payment required (x402 challenge in PAYMENT-REQUIRED header)"}},"summary":"Compare GPU rental prices and find the cheapest H100/A100/RTX rental per hour: a GPU rental comparison across DePIN networks covering decentralized GPU rental, H100 vs A100 cost, GPU cloud pricing and AI compute cost per hour. Use before renting AI compute or choosing the cheapest A100/H100. GET ?model=A100 (or H100), no API key. $0.01/call in USDC on Base.","x-payment-info":{"price":{"amount":"0.010000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/gpu/procurement":{"get":{"description":"GPU procurement decision for a workload: model, hours, quantization and optional budget in; recommended GPU offer, alternatives, required GPU count, all-in cost and a rent/caution/hold call out. Use before renting compute for llama-3-70b, Mixtral, Qwen or DeepSeek. GET ?model=llama-3-70b&hours=24, no API key. $5.00/call in USDC on Base.","operationId":"get-v1-gpu-procurement","parameters":[{"in":"query","name":"model","required":true,"schema":{"type":"string"}},{"in":"query","name":"hours","required":false,"schema":{"type":"integer"}},{"in":"query","name":"quantization","required":false,"schema":{"type":"integer"}},{"in":"query","name":"gpu_count","required":false,"schema":{"type":"integer"}},{"in":"query","name":"budget_usd","required":false,"schema":{"type":"number"}},{"in":"query","name":"region","required":false,"schema":{"type":"string"}},{"in":"query","name":"allow_multi_gpu","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Result (payment settled)"},"402":{"description":"Payment required (x402 challenge in PAYMENT-REQUIRED header)"}},"summary":"GPU procurement decision for a workload: model, hours, quantization and optional budget in; recommended GPU offer, alternatives, required GPU count, all-in cost and a rent/caution/hold call out. Use before renting compute for llama-3-70b, Mixtral, Qwen or DeepSeek. GET ?model=llama-3-70b&hours=24, no API key. $5.00/call in USDC on Base.","x-payment-info":{"price":{"amount":"5.000000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}},"post":{"description":"GPU procurement decision for a workload JSON body: {model, hours, quantization?, gpu_count?, budget_usd?, region?}. Returns recommended GPU offer, alternatives, all-in cost and a rent/caution/hold call. No API key. $5.00/call in USDC on Base.","operationId":"post-v1-gpu-procurement","requestBody":{"content":{"application/json":{"schema":{"properties":{"allow_multi_gpu":{"type":"boolean"},"budget_usd":{"type":"number"},"gpu_count":{"type":"integer"},"hours":{"type":"integer"},"model":{"type":"string"},"quantization":{"type":"integer"},"region":{"type":"string"}},"required":["model"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Result (payment settled)"},"402":{"description":"Payment required (x402 challenge in PAYMENT-REQUIRED header)"}},"summary":"GPU procurement decision for a workload JSON body: {model, hours, quantization?, gpu_count?, budget_usd?, region?}. Returns recommended GPU offer, alternatives, all-in cost and a rent/caution/hold call. No API key. $5.00/call in USDC on Base.","x-payment-info":{"price":{"amount":"5.000000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/gpu/report":{"get":{"description":"Decision-ready GPU rental cost report for 24-720 GPU-hours. Avoid paying $30 more for a 24h H100 rental. Compare spreads, uptime, and get a rent/hold decision. Returns cheapest and recommended A100/H100/RTX offers, price spread, estimated cost for your hours, 7-day price history and a rent/don't-rent call - more useful than a raw price list when an agent must choose a provider. GET ?model=A100&hours=24, optional compare=H100, format=json|markdown, no API key. $0.10/call in USDC on Base.","operationId":"get-v1-gpu-report","parameters":[{"in":"query","name":"model","required":false,"schema":{"type":"string"}},{"in":"query","name":"hours","required":false,"schema":{"type":"integer"}},{"in":"query","name":"compare","required":false,"schema":{"type":"string"}},{"in":"query","name":"format","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Result (payment settled)"},"402":{"description":"Payment required (x402 challenge in PAYMENT-REQUIRED header)"}},"summary":"Decision-ready GPU rental cost report for 24-720 GPU-hours. Avoid paying $30 more for a 24h H100 rental. Compare spreads, uptime, and get a rent/hold decision. Returns cheapest and recommended A100/H100/RTX offers, price spread, estimated cost for your hours, 7-day price history and a rent/don't-rent call - more useful than a raw price list when an agent must choose a provider. GET ?model=A100&hours=24, optional compare=H100, format=json|markdown, no API key. $0.10/call in USDC on Base.","x-payment-info":{"price":{"amount":"0.100000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/inference":{"post":{"description":"OpenAI-compatible chat completions from the local abliterated Qwen2.5 model. Send {model, messages, max_tokens?}; returns an OpenAI-shaped response. One call includes up to 1,000 completion tokens; max_tokens is capped at 1,000. No account or API key; pay per call in USDC on Base. $0.002/call.","operationId":"post-v1-inference","requestBody":{"content":{"application/json":{"schema":{"properties":{"max_tokens":{"type":"integer"},"messages":{"type":"string"},"model":{"type":"string"},"stop":{"type":"string"},"temperature":{"type":"number"},"top_p":{"type":"number"}},"required":["messages"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Result (payment settled)"},"402":{"description":"Payment required (x402 challenge in PAYMENT-REQUIRED header)"}},"summary":"OpenAI-compatible chat completions from the local abliterated Qwen2.5 model. Send {model, messages, max_tokens?}; returns an OpenAI-shaped response. One call includes up to 1,000 completion tokens; max_tokens is capped at 1,000. No account or API key; pay per call in USDC on Base. $0.002/call.","x-payment-info":{"price":{"amount":"0.002000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/inference/chat/completions":{"post":{"description":"OpenAI SDK-compatible path alias for /v1/inference. Base URL https://api.capousd-student-tools.me/v1/inference, model local, $0.002/call for up to 1,000 completion tokens; no API key.","operationId":"post-v1-inference-chat-completions","requestBody":{"content":{"application/json":{"schema":{"properties":{"max_tokens":{"type":"integer"},"messages":{"type":"string"},"model":{"type":"string"},"stop":{"type":"string"},"temperature":{"type":"number"},"top_p":{"type":"number"}},"required":["messages"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Result (payment settled)"},"402":{"description":"Payment required (x402 challenge in PAYMENT-REQUIRED header)"}},"summary":"OpenAI SDK-compatible path alias for /v1/inference. Base URL https://api.capousd-student-tools.me/v1/inference, model local, $0.002/call for up to 1,000 completion tokens; no API key.","x-payment-info":{"price":{"amount":"0.002000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/markdown":{"get":{"description":"URL to markdown: fetch a public URL (or raw HTML) and convert it to clean markdown, title and meta for LLM ingestion","operationId":"get-v1-markdown","parameters":[{"in":"query","name":"url","required":true,"schema":{"type":"string"}},{"in":"query","name":"html","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Result (payment settled)"},"402":{"description":"Payment required (x402 challenge in PAYMENT-REQUIRED header)"}},"summary":"URL to markdown: fetch a public URL (or raw HTML) and convert it to clean markdown, title and meta for LLM ingestion","x-payment-info":{"price":{"amount":"0.004000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/providers/rank":{"get":{"description":"Compare DePIN compute providers and DePIN compute cost: a GPU provider comparison ranking H100/A100/RTX rental providers by uptime, price and network. Use when choosing a reliable DePIN GPU provider or comparing decentralized GPU rental options; for latency-sensitive placement, compare provider uptime and network before renting. $0.01/call in USDC on Base, no API key.","operationId":"get-v1-providers-rank","parameters":[{"in":"query","name":"network","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Result (payment settled)"},"402":{"description":"Payment required (x402 challenge in PAYMENT-REQUIRED header)"}},"summary":"Compare DePIN compute providers and DePIN compute cost: a GPU provider comparison ranking H100/A100/RTX rental providers by uptime, price and network. Use when choosing a reliable DePIN GPU provider or comparing decentralized GPU rental options; for latency-sensitive placement, compare provider uptime and network before renting. $0.01/call in USDC on Base, no API key.","x-payment-info":{"price":{"amount":"0.010000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/repair":{"post":{"description":"Repair malformed JSON from LLM output","operationId":"post-v1-repair","requestBody":{"content":{"application/json":{"schema":{"properties":{"json":{"type":"string"}},"required":["json"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Result (payment settled)"},"402":{"description":"Payment required (x402 challenge in PAYMENT-REQUIRED header)"}},"summary":"Repair malformed JSON from LLM output","x-payment-info":{"price":{"amount":"0.005000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/services":{"get":{"description":"Find x402-payable DePIN/data services by task: an x402 service directory to list DePIN services and agent-buyable APIs with price and network","operationId":"get-v1-services","parameters":[{"in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"in":"query","name":"max_price","required":false,"schema":{"type":"number"}},{"in":"query","name":"category","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Result (payment settled)"},"402":{"description":"Payment required (x402 challenge in PAYMENT-REQUIRED header)"}},"summary":"Find x402-payable DePIN/data services by task: an x402 service directory to list DePIN services and agent-buyable APIs with price and network","x-payment-info":{"price":{"amount":"0.002000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/text":{"post":{"description":"stats, keywords, sentiment, chunks","operationId":"post-v1-text","requestBody":{"content":{"application/json":{"schema":{"properties":{"chunk_size":{"type":"integer"},"keywords":{"type":"integer"},"text":{"type":"string"}},"required":["text"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Result (payment settled)"},"402":{"description":"Payment required (x402 challenge in PAYMENT-REQUIRED header)"}},"summary":"stats, keywords, sentiment, chunks","x-payment-info":{"price":{"amount":"0.003000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/token/risk":{"get":{"description":"Focused rug/honeypot risk report: honeypot, buy/sell tax, top-10 concentration, blockers","operationId":"get-v1-token-risk","parameters":[{"in":"query","name":"address","required":true,"schema":{"type":"string"}},{"in":"query","name":"chain","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Result (payment settled)"},"402":{"description":"Payment required (x402 challenge in PAYMENT-REQUIRED header)"}},"summary":"Focused rug/honeypot risk report: honeypot, buy/sell tax, top-10 concentration, blockers","x-payment-info":{"price":{"amount":"0.004000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/token/verdict":{"get":{"description":"Should your agent buy this token? GoPlus contract risk + DexScreener market data, plus a 2-3 sentence AI narrative, a 0-100 risk score and a confidence label. Free sample at /v1/token/verdict/free (10/IP/day); $0.02/call in USDC on Base.","operationId":"get-v1-token-verdict","parameters":[{"in":"query","name":"address","required":true,"schema":{"type":"string"}},{"in":"query","name":"chain","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Result (payment settled)"},"402":{"description":"Payment required (x402 challenge in PAYMENT-REQUIRED header)"}},"summary":"Should your agent buy this token? GoPlus contract risk + DexScreener market data, plus a 2-3 sentence AI narrative, a 0-100 risk score and a confidence label. Free sample at /v1/token/verdict/free (10/IP/day); $0.02/call in USDC on Base.","x-payment-info":{"price":{"amount":"0.020000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/token/verdict/free":{"get":{"description":"free sample of the token verdict, 10 calls/IP/day, not listed in Bazaar","operationId":"get-v1-token-verdict-free","parameters":[{"in":"query","name":"address","required":true,"schema":{"type":"string"}},{"in":"query","name":"chain","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Free result (rate limited per client IP)"},"429":{"description":"Free-sample daily limit reached (Retry-After: 86400)"}},"security":[],"summary":"free sample of the token verdict, 10 calls/IP/day, not listed in Bazaar"}},"/v1/util/hash":{"get":{"description":"sha256/slugify/base64","operationId":"get-v1-util-hash","parameters":[{"in":"query","name":"text","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Result (payment settled)"},"402":{"description":"Payment required (x402 challenge in PAYMENT-REQUIRED header)"}},"summary":"sha256/slugify/base64","x-payment-info":{"price":{"amount":"0.001000","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}}},"servers":[{"url":"https://api.capousd-student-tools.me"}],"x-x402":{"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","facilitator":"https://facilitator.payai.network","manifest":"https://api.capousd-student-tools.me/.well-known/x402","network":"eip155:8453","version":2}}
