Perplexity Adds One-Command API Setup Through Stripe Projects
The terminal flow puts credentials, prepaid credits and spending controls beside an application’s code. But teams connecting an existing Perplexity project stay on its existing billing path.
Listen to this story
The audio brief
Story brief
3 key pointsStripe Projects now functions as a deployment and controls layer for Perplexity API access: developers can provision credentials from the terminal, fund projects, cap spending, and rotate keys without leaving the setup flow. The integration is useful for coding agents, but it does not transfer existing Perplexity billing—newly provisioned projects use Stripe’s payment method, while connected projects retain...
- 01
`stripe projects add perplexity/api` creates a project, key, and `.env` entry; the key works with Perplexity’s Agent API and Search API.
- 02
Each Stripe account can connect one Perplexity API project; each additional Stripe project receives its own key.
- 03
Stripe Projects supports automatic recharge and monthly spending caps; purchases above the cap decline, and exhausted keys are blocked.
Perplexity now lets developers set up an API project, generate a key and place it in an app’s environment file with one Stripe Projects command. The change moves the administrative work around an API—credentials and prepaid credits—into the terminal workflow where an application is built.
Running stripe projects add perplexity/api creates a Perplexity API project, mints a key and writes it to the local .env file as PERPLEXITY_API_KEY. The resulting key works across Perplexity’s API platform, including its Agent API and Search API.
New projects and existing projects take different billing paths
A newly created Perplexity account receives $10 in free credits that last 60 days. Otherwise, creating a new dedicated API project prompts for a minimum $10 credit purchase, charged to the payment method on the Stripe account. Later credit purchases for projects provisioned this way can also charge through Stripe.
That makes this a provisioning option, not a billing migration. Each Stripe account can connect to one Perplexity API project, and every additional Stripe project gets its own key within that project. Other users on the same Stripe account can run the setup only if they are administrators of that Perplexity API project.
Spend controls and key rotation stay in the same workflow
Developers can top up credits, enable automatic recharge and set a monthly Perplexity spending limit in Stripe Projects. A purchase above that cap is declined. If credits run out, the key is blocked until the balance is replenished.
stripe projects add perplexity/apiRotation mints a replacement key and updates .env, while the old key remains active for 24 hours. Removing the resource immediately revokes that Stripe-project key but leaves the API project, its credits and other keys intact.
Coding agents can complete the setup with a paid-service confirmation
Claude Code, Cursor, Codex and other coding agents can run the flow without interactive prompts. When a purchase is involved, the command requires a confirm-paid-service flag; attaching a payment method before the agent session avoids a browser interruption.
The Perplexity addition extends a wider Stripe Projects model for agent-led service setup. Stripe said in June that Projects connected to 49 providers and offered per-provider spending caps plus isolated credentials for named environments.
Sources
- docs.perplexity.aiPerplexity on Stripe Projects - Perplexity
- stripe.comStripe Projects adds new agent integrations, more providers, and custom developer controls