Parse a VPAT/ACR document
const url = 'https://vpat-parse.larry-c6c.workers.dev/api/v1/vpat-parse';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"text":"VPAT 2.4. Product: Acme App. 1.1.1 Non-text Content: Supports."}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://vpat-parse.larry-c6c.workers.dev/api/v1/vpat-parse \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "text": "VPAT 2.4. Product: Acme App. 1.1.1 Non-text Content: Supports." }'Extract WCAG criteria and metadata from a VPAT. Provide exactly one of
text or url. Responses use the standard { data, error, meta }
envelope.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Provide exactly one of text or url.
object
Raw extracted text of the VPAT document.
Public http(s) URL of an HTML VPAT to fetch and parse. Validated by an SSRF guard (private/internal/metadata targets are rejected) and capped in size. PDFs are not supported via URL.
Require a zero-retention provider path; fails closed if unavailable.
Optional Bedrock model override (allow-listed eval models only).
Example
{ "text": "VPAT 2.4. Product: Acme App. 1.1.1 Non-text Content: Supports."}Responses
Section titled “Responses”Parsed successfully.
object
object
object
WCAG criterion number.
The vendor’s verbatim remarks for this criterion.
object
Present only when the request supplied a url; the text the LLM saw.
Present (true) only when the LLM output was truncated mid-response.
object
object
True when the LLM output was truncated; the parsed criteria may be incomplete.
Example
{ "data": { "criteria": [ { "id": "1.1.1", "conformanceLevel": "Supports" } ] }, "error": null, "meta": { "provider": "gemini" }}Headers
Section titled “Headers”Requests remaining in the current per-key window.
Present (set to “true”) only when the LLM output was truncated.
Invalid JSON, missing text/url, or a disallowed url (SSRF guard).
object
object
object
Stable machine-readable error code.
Optional diagnostic detail. For source-fetch failures it carries
the status and Content-Type the source answered with, e.g.
sourceStatus=404; contentType=text/html.
object
Example
{ "data": null, "error": { "code": "METHOD_NOT_ALLOWED" }, "meta": null}Either the API key is missing/invalid/revoked (UNAUTHORIZED), or a
fetched source url itself returned 401 (SOURCE_AUTH_REQUIRED) —
the error.code distinguishes the two.
object
object
object
Stable machine-readable error code.
Optional diagnostic detail. For source-fetch failures it carries
the status and Content-Type the source answered with, e.g.
sourceStatus=404; contentType=text/html.
object
Example
{ "data": null, "error": { "code": "METHOD_NOT_ALLOWED" }, "meta": null}A fetched source url returned 403 (SOURCE_AUTH_REQUIRED).
object
object
object
Stable machine-readable error code.
Optional diagnostic detail. For source-fetch failures it carries
the status and Content-Type the source answered with, e.g.
sourceStatus=404; contentType=text/html.
object
Example
{ "data": null, "error": { "code": "METHOD_NOT_ALLOWED" }, "meta": null}Method not allowed (METHOD_NOT_ALLOWED) — the route accepts POST only.
object
object
object
Stable machine-readable error code.
Optional diagnostic detail. For source-fetch failures it carries
the status and Content-Type the source answered with, e.g.
sourceStatus=404; contentType=text/html.
object
Example
{ "data": null, "error": { "code": "METHOD_NOT_ALLOWED" }, "meta": null}Zero-retention requested but the zero-retention provider is not configured.
object
object
object
Stable machine-readable error code.
Optional diagnostic detail. For source-fetch failures it carries
the status and Content-Type the source answered with, e.g.
sourceStatus=404; contentType=text/html.
object
Example
{ "data": null, "error": { "code": "METHOD_NOT_ALLOWED" }, "meta": null}The fetched source body exceeds the size cap.
object
object
object
Stable machine-readable error code.
Optional diagnostic detail. For source-fetch failures it carries
the status and Content-Type the source answered with, e.g.
sourceStatus=404; contentType=text/html.
object
Example
{ "data": null, "error": { "code": "METHOD_NOT_ALLOWED" }, "meta": null}The url points at a binary file rather than a web page — a PDF,
Word/Office document, or other download (UNSUPPORTED_MEDIA_TYPE).
Detected from the Content-Type and, for mislabeled responses, the
file’s magic bytes. Download the file and submit its text instead.
object
object
object
Stable machine-readable error code.
Optional diagnostic detail. For source-fetch failures it carries
the status and Content-Type the source answered with, e.g.
sourceStatus=404; contentType=text/html.
object
Example
{ "data": null, "error": { "code": "METHOD_NOT_ALLOWED" }, "meta": null}The document contained no gradeable accessibility criteria
(NO_CRITERIA_FOUND) — e.g. a blank VPAT template or a file that
isn’t a completed ACR. The request was well-formed; retrying the
same file will not help.
object
object
object
Stable machine-readable error code.
Optional diagnostic detail. For source-fetch failures it carries
the status and Content-Type the source answered with, e.g.
sourceStatus=404; contentType=text/html.
object
Example
{ "data": null, "error": { "code": "METHOD_NOT_ALLOWED" }, "meta": null}Per-key rate limit exceeded.
object
object
object
Stable machine-readable error code.
Optional diagnostic detail. For source-fetch failures it carries
the status and Content-Type the source answered with, e.g.
sourceStatus=404; contentType=text/html.
object
Example
{ "data": null, "error": { "code": "METHOD_NOT_ALLOWED" }, "meta": null}Headers
Section titled “Headers”Seconds until the rate-limit window resets.
Server misconfiguration (CONFIG_ERROR, e.g. a missing provider key)
or an unexpected internal error (INTERNAL_ERROR).
object
object
object
Stable machine-readable error code.
Optional diagnostic detail. For source-fetch failures it carries
the status and Content-Type the source answered with, e.g.
sourceStatus=404; contentType=text/html.
object
Example
{ "data": null, "error": { "code": "METHOD_NOT_ALLOWED" }, "meta": null}The upstream LLM failed or returned an unparseable response
(UPSTREAM_ERROR), or fetching the source url failed
(SOURCE_FETCH_FAILED).
object
object
object
Stable machine-readable error code.
Optional diagnostic detail. For source-fetch failures it carries
the status and Content-Type the source answered with, e.g.
sourceStatus=404; contentType=text/html.
object
Example
{ "data": null, "error": { "code": "METHOD_NOT_ALLOWED" }, "meta": null}Authentication is temporarily unavailable (AUTH_UNAVAILABLE) — the
auth backend is unreachable, or the key is misconfigured (e.g. a
non-positive rate limit).
object
object
object
Stable machine-readable error code.
Optional diagnostic detail. For source-fetch failures it carries
the status and Content-Type the source answered with, e.g.
sourceStatus=404; contentType=text/html.
object
Example
{ "data": null, "error": { "code": "METHOD_NOT_ALLOWED" }, "meta": null}The source url did not respond within the fetch timeout
(SOURCE_FETCH_FAILED).
object
object
object
Stable machine-readable error code.
Optional diagnostic detail. For source-fetch failures it carries
the status and Content-Type the source answered with, e.g.
sourceStatus=404; contentType=text/html.
object
Example
{ "data": null, "error": { "code": "METHOD_NOT_ALLOWED" }, "meta": null}