Stripe Projects lets an agent discover, provision, and pay for the services it needs to ship — entirely from the command line. HeyGen is available as one of those services, so an agent can stand up video generation the same way it provisions a database or a host.
You give the agent a budget, not your card. Stripe handles identity and billing; HeyGen creates (or links) the account, applies your budget for API credit, and returns an API key.
What you’ll get: a HeyGen API key, provisioned and billed through Stripe, written to your project’s
.env and ready to use with the HeyGen CLI or API.How it works
- Discover. The agent finds
heygen/apiin the Stripe Projects service catalog. - Authorize. Stripe passes the user’s identity to HeyGen, which creates a new account or links an existing workspace and returns API credentials.
- Pay. A Stripe payment token funds the account up to a budget you set — the agent never sees a card number.
- Generate. The agent uses the returned API key to call the HeyGen API and create videos.
Prerequisites
A Stripe account with a valid payment method (you can also add a card during provisioning via Stripe Checkout). Then install the CLI and initialize a project:Provision a key
Interactive
Walks you through the service summary and pricing, accepting HeyGen’s Terms and Privacy Policy, confirming the paid service, and setting up billing. It links your HeyGen account by your Stripe email, provisions the key, and writes it to.env.
.env (shown masked, never printed in full):
Non-interactive (agents / CI)
Confirm the paid service and accept the terms of service up front. Billing must already be configured (stripe projects billing add) — it can’t be set up non-interactively.
PAYMENT_METHOD_REQUIRED with a Stripe Checkout URL to add one.
Use the API key
The key lives in your project’s.env. Load it and call HeyGen with the CLI:
The key is read from
.env and never shown on screen. In a new shell, re-run set -a && source .env && set +a to load it again.
