SDKs

The SDKs and MCP server share their core operations. The three webhook-endpoint methods are SDK-only unless MCP_WEBHOOK_ENDPOINT_TOOLS_ENABLED is on; waitForVerification is client-side polling; and the MCP-only ai_record_get and criteria_judgments_get tools exist when their flags are on.

TypeScript #

TypeScript is handed over as a tarball made with npm pack; run npm run build before packing. It is not installed from npm. Its default base URL is https://api.acretix.io.

Read the key from ACRETIX_API_KEY and pass it to the constructor. The constructor accepts only an avk_... key.

new AcretixVerify({ apiKey: process.env.ACRETIX_API_KEY ?? '' })
TypeScript SDK methods and the API operation each calls
MethodAPI operationScope needed
compileRubricPOST /api/v1/rubricsrubric:write
submitVerificationPOST /api/v1/verifyverify:submit
getVerificationGET /api/v1/verifications/{verification_id}verify:read
getRubricGET /api/v1/rubrics/{rubric_id}Any key of the tenant
waitForVerificationGET /api/v1/verifications/{verification_id}verify:read
getProofGET /api/v1/verifications/{verification_id}/proofAny key of the tenant
reverifyPOST /api/v1/verifications/{verification_id}/reverifyverify:submit
getUsageGET /api/v1/usageAny key of the tenant
submitFeedbackPOST /api/v1/verifications/{verification_id}/feedbackAny key of the tenant
registerWebhookEndpointPOST /api/v1/webhook-endpointsverify:read and rubric:write
listWebhookEndpointsGET /api/v1/webhook-endpointsverify:read
removeWebhookEndpointDELETE /api/v1/webhook-endpoints/{endpoint_id}verify:read and rubric:write

Checking a webhook in TypeScript #

verifyWebhook(rawBody, signatureHeader, secret, options?)

Pass the raw request body exactly as received, before any JSON parsing.

Failures throw AcretixWebhookError with one of these reasons:

See Webhooks for the events, the signature header, and the retries.

Python #

Python is handed over as a wheel built with python -m build; it is not installed from PyPI. Its default base URL is https://api.acretix.io.

Read the key from ACRETIX_API_KEY and pass it to the constructor. The constructor accepts only an avk_... key.

AcretixVerify(os.environ["ACRETIX_API_KEY"])
Python SDK methods and the API operation each calls
MethodAPI operationScope needed
compile_rubricPOST /api/v1/rubricsrubric:write
submit_verificationPOST /api/v1/verifyverify:submit
get_verificationGET /api/v1/verifications/{verification_id}verify:read
get_rubricGET /api/v1/rubrics/{rubric_id}Any key of the tenant
wait_for_verificationGET /api/v1/verifications/{verification_id}verify:read
get_proofGET /api/v1/verifications/{verification_id}/proofAny key of the tenant
reverifyPOST /api/v1/verifications/{verification_id}/reverifyverify:submit
get_usageGET /api/v1/usageAny key of the tenant
submit_feedbackPOST /api/v1/verifications/{verification_id}/feedbackAny key of the tenant
register_webhook_endpointPOST /api/v1/webhook-endpointsverify:read and rubric:write
list_webhook_endpointsGET /api/v1/webhook-endpointsverify:read
remove_webhook_endpointDELETE /api/v1/webhook-endpoints/{endpoint_id}verify:read and rubric:write

Checking a webhook in Python #

verify_webhook(raw_body, signature_header, secret, tolerance_seconds=300, now=None)

Pass the raw request body exactly as received, before any JSON parsing.

Failures raise AcretixWebhookError with one of these reasons:

See Webhooks for the events, the signature header, and the retries.