{"openapi":"3.1.0","info":{"title":"Grounded Extract","version":"2","summary":"Extract a flat JSON object from text.","description":"Grounded Extract turns text into a flat JSON object that matches your schema, plus a grounded map marking each field true when its value appears in the source text or the field is empty, and false otherwise. Use it to pull names, dates, amounts, IDs or addresses out of emails, invoices, filings or web pages. 0.005 USDC per call on Base. The resource URL is https://extract.sentinelintel.org/extract. GET /openapi.json, GET /llms.txt, and GET /.well-known/x402 are free. Request text, schemas and extracted values are never written to logs, files or databases; a daily canary test checks this. Access logs record the client IP address, path and status code. Requests pass through Cloudflare, and payments through the Coinbase x402 facilitator, under their own policies. Payment records are public on the Base blockchain. The data policy is on https://extract.sentinelintel.org/.","contact":{"email":"brian@sentinelintel.org"}},"servers":[{"url":"https://extract.sentinelintel.org"}],"paths":{"/extract":{"post":{"operationId":"extract","summary":"Extract a flat object from text.","tags":["extraction","json","structured-output","text-to-json","parsing","llm"],"security":[],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractRequest"}}}},"responses":{"200":{"description":"The extracted object and a grounded map. Grounded means the value occurs in the input, not that it is correct. The buyer pays for the check.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractResponse"}}}},"400":{"description":"The body is not JSON, is not an object, does not contain text and schema, has a non-boolean evidence flag, asks for evidence mode, has a text value that is not a string, or the schema is not a flat object within the limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"402":{"description":"Payment required. The body is the x402 payment-required object for 0.005 USDC on Base. The buyer pays for the check.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"413":{"description":"The text exceeds 40000 characters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"The handler body is not a grounded object, or an unhandled error was raised.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"502":{"description":"The router call failed, returned no usable message, or returned a value that does not match the schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"503":{"description":"Too many extractions are waiting. Retry-After is 60 seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"504":{"description":"Extraction exceeded 60 seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/screen":{"post":{"operationId":"screen","summary":"Screen untrusted text for prompt injection.","description":"Injection Screen by Grounded Extract checks untrusted text for prompt injection and returns a verdict plus the suspicious spans, each with offsets the server verified against your text. Use it on web pages, emails, tool results or documents before an agent acts on them. 0.003 USDC per call on Base.","tags":["prompt-injection","security","guardrail","agent-safety","llm"],"security":[],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenRequest"}}}},"responses":{"200":{"description":"The verdict, the located spans and the grounded map. Quotes the server cannot locate in the text are dropped. A reply whose grounded verdict is false is not returned as 200 and is not charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenResponse"}}}},"400":{"description":"The body is not JSON, is not an object, does not contain text, has a key other than text and source, has a text value that is not a string or is empty, or has a source other than web, email, tool or document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"402":{"description":"Payment required. The body is the x402 payment-required object for 0.003 USDC on Base.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"413":{"description":"The text exceeds 20000 characters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"The handler body is not a screen result with a grounded verdict, or an unhandled error was raised. Not charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"502":{"description":"The router call failed (including a router 429 after 3 tries), returned no usable message, or returned a reply that does not match the screen schema. Not charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"503":{"description":"Too many screens are waiting. Retry-After is 60 seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"504":{"description":"The screen exceeded 60 seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}}},"components":{"schemas":{"ExtractRequest":{"type":"object","additionalProperties":false,"required":["text","schema"],"properties":{"text":{"type":"string","maxLength":40000,"description":"Source text.","example":"Invoice INV-20431 from Lakeside Paper Co., dated 2026-11-02, total 1284.50 USD, due 2026-12-02."},"schema":{"type":"object","description":"Flat object schema. additionalProperties is false. At most 32 properties. required lists every property once. Each property type is string, number, integer, boolean, or null. A property may include a description of at most 300 characters.","example":{"type":"object","additionalProperties":false,"required":["invoice_number","vendor","date","total","currency","due_date"],"properties":{"invoice_number":{"type":"string"},"vendor":{"type":"string"},"date":{"type":"string"},"total":{"type":"number"},"currency":{"type":"string"},"due_date":{"type":"string"}}},"additionalProperties":false,"required":["type","properties","required","additionalProperties"],"properties":{"type":{"const":"object"},"additionalProperties":{"const":false},"required":{"type":"array","items":{"type":"string"}},"properties":{"type":"object","maxProperties":32}}}}},"ExtractResponse":{"type":"object","additionalProperties":false,"required":["object","grounded"],"example":{"object":{"currency":"USD","date":"2026-11-02","due_date":"2026-12-02","invoice_number":"INV-20431","total":1284.5,"vendor":"Lakeside Paper Co."},"grounded":{"currency":true,"date":true,"due_date":true,"invoice_number":true,"total":true,"vendor":true}},"properties":{"object":{"type":"object","description":"Values filled for the caller's schema."},"grounded":{"type":"object","description":"Boolean per field. True when the value appears in the source text or the field is empty. False otherwise.","additionalProperties":{"type":"boolean"}}}},"ScreenRequest":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string","minLength":1,"maxLength":20000,"description":"Untrusted text to screen.","example":"Quarterly update: revenue rose 4 percent, the support backlog fell to 31 tickets, and version 2 ships on Friday."},"source":{"type":"string","enum":["web","email","tool","document"],"description":"Optional hint about where the text came from."}}},"ScreenResponse":{"type":"object","additionalProperties":false,"required":["verdict","spans","grounded"],"example":{"verdict":"clean","spans":[],"grounded":{"verdict":true,"spans":[]}},"properties":{"verdict":{"type":"string","enum":["injection","clean"]},"spans":{"type":"array","maxItems":8,"description":"Exact quotes from the input with code point offsets the server located. Every span returned is located.","items":{"type":"object","additionalProperties":false,"required":["text","start","end"],"properties":{"text":{"type":"string"},"start":{"type":"integer","description":"Inclusive code point offset."},"end":{"type":"integer","description":"Exclusive code point offset."}}}},"grounded":{"type":"object","additionalProperties":false,"required":["verdict","spans"],"properties":{"verdict":{"type":"boolean","description":"True for injection with at least one located span, or clean with none."},"spans":{"type":"array","items":{"type":"boolean"}}}}}},"ErrorBody":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}},"PaymentRequired":{"type":"object","required":["x402Version","resource","accepts"],"properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"resource":{"type":"object","properties":{"url":{"type":"string"},"description":{"type":"string"},"mimeType":{"type":"string"},"serviceName":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}},"accepts":{"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string"},"network":{"type":"string"},"amount":{"type":"string"},"payTo":{"type":"string"},"asset":{"type":"string"},"maxTimeoutSeconds":{"type":"integer"}}}},"extensions":{"type":"object"}}}}}}