NEXT_PUBLIC_ or embed it in browser code.
Connect to Vercel
Connect to Vercel to install a scoped key without copying it. PyAI is publicly installable as a Vercel Community integration. Community availability is separate from curated Marketplace review. You can also open the public installer.- Sign in to PyAI and choose Connect with Vercel.
- Choose your Vercel team and Specific Projects. Authorize only the project you want to connect.
- After returning to PyAI, choose Review connection, then your PyAI organization, PyAI project, and Vercel project. Use a test project for sandbox usage; live project requests consume that project’s credits.
- Review the permission notice and select Create key and connect.
- Redeploy your application. Existing deployments do not inherit new variables.
Read
process.env.PYAI_API_KEYonly in server code.
speak:synthesize and hear:transcribe
and installs PYAI_API_KEY in Production and Preview. It does not overwrite an
existing variable. It connects one Vercel project per installation. Use an owner
or admin account in your PyAI organization.
Authenticate your app’s users before exposing a speech endpoint. A key kept on
the server does not by itself prevent visitors from calling an unprotected route.
Manual setup
If you prefer to manage the key yourself, create a scoped key in the PyAI console. Add it asPYAI_API_KEY in your
Vercel project’s environment variables, select the intended deployment
environments, and redeploy. Speech generation needs speak:synthesize;
transcription needs hear:transcribe.
Disconnect and recover
- Open the connection with the PyAI account that created it and confirm Disconnect PyAI. This revokes the integration key; deployed applications using it lose access.
- Removing the integration in Vercel also revokes its key when the signed removal event is delivered. Transferring the installation to another Vercel team revokes the existing PyAI access.
- If an install fails after sending the environment variable, its new key is
revoked. Check Vercel for a remaining
PYAI_API_KEYvariable before trying again; the integration never silently overwrites it. - If cleanup cannot reach Vercel, the console reports that the variable still needs removal. Revoked keys remain unusable.
- Remove the old integration from Vercel before starting a new installation.