{"openapi":"3.1.0","info":{"title":"Site Context Forge API","version":"0.1.0","description":"Paid x402 API for generating review-ready llms.txt site context."},"servers":[{"url":"https://service-x402.vercel.app"}],"paths":{"/v1/generate-llms-files":{"post":{"operationId":"generateLlmsFiles","summary":"Generate llms.txt site context files","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["websiteUrl"],"properties":{"websiteUrl":{"type":"string","format":"uri","pattern":"^https://"},"maxPages":{"type":"integer","minimum":1,"maximum":25,"default":20},"includeFullText":{"type":"boolean","default":true},"maxContentCharsPerPage":{"type":"integer","minimum":1000,"maximum":20000,"default":12000}}}}}},"responses":{"200":{"description":"Generated files and page inventory.","headers":{"PAYMENT-RESPONSE":{"schema":{"type":"string"}},"X-Site-Context-Job-Id":{"schema":{"type":"string","format":"uuid"}},"X-Site-Context-Output-Sha256":{"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerationResponse"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"x402 payment required.","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"}}}},"403":{"description":"URL is not eligible for crawling.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"No eligible public pages were crawled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Generation failed safely.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Payment facilitator failed or was unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Payment configuration is not ready.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"The bounded crawl timed out.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"ErrorResponse":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"GenerationResponse":{"type":"object","required":["site","pagesProcessed","files","fileContents","pages","note","delivery"],"properties":{"site":{"type":"string","format":"uri"},"pagesProcessed":{"type":"integer","minimum":1},"files":{"type":"array","items":{"type":"string","enum":["llms.txt","llms-full.txt"]}},"fileContents":{"type":"object","required":["llmsTxt"],"properties":{"llmsTxt":{"type":"string"},"llmsFullTxt":{"type":"string"}}},"pages":{"type":"array","items":{"type":"object"}},"note":{"type":"string"},"delivery":{"type":"object","additionalProperties":false,"required":["jobId","status","completedAt","durationMs","outputSha256"],"properties":{"jobId":{"type":"string","format":"uuid"},"status":{"type":"string","const":"completed"},"completedAt":{"type":"string","format":"date-time"},"durationMs":{"type":"integer","minimum":0},"outputSha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}}}}}}}}