Agent Account and Billing CLI

Use CLI commands for agent workspace registration, account lookup, email verification, billing status, and checkout.

tutorflow agent register

Use tutorflow agent register to self-register a Platform workspace and receive an API key.

tutorflow agent register \
  --name "Acme Agent" \
  --slug "acme-agent" \
  --email "ops@example.com" \
  --agent-identity "codex-worker"

By default, the returned API key is saved to ~/.tutorflow/config.json. Add --no-save when an automation runner should only read the key from stdout.

tutorflow --json agent register \
  --name "Acme Agent" \
  --slug "acme-agent" \
  --email "ops@example.com" \
  --no-save

Example JSON response:

{
  "organizationId": "org_2d8b1a3f",
  "apiKey": "tf_platform_live_...",
  "keyPrefix": "tf_platform_live_abcd",
  "trialCredits": 100,
  "message": "Store your API key securely. It will not be shown again.",
  "requiresEmailVerification": true,
  "verifyEmailResendEndpoint": "POST /v1/platform/agent/verify-email/resend",
  "nextSteps": {
    "createSlide": "POST /v1/platform/slides",
    "createVideo": "POST /v1/platform/videos",
    "accountInfo": "GET /v1/platform/agent/account"
  }
}

tutorflow agent account

tutorflow agent account

The command returns the workspace and agent account associated with the active Platform API key.

Example JSON response:

{
  "organizationId": "org_2d8b1a3f",
  "name": "Acme Agent",
  "slug": "acme-agent",
  "status": "active",
  "creditBalance": 100,
  "rateLimitPerMinute": 60,
  "isEmailVerified": false,
  "restrictedActions": [
    "add_payment_method",
    "usdc_payment",
    "create_billing_session"
  ],
  "createdAt": "2026-05-12T03:10:00.000Z"
}

tutorflow agent verify-email resend

Resend the verification email for the authenticated agent account:

tutorflow agent verify-email resend

Example JSON response:

{
  "message": "Verification email sent"
}

tutorflow agent billing status

Check whether the active workspace can use paid platform actions:

tutorflow agent billing status

Billing status includes the current balance, billing state, and any restricted actions that the backend is enforcing for the workspace.

Example JSON response:

{
  "hasPaymentMethod": false,
  "cardBrand": null,
  "cardLast4": null,
  "creditBalance": 100,
  "billingMode": "prepaid",
  "isEmailVerified": false,
  "restrictedActions": [
    "add_payment_method",
    "usdc_payment",
    "create_billing_session"
  ]
}

tutorflow agent billing session

Create a TutorFlow-hosted billing session URL:

tutorflow agent billing session

Use this when an agent needs to send an operator to the hosted TutorFlow billing page instead of building a direct payment flow.

Example JSON response:

{
  "url": "https://api.tutorflow.io/v1/platform/agent/checkout?token=checkout_token_...",
  "sessionId": "checkout_token_..."
}

tutorflow agent checkout info and create

Checkout token commands are available for workflows that already have a TutorFlow checkout token.

Inspect token details:

tutorflow agent checkout info --token "checkout_token_..."

Create a Stripe Checkout URL:

tutorflow agent checkout create \
  --token "checkout_token_..." \
  --amount-usd 25

Example JSON responses:

{
  "email": "ops@example.com",
  "name": "Acme Agent"
}
{
  "url": "https://checkout.stripe.com/c/pay/cs_test_..."
}

For normal agent onboarding, prefer tutorflow agent billing session because it returns a hosted TutorFlow billing flow.