SDKs

The SDKs call the same operations that the MCP server exposes.

TypeScript

TypeScript is handed over as a tarball made with npm pack; 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 operation
compileRubricPOST /api/v1/rubrics
submitVerificationPOST /api/v1/verify
getVerificationGET /api/v1/verifications/{verification_id}
getRubricGET /api/v1/rubrics/{rubric_id}
waitForVerificationGET /api/v1/verifications/{verification_id}
getProofGET /api/v1/verifications/{verification_id}/proof
reverifyPOST /api/v1/verifications/{verification_id}/reverify
getUsageGET /api/v1/usage
submitFeedbackPOST /api/v1/verifications/{verification_id}/feedback

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:

  • missing_header
  • malformed_header
  • timestamp_outside_tolerance
  • signature_mismatch

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 operation
compile_rubricPOST /api/v1/rubrics
submit_verificationPOST /api/v1/verify
get_verificationGET /api/v1/verifications/{verification_id}
get_rubricGET /api/v1/rubrics/{rubric_id}
wait_for_verificationGET /api/v1/verifications/{verification_id}
get_proofGET /api/v1/verifications/{verification_id}/proof
reverifyPOST /api/v1/verifications/{verification_id}/reverify
get_usageGET /api/v1/usage
submit_feedbackPOST /api/v1/verifications/{verification_id}/feedback

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:

  • missing_header
  • malformed_header
  • timestamp_outside_tolerance
  • signature_mismatch

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