{
  "openapi": "3.0.3",
  "info": {
    "title": "Caelara Labs compatibility routes",
    "version": "1.0.0",
    "description": "Calls that many projects already make to scrape, email-verification, company-lookup, SEO-audit, token-audit, wallet-portfolio, document-extraction and entity-screening services, answered by the Caelara Labs edge APIs. Change the base URL and send your Caelara key (or an x402 payment) instead of the old credential.",
    "contact": {
      "email": "ops@caelaralabs.com",
      "url": "https://caelaralabs.com"
    }
  },
  "servers": [
    {
      "url": "https://compat.caelaralabs.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "CaelaraKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Caelara-Key"
      },
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      },
      "x402USDC": {
        "type": "apiKey",
        "in": "header",
        "name": "X-PAYMENT",
        "description": "x402 USDC payment on Base"
      }
    }
  },
  "paths": {
    "/v1/scrape": {
      "post": {
        "summary": "Fetch a page and return clean Markdown",
        "description": "HTML output is not offered; asking for another format returns 422. Calls api.caelaralabs.com/v1/url-to-markdown. 0.005 USDC per request. Returns { success, data: { markdown, metadata: { title, sourceURL, length } } }.",
        "security": [
          {
            "CaelaraKey": []
          },
          {
            "bearer": []
          },
          {
            "x402USDC": []
          }
        ],
        "x-caelara-price-usdc": "0.005",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "402": {
            "description": "Payment required: x402 USDC on Base, or send a key"
          },
          "502": {
            "description": "An upstream data source was unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Page address (required)"
                  },
                  "formats": {
                    "type": "array",
                    "description": "Optional. Only \"markdown\" is available.",
                    "items": {
                      "type": "string",
                      "enum": [
                        "markdown"
                      ]
                    }
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/email-verifier": {
      "get": {
        "summary": "Check whether an address can receive mail",
        "description": "Uses DNS signals only (MX, SPF, DMARC, disposable and role lists). The mailbox itself is never contacted, so \"deliverable\" means the domain can receive mail, not that the inbox exists. Two upstream calls per request. Calls api.caelaralabs.com/v1/lead-verify-composite and compliance.caelaralabs.com/v1/disposable-email-db. 0.030 USDC per request. Returns { success, email, result: deliverable | risky | undeliverable, score, checks: { syntax_valid, mx_found, mx_records, spf, dmarc, disposable, role_account, free_provider }, method }.",
        "security": [
          {
            "CaelaraKey": []
          },
          {
            "bearer": []
          },
          {
            "x402USDC": []
          }
        ],
        "x-caelara-price-usdc": "0.030",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "402": {
            "description": "Payment required: x402 USDC on Base, or send a key"
          },
          "502": {
            "description": "An upstream data source was unavailable"
          }
        },
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": true,
            "description": "Address to check (required)",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/company/find": {
      "get": {
        "summary": "Look up a company from its domain",
        "description": "Built from the public home page, DNS and MX records. Fields the site does not publish are null. Calls api.caelaralabs.com/v1/company-intel-composite. 0.025 USDC per request. Returns { success, domain, name, description, website, logo, social: { twitter, linkedin, github }, email_provider, mx_records, ip_addresses, retrieved_at }.",
        "security": [
          {
            "CaelaraKey": []
          },
          {
            "bearer": []
          },
          {
            "x402USDC": []
          }
        ],
        "x-caelara-price-usdc": "0.025",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "402": {
            "description": "Payment required: x402 USDC on Base, or send a key"
          },
          "502": {
            "description": "An upstream data source was unavailable"
          }
        },
        "parameters": [
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "description": "Company domain such as example.com (required)",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/seo/audit": {
      "get": {
        "summary": "Check AI-search readiness: llms.txt, AI crawler access, structured data",
        "description": "Scores generative-engine readiness, not rankings. Calls seo.caelaralabs.com/v1/geo-readiness-composite. 0.025 USDC per request. Returns { success, url, score, grade, breakdown, checks: { llms_txt, ai_crawlers, structured_data }, recommendations }.",
        "security": [
          {
            "CaelaraKey": []
          },
          {
            "bearer": []
          },
          {
            "x402USDC": []
          }
        ],
        "x-caelara-price-usdc": "0.025",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "402": {
            "description": "Payment required: x402 USDC on Base, or send a key"
          },
          "502": {
            "description": "An upstream data source was unavailable"
          }
        },
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Page or site address (required)",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/token/audit": {
      "get": {
        "summary": "Safety audit for a Solana mint or an EVM token contract",
        "description": "Mint and freeze authority, Token-2022 extensions and holder concentration on Solana; proxy, owner and privileged functions on EVM; DEX liquidity on both. A heuristic screen, not financial advice. Read-only: nothing is signed or sent. Calls crypto.caelaralabs.com/v1/token-safety-composite. 0.025 USDC per request. Returns { success, address, chain, score, risk_level, flags: [{ id, severity, detail }], liquidity, onchain, disclaimer }.",
        "security": [
          {
            "CaelaraKey": []
          },
          {
            "bearer": []
          },
          {
            "x402USDC": []
          }
        ],
        "x-caelara-price-usdc": "0.025",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "402": {
            "description": "Payment required: x402 USDC on Base, or send a key"
          },
          "502": {
            "description": "An upstream data source was unavailable"
          }
        },
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "required": true,
            "description": "Solana mint or 0x token contract (required)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chain",
            "in": "query",
            "required": false,
            "description": "Optional: solana, base, ethereum, arbitrum or optimism (EVM default base; Solana is detected from the address)",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/wallet/portfolio": {
      "get": {
        "summary": "USD portfolio for a Solana or EVM wallet",
        "description": "Solana: native SOL plus SPL and Token-2022 accounts priced from DEX pools. EVM: native balance plus a curated list of major tokens per chain. Read-only. Calls crypto.caelaralabs.com/v1/wallet-portfolio-composite. 0.025 USDC per request. Returns { success, address, chain, total_value_usd, holdings: [{ asset, kind, balance, price_usd, value_usd, allocation_pct }], unpriced_assets, coverage, as_of }.",
        "security": [
          {
            "CaelaraKey": []
          },
          {
            "bearer": []
          },
          {
            "x402USDC": []
          }
        ],
        "x-caelara-price-usdc": "0.025",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "402": {
            "description": "Payment required: x402 USDC on Base, or send a key"
          },
          "502": {
            "description": "An upstream data source was unavailable"
          }
        },
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "required": true,
            "description": "Solana or 0x wallet address (required)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chain",
            "in": "query",
            "required": false,
            "description": "Optional: solana, base, ethereum, arbitrum or optimism (EVM default base)",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/document/extract": {
      "post": {
        "summary": "Turn invoice or receipt text into structured JSON",
        "description": "Works on text, not images or PDFs: extract the text first. Fields the document does not state are null. Calls docs.caelaralabs.com/v1/invoice-json-composite. 0.025 USDC per request. Returns { success, type, data: { invoice_number, issue_date, due_date, currency, vendor, bill_to, tax_id, line_items, totals }, checks, method }.",
        "security": [
          {
            "CaelaraKey": []
          },
          {
            "bearer": []
          },
          {
            "x402USDC": []
          }
        ],
        "x-caelara-price-usdc": "0.025",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "402": {
            "description": "Payment required: x402 USDC on Base, or send a key"
          },
          "502": {
            "description": "An upstream data source was unavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Invoice or receipt as plain text, 3,500 characters at most (required)"
                  },
                  "type": {
                    "type": "string",
                    "description": "Optional: invoice (default) or receipt"
                  }
                },
                "required": [
                  "text"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/compliance/entity": {
      "get": {
        "summary": "Entity KYB screen: sanctions name match, tax ID, IBAN and BIC, email and optional domain trust",
        "description": "The built-in sanctions list is a small illustrative seed set; for production screening send an authoritative watchlist to the KYB endpoint directly. Not a regulated KYB service. Calls compliance.caelaralabs.com/v1/entity-kyb-composite and compliance.caelaralabs.com/v1/domain-trust-composite (only with domain). 0.025 USDC per request. Returns { success, entity, verdict: approve | review | reject, risk_flags, sanctions, tax_id, iban, bic, email, domain_trust, disclaimer }.",
        "security": [
          {
            "CaelaraKey": []
          },
          {
            "bearer": []
          },
          {
            "x402USDC": []
          }
        ],
        "x-caelara-price-usdc": "0.025",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "402": {
            "description": "Payment required: x402 USDC on Base, or send a key"
          },
          "502": {
            "description": "An upstream data source was unavailable"
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "description": "Legal entity name (required)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vat",
            "in": "query",
            "required": false,
            "description": "Optional VAT number with country prefix, or US EIN",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "iban",
            "in": "query",
            "required": false,
            "description": "Optional IBAN",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bic",
            "in": "query",
            "required": false,
            "description": "Optional BIC/SWIFT",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "description": "Optional contact email",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "domain",
            "in": "query",
            "required": false,
            "description": "Optional company domain: adds a domain trust report for a further 0.025 USDC",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}