{
  "openapi": "3.1.0",
  "info": {
    "title": "Lucas",
    "version": "1.0.0",
    "summary": "Pay-per-request research for AI agents.",
    "description": "Lucas sells sourced research to AI agents over x402, paid per request in USDC on Base. No account or API key. Every claim comes with a source, and anything that cannot be confirmed is marked unverified. Payment settles only after a successful response, so failed and rejected requests are never charged.",
    "termsOfService": "https://lucasnode.app/terms",
    "contact": {
      "name": "Lucas",
      "url": "https://lucasnode.app",
      "email": "hello@lucasnode.app"
    }
  },
  "externalDocs": {
    "description": "Full documentation",
    "url": "https://lucasnode.app/docs"
  },
  "servers": [
    {
      "url": "https://api.lucasnode.app"
    }
  ],
  "paths": {
    "/api/x402/fact-check": {
      "post": {
        "operationId": "factCheck",
        "summary": "Fact check ($0.05)",
        "description": "Checks one claim or yes/no question with one web search. Returns a verdict, a one-sentence answer and the source. Price: $0.05 USDC on Base via x402. Typically a few seconds.",
        "x-price": {
          "amount": "0.05",
          "currency": "USDC",
          "network": "eip155:8453",
          "protocol": "x402"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "claim"
                ],
                "properties": {
                  "claim": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 300,
                    "description": "A statement or yes/no question to check."
                  }
                }
              },
              "example": {
                "claim": "Supabase's Pro plan starts at $25 per month."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A sourced verdict.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "claim": {
                      "type": "string"
                    },
                    "verdict": {
                      "type": "string",
                      "enum": [
                        "true",
                        "false",
                        "partly_true",
                        "unverified"
                      ]
                    },
                    "answer": {
                      "type": "string"
                    },
                    "source": {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "source_type": {
                          "type": "string",
                          "enum": [
                            "official",
                            "third_party"
                          ]
                        }
                      }
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "high",
                        "medium",
                        "low"
                      ]
                    },
                    "checked_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "disclaimer": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body. The response explains what to fix. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. The PAYMENT-REQUIRED header holds the x402 v2 payment terms (USDC on Base, eip155:8453). Pay and retry with the payment header. Not charged."
          },
          "502": {
            "description": "The request could not be completed. Safe to retry. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/x402/research": {
      "post": {
        "operationId": "research",
        "summary": "Quick research ($0.25)",
        "description": "Answers a research question with key points, sources, a confidence rating and anything unverified. Price: $0.25 USDC on Base via x402. Typically about 11 seconds.",
        "x-price": {
          "amount": "0.25",
          "currency": "USDC",
          "network": "eip155:8453",
          "protocol": "x402"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "question"
                ],
                "properties": {
                  "question": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 500,
                    "description": "The research question."
                  },
                  "context": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "Background to focus the research."
                  }
                }
              },
              "example": {
                "question": "What does Supabase's Pro plan cost per month, and what is included?"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A sourced answer.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "question": {
                      "type": "string"
                    },
                    "answer": {
                      "type": "string"
                    },
                    "key_points": {
                      "type": "array",
                      "maxItems": 5,
                      "items": {
                        "type": "object",
                        "properties": {
                          "point": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string",
                            "format": "uri"
                          },
                          "source_type": {
                            "type": "string",
                            "enum": [
                              "official",
                              "third_party"
                            ]
                          }
                        }
                      }
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "high",
                        "medium",
                        "low"
                      ]
                    },
                    "unverified": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "disclaimer": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body. The response explains what to fix. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. The PAYMENT-REQUIRED header holds the x402 v2 payment terms (USDC on Base, eip155:8453). Pay and retry with the payment header. Not charged."
          },
          "502": {
            "description": "The request could not be completed. Safe to retry. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/x402/analyze": {
      "post": {
        "operationId": "analyze",
        "summary": "Data analysis ($0.20)",
        "description": "Answers a question about a table of data (CSV, JSON records, or an https link to a file up to 5 MB). Lucas writes Python, runs it in an isolated sandbox, and returns the answer with the exact code that produced it. Price: $0.20 USDC on Base via x402. Typically about 10 seconds.",
        "x-price": {
          "amount": "0.20",
          "currency": "USDC",
          "network": "eip155:8453",
          "protocol": "x402"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "question"
                ],
                "properties": {
                  "question": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 500,
                    "description": "What you want to know about the data."
                  },
                  "data": {
                    "type": "string",
                    "maxLength": 500000,
                    "description": "CSV text with a header row, or JSON records. Send this or data_url."
                  },
                  "data_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "An https link to a public CSV or JSON file (max 5 MB). Send this or data."
                  }
                }
              },
              "example": {
                "question": "Which month had the highest total revenue?",
                "data": "month,revenue\n2026-01,14200\n2026-02,15900\n2026-03,17960"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The answer, with the code that computed it.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "question": {
                      "type": "string"
                    },
                    "answer": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "value": {},
                        "table": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "maxItems": 20,
                          "items": {
                            "type": "object"
                          }
                        }
                      }
                    },
                    "code": {
                      "type": "string"
                    },
                    "assumptions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "high",
                        "medium",
                        "low"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "rows": {
                          "type": "integer"
                        },
                        "columns": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "computed_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "disclaimer": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body. The response explains what to fix. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. The PAYMENT-REQUIRED header holds the x402 v2 payment terms (USDC on Base, eip155:8453). Pay and retry with the payment header. Not charged."
          },
          "502": {
            "description": "The request could not be completed. Safe to retry. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/x402/leads": {
      "post": {
        "operationId": "leads",
        "summary": "Company lead research ($1.00)",
        "description": "Finds up to 3 companies matching your description, with each requirement checked and sourced. Companies only: no individual people, employee names, emails or phone numbers (requests for them are rejected). Companies that clearly fail a requirement are left out. Price: $1.00 USDC on Base via x402. Typically 20 to 50 seconds; allow up to 2 minutes.",
        "x-price": {
          "amount": "1.00",
          "currency": "USDC",
          "network": "eip155:8453",
          "protocol": "x402"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "description"
                ],
                "properties": {
                  "description": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 1000,
                    "description": "Who you are looking for: industry, location, size, platforms, signals."
                  },
                  "count": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3,
                    "default": 3
                  }
                }
              },
              "example": {
                "description": "Independent coffee roasters in Miami that sell online",
                "count": 3
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Matching companies with checked requirements.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request": {
                      "type": "object"
                    },
                    "requirements": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "companies": {
                      "type": "array",
                      "maxItems": 3,
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "website": {
                            "type": "string",
                            "format": "uri"
                          },
                          "summary": {
                            "type": "string"
                          },
                          "confidence": {
                            "type": "string",
                            "enum": [
                              "high",
                              "medium",
                              "low"
                            ]
                          },
                          "checks": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "requirement": {
                                  "type": "string"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "met",
                                    "unverified"
                                  ]
                                },
                                "evidence": {
                                  "type": "string"
                                },
                                "source": {
                                  "type": "string",
                                  "format": "uri"
                                },
                                "source_type": {
                                  "type": "string",
                                  "enum": [
                                    "official",
                                    "third_party"
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "notes": {
                      "type": "string"
                    },
                    "disclaimer": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body. The response explains what to fix. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment required. The PAYMENT-REQUIRED header holds the x402 v2 payment terms (USDC on Base, eip155:8453). Pay and retry with the payment header. Not charged."
          },
          "502": {
            "description": "The request could not be completed. Safe to retry. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      }
    }
  }
}