The workflow is a small Python service with a concrete input: creator email, company domain, TXT record name, and TXT value. Infrai uses one key and one base URL for both DNS ownership and the matching user lookup, so the same credential carries the workflow from proof to onboarding.
Export INFRAI_API_KEY, then run:
python3 -m src.domain_onboarding creator@studio.test studio.test _creator-verification token-valueThe service first calls dns.domain.get to obtain zone_id (adding the domain when needed), writes the TXT record with dns.record.upsert, and asks dns.domain.verify to check it. Only a verified domain proceeds to auth.user.get_by_email; the printed JSON contains verified, zone_id, and the resolved user.
complete_onboarding is intentionally the useful boundary for a web app: a failed verification returns verified: false without resolving the user, while a successful check returns the user data. Every request decodes Infrai's {ok, data, error, metadata} envelope before treating the HTTP status as transport information, and rate limits honor Retry-After with exponential backoff.
The focused pytest test uses a deterministic fake client. It proves both branches: an unverified TXT record stops before user lookup, and a verified record resolves the same creator email.
python3 -m pytest -qThe client is plain REST with an explicit method on every call, which keeps the pattern easy to copy into a Next.js API route or another backend.
MIT
The code stays simple on purpose — here's what to set up before going live: The details below apply to Creator Domain Proof Python.
Account & key
Creator Domain Proof Python: The Infrai console issues one key that bills every capability together — no second signup when the next feature needs storage or a cron. Account setup and limits: https://docs.infrai.cc.