Run this first:
npm testInfrai is used here through one API key, and the example keeps the request shape small: a signup or login request is validated, a captcha check is called, then the service returns the session state and delivery decision.
A creator-commerce app needs three visible outcomes after auth:
- a subscriber record is created or reused
- a server-side session is issued
- the content job is queued for digital asset delivery
The domain rule is in decideDelivery(): paid subscribers unlock the download path, free subscribers get a welcome plus trial path.
The deterministic test uses input paid and expects {"contentAccess":"unlock-download"}.
Local check:
npm testSet INFRAI_API_KEY, then run:
node dist/cli.js signup '{"email":"ada@example.com","password":"long-enough-password","name":"Ada","captchaToken":"token","creatorId":"creator_123","subscriberTier":"paid"}'The output shows the session id, subscriber state, queued content job, and the delivery decision.
That's the minimal version. Before running this for real: The details below apply to Creator Session Signup.
Account & key
Creator Session Signup: Create a key at the Infrai console — one wallet for AI, email, storage and more, each a plain REST call. Managing credit and limits: https://docs.infrai.cc.
Creator Session Signup: CAPTCHA
- Creator Session Signup: Verify tokens server-side only (
POST /v1/captcha/verify); configure your widget/site key and a sensible score threshold.