{"openapi":"3.1.0","info":{"title":"Basalt","version":"0.1.0","description":"Autonomous economic agent — 15 paid tools for other AI agents, charging in USDC via x402 on Base.","x-guidance":"Basalt sells utility tools to AI agents, one per endpoint. Each route charges USDC (Base) via x402 before responding. Call it unpaid first to get the 402 challenge with the exact price, then retry with the payment signature. All endpoints are POST with a JSON body — see each operation's requestBody for the exact schema.","contact":{"email":"sebastian689@gmail.com"}},"paths":{"/extract":{"post":{"operationId":"url-metadata","summary":"Basalt — url-metadata","description":"Extracts title, description, image, and clean text from a URL — built for other agents to consume.","tags":["basalt"],"x-launched":"2026-09-08","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"}}},"example":{"url":"https://example.com"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"image":{"type":["string","null"]},"siteName":{"type":["string","null"]},"canonicalUrl":{"type":["string","null"]},"textExcerpt":{"type":"string"}},"required":["url","textExcerpt"]}}}},"402":{"description":"Payment Required"}}}},"/domain-check":{"post":{"operationId":"domain-check","summary":"Basalt — domain-check","description":"Checks whether a domain is available to register via RDAP, or who owns it and when it expires if not.","tags":["basalt"],"x-launched":"2026-09-08","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string"}}},"example":{"domain":"example.com"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"},"available":{"type":"boolean"},"registrar":{"type":["string","null"]},"createdAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"status":{"type":"array","items":{"type":"string"}}},"required":["domain","available"]}}}},"402":{"description":"Payment Required"}}}},"/email-check":{"post":{"operationId":"email-check","summary":"Basalt — email-check","description":"Validates email syntax and confirms real MX records for the domain — filters out addresses that can't receive mail.","tags":["basalt"],"x-launched":"2026-09-08","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"}}},"example":{"email":"hello@example.com"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"validSyntax":{"type":"boolean"},"domain":{"type":["string","null"]},"hasMxRecords":{"type":"boolean"},"mxHosts":{"type":"array","items":{"type":"string"}},"deliverable":{"type":"boolean"}},"required":["email","validSyntax","deliverable"]}}}},"402":{"description":"Payment Required"}}}},"/html-to-markdown":{"post":{"operationId":"html-to-markdown","summary":"Basalt — html-to-markdown","description":"Converts HTML to clean Markdown — so an agent doesn't have to build its own converter.","tags":["basalt"],"x-launched":"2026-09-08","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["html"],"properties":{"html":{"type":"string"}}},"example":{"html":"<h1>Hello</h1><p>World</p>"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"markdown":{"type":"string"}},"required":["markdown"]}}}},"402":{"description":"Payment Required"}}}},"/qrcode":{"post":{"operationId":"qrcode","summary":"Basalt — qrcode","description":"Generates a QR code (PNG, base64) for a text string or URL.","tags":["basalt"],"x-launched":"2026-09-08","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string"}}},"example":{"text":"https://basalt-n6lt.onrender.com"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"image":{"type":"string"}},"required":["text","image"]}}}},"402":{"description":"Payment Required"}}}},"/pdf-extract":{"post":{"operationId":"pdf-extract","summary":"Basalt — pdf-extract","description":"Extracts the text from a PDF given its URL.","tags":["basalt"],"x-launched":"2026-09-09","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"}}},"example":{"url":"https://bitcoin.org/bitcoin.pdf"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"pages":{"type":"number"},"text":{"type":"string"},"truncated":{"type":"boolean"}},"required":["url","pages","text"]}}}},"402":{"description":"Payment Required"}}}},"/ssl-check":{"post":{"operationId":"ssl-check","summary":"Basalt — ssl-check","description":"Checks a domain's TLS certificate: validity, issuer, and days until expiry.","tags":["basalt"],"x-launched":"2026-09-09","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string"}}},"example":{"domain":"example.com"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"},"valid":{"type":"boolean"},"issuer":{"type":["string","null"]},"subject":{"type":["string","null"]},"validFrom":{"type":"string"},"validTo":{"type":"string"},"daysUntilExpiry":{"type":"number"},"expired":{"type":"boolean"}},"required":["domain","valid","validTo"]}}}},"402":{"description":"Payment Required"}}}},"/language-detect":{"post":{"operationId":"language-detect","summary":"Basalt — language-detect","description":"Detects the language of a text (186 languages supported), returning the top 3 most likely matches.","tags":["basalt"],"x-launched":"2026-09-09","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string"}}},"example":{"text":"Hello, this is a test."}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"language":{"type":"string"},"confident":{"type":"boolean"},"candidates":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"score":{"type":"number"}}}}},"required":["language","confident"]}}}},"402":{"description":"Payment Required"}}}},"/json-validate":{"post":{"operationId":"json-validate","summary":"Basalt — json-validate","description":"Validates a JSON payload against a JSON Schema (draft 2020-12) and returns the exact validation errors.","tags":["basalt"],"x-launched":"2026-09-09","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["data","schema"],"properties":{"data":{},"schema":{"type":"object"}}},"example":{"data":{"name":"Ada","age":30},"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"age":{"type":"number"}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}},"required":["valid","errors"]}}}},"402":{"description":"Payment Required"}}}},"/verify-signature":{"post":{"operationId":"verify-signature","summary":"Basalt — verify-signature","description":"Recovers the signer of an EIP-191 or EIP-712 signature and checks it against a claimed address.","tags":["basalt"],"x-launched":"2026-09-09","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address","signature","message"],"properties":{"type":{"type":"string","enum":["personal","typed"],"default":"personal"},"address":{"type":"string"},"signature":{"type":"string"},"message":{},"domain":{"type":"object"},"types":{"type":"object"},"primaryType":{"type":"string"}}},"example":{"type":"personal","address":"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266","signature":"0x23b91915579c0f1891f7f7bb72d00c843c64a76c0af31580eb4dba3ad447cb594a56483d4873e0723252bc419cd414085366501ed1c3dd8ccf23561212b3945c1c","message":"Hello, Basalt!"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"recoveredAddress":{"type":"string"},"expectedAddress":{"type":"string"}},"required":["valid","recoveredAddress","expectedAddress"]}}}},"402":{"description":"Payment Required"}}}},"/financial-id-check":{"post":{"operationId":"financial-id-check","summary":"Basalt — financial-id-check","description":"Validates an IBAN (mod-97 checksum), BIC/SWIFT (ISO 9362 format), or card number (Luhn checksum).","tags":["basalt"],"x-launched":"2026-09-09","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","value"],"properties":{"type":{"type":"string","enum":["iban","bic","card"]},"value":{"type":"string"}}},"example":{"type":"iban","value":"DE89370400440532013000"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"},"valid":{"type":"boolean"},"formatted":{"type":["string","null"]},"countryCode":{"type":["string","null"]}},"required":["type","value","valid"]}}}},"402":{"description":"Payment Required"}}}},"/geo-distance":{"post":{"operationId":"geo-distance","summary":"Basalt — geo-distance","description":"Calculates great-circle distance (km/mi) and initial bearing between two lat/lng coordinates.","tags":["basalt"],"x-launched":"2026-09-09","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["from","to"],"properties":{"from":{"type":"object","required":["latitude","longitude"],"properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}}},"to":{"type":"object","required":["latitude","longitude"],"properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}}}}},"example":{"from":{"latitude":40.7128,"longitude":-74.006},"to":{"latitude":51.5074,"longitude":-0.1278}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"distanceKm":{"type":"number"},"distanceMi":{"type":"number"},"bearingDeg":{"type":"number"}},"required":["distanceKm","distanceMi","bearingDeg"]}}}},"402":{"description":"Payment Required"}}}},"/markdown-to-html":{"post":{"operationId":"markdown-to-html","summary":"Basalt — markdown-to-html","description":"Converts Markdown to HTML — the reverse direction of html-to-markdown.","tags":["basalt"],"x-launched":"2026-09-09","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["markdown"],"properties":{"markdown":{"type":"string"}}},"example":{"markdown":"# Hello\n\nWorld"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"html":{"type":"string"}},"required":["html"]}}}},"402":{"description":"Payment Required"}}}},"/timezone-convert":{"post":{"operationId":"timezone-convert","summary":"Basalt — timezone-convert","description":"Converts an ISO 8601 instant into the local wall-clock time of any IANA time zone, DST-aware.","tags":["basalt"],"x-launched":"2026-09-10","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["datetime","timezone"],"properties":{"datetime":{"type":"string","description":"ISO 8601 instant, must include an offset or 'Z'"},"timezone":{"type":"string","description":"IANA time zone name, e.g. 'America/New_York'"}}},"example":{"datetime":"2026-09-09T15:30:00Z","timezone":"America/New_York"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"utc":{"type":"string"},"local":{"type":"string"},"offset":{"type":"string"},"timezone":{"type":"string"}},"required":["utc","local","offset","timezone"]}}}},"402":{"description":"Payment Required"}}}},"/token-count":{"post":{"operationId":"token-count","summary":"Basalt — token-count","description":"Counts tokens in a text using real GPT-family BPE encodings (cl100k_base or o200k_base) — check length before calling an LLM.","tags":["basalt"],"x-launched":"2026-09-10","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string"},"encoding":{"type":"string","enum":["cl100k_base","o200k_base"]}}},"example":{"text":"Hola, esto es una prueba de conteo de tokens.","encoding":"cl100k_base"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"encoding":{"type":"string"},"characters":{"type":"number"},"tokens":{"type":"number"}},"required":["encoding","characters","tokens"]}}}},"402":{"description":"Payment Required"}}}}}}