{"openapi":"3.1.0","info":{"title":"RegLayer Agent API","version":"2026-08-28.1","description":"Purchase and retrieve an Instant Brief for a regulatory question or a Check for supplied working materials. Policy research and regulatory intelligence; not legal advice."},"servers":[{"url":"https://reglayer.com"}],"paths":{"/api/agent/v1/products":{"get":{"summary":"List agent-accessible products","operationId":"listAgentProducts","responses":{"200":{"description":"Product catalogue","content":{"application/json":{"schema":{"type":"object","required":["ok","products","notice"],"properties":{"ok":{"const":true},"api_version":{"type":"string"},"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"payment_protocol":{"type":"string"},"notice":{"type":"string"}}}}}}}}},"/api/agent/v1/instant-briefs":{"post":{"summary":"Purchase an Instant Brief","operationId":"purchaseInstantBrief","description":"Requires a stable Idempotency-Key. Each Instant Brief costs $0.99. The first request returns HTTP 402 with an MPP Stripe Shared Payment Token challenge. Pay by retrying the same request and idempotency key with the Payment-Credential header. Retain the private RegLayer-Access-Token returned with the first response. After HTTP 202, close the request and poll the private status URL every 20 seconds. Email access is not required.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":12},"description":"Stable unique key for this request."},{"name":"RegLayer-Agent-Id","in":"header","required":false,"schema":{"type":"string","minLength":8},"description":"Stable agent identifier used for abuse controls and order analytics. Email and IP limits also apply."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseRequest"},"examples":{"focusedBrief":{"value":{"product":"instant_brief","email":"operator@example.com","name":"Research Agent","company_name":"Example Company","question":"What must the company address before launch?","decision_context":"The company plans to launch the product next quarter.","product_context":"The company provides business software and processes customer account data.","jurisdictions":["United States (federal)"],"terms_accepted":true}}}}}},"responses":{"202":{"description":"Free access or payment accepted. Research runs asynchronously; poll the status URL every 20 seconds.","headers":{"Payment-Receipt":{"schema":{"type":"string"}},"Retry-After":{"schema":{"type":"integer","const":20}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"description":"Invalid scope or request"},"402":{"description":"Payment required. Pay $0.99 with an MPP Stripe Shared Payment Token.","headers":{"WWW-Authenticate":{"schema":{"type":"string"}},"RegLayer-Order-Id":{"schema":{"type":"string"}},"RegLayer-Access-Token":{"schema":{"type":"string"},"description":"Private retrieval credential. Returned once. Store it securely."}}},"409":{"description":"Idempotency key reused with different input"},"429":{"description":"Daily order creation limit reached"}}}},"/api/agent/v1/instant-briefs/{order_id}":{"get":{"summary":"Read order status","operationId":"getInstantBriefStatus","parameters":[{"$ref":"#/components/parameters/OrderId"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Order status. When researching, wait for Retry-After seconds and poll again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"404":{"description":"Order not found or bearer token invalid"}}}},"/api/agent/v1/instant-briefs/{order_id}/result":{"get":{"summary":"Read structured brief","operationId":"getInstantBriefResult","parameters":[{"$ref":"#/components/parameters/OrderId"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Structured Decision Brief"},"202":{"description":"Research still running. Close this request and poll again after Retry-After seconds."}}}},"/api/agent/v1/instant-briefs/{order_id}/pdf":{"get":{"summary":"Download the PDF","operationId":"downloadInstantBriefPdf","parameters":[{"$ref":"#/components/parameters/OrderId"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Decision Brief PDF","content":{"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}}}},"202":{"description":"PDF still running. Close this request and poll again after Retry-After seconds."}}}},"/api/agent/v1/checks":{"post":{"summary":"Purchase a Check","operationId":"purchaseRegLayerCheck","description":"Screen one or two supplied materials. The agent price is $0.99. Requires a stable Idempotency-Key and MPP payment. Submit readable text extracted from the user's materials, up to approximately 60,000 tokens combined.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":12}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckPurchaseRequest"}}}},"responses":{"202":{"description":"Payment accepted and Check started."},"400":{"description":"Invalid request"},"402":{"description":"Payment required. Pay $0.99 with MPP."},"409":{"description":"Idempotency key reused with different input"}}}},"/api/agent/v1/checks/{check_order_id}":{"get":{"summary":"Read Check status","operationId":"getRegLayerCheckStatus","parameters":[{"$ref":"#/components/parameters/CheckOrderId"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Check status"},"404":{"description":"Order not found or bearer token invalid"}}}},"/api/agent/v1/checks/{check_order_id}/result":{"get":{"summary":"Read structured Check","operationId":"getRegLayerCheckResult","parameters":[{"$ref":"#/components/parameters/CheckOrderId"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Structured Check result"},"202":{"description":"Check still running"}}}},"/api/agent/v1/checks/{check_order_id}/pdf":{"get":{"summary":"Download Check PDF","operationId":"downloadRegLayerCheckPdf","parameters":[{"$ref":"#/components/parameters/CheckOrderId"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Check PDF"},"202":{"description":"PDF still running"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Use the private RegLayer access token returned with the initial HTTP 402 response."}},"parameters":{"OrderId":{"name":"order_id","in":"path","required":true,"schema":{"type":"string","pattern":"^agentorder_[a-f0-9]{32}$"}},"CheckOrderId":{"name":"check_order_id","in":"path","required":true,"schema":{"type":"string","pattern":"^agentcheck_[a-f0-9]{32}$"}}},"schemas":{"Product":{"type":"object","required":["code","amount_cents","currency"],"properties":{"code":{"enum":["instant_brief","instant_check"]},"name":{"type":"string"},"amount_cents":{"const":99},"currency":{"const":"usd"},"min_jurisdictions":{"type":"integer"},"max_jurisdictions":{"type":"integer"},"min_documents":{"type":"integer"},"max_documents":{"type":"integer"},"delivery":{"type":"string"}}},"PurchaseRequest":{"type":"object","additionalProperties":false,"required":["product","email","name","company_name","question","decision_context","product_context","jurisdictions","terms_accepted"],"properties":{"product":{"const":"instant_brief"},"email":{"type":"string","format":"email"},"name":{"type":"string","minLength":1},"company_name":{"type":"string","minLength":1},"company_url":{"type":"string"},"question":{"type":"string","minLength":20,"maxLength":2500},"decision_context":{"type":"string","minLength":20,"maxLength":2500},"product_context":{"type":"string","minLength":20,"maxLength":2500},"jurisdictions":{"type":"array","minItems":1,"maxItems":3,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":100}},"terms_accepted":{"const":true}}},"CheckPurchaseRequest":{"type":"object","additionalProperties":false,"required":["product","email","name","materials","terms_accepted"],"properties":{"product":{"const":"instant_check"},"email":{"type":"string","format":"email"},"name":{"type":"string","minLength":1},"company_name":{"type":"string"},"context_note":{"type":"string","maxLength":2500},"terms_accepted":{"const":true},"materials":{"type":"array","minItems":1,"maxItems":2,"items":{"type":"object","required":["filename","content"],"additionalProperties":false,"properties":{"filename":{"type":"string","minLength":1,"maxLength":180},"content":{"type":"string","minLength":1,"maxLength":240000}}}}}},"Order":{"type":"object","required":["ok","order_id","status","product","notice"],"properties":{"ok":{"const":true},"api_version":{"type":"string"},"order_id":{"type":"string"},"brief_id":{"type":"string"},"check_id":{"type":"string"},"status":{"enum":["payment_required","paid","researching","ready","failed"]},"product":{"enum":["instant_brief","instant_check"]},"amount_cents":{"type":"integer"},"charged_cents":{"type":"integer"},"access_mode":{"const":"paid"},"currency":{"const":"usd"},"status_url":{"type":"string","format":"uri"},"result_url":{"type":"string","format":"uri"},"pdf_url":{"type":"string","format":"uri"},"delivery_mode":{"const":"asynchronous_polling"},"connection_required":{"const":false},"poll_after_seconds":{"type":["integer","null"]},"delivery_instructions":{"type":"string"},"notice":{"type":"string"}}}}},"externalDocs":{"description":"Agent documentation","url":"https://reglayer.com/agents"}}