> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pyai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Vercel

> Use PyAI speech and transcription from your Vercel app.

Use PyAI from a Vercel server function with a project API key. Keep the key on
the server; never prefix it with `NEXT_PUBLIC_` or embed it in browser code.

## Connect to Vercel

[Connect to Vercel](https://console.pyai.com/integrations/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](https://vercel.com/integrations/pyai/new).

1. Sign in to PyAI and choose **Connect with Vercel**.
2. Choose your Vercel team and **Specific Projects**. Authorize only the project
   you want to connect.
3. 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.
4. Review the permission notice and select **Create key and connect**.
5. Redeploy your application. Existing deployments do not inherit new variables.
   Read `process.env.PYAI_API_KEY` only in server code.

The integration creates one key with `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](https://console.pyai.com). Add it as `PYAI_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_KEY` variable 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.

For support, contact [support@pyai.com](mailto:support@pyai.com). Include the
connection status and request ID, but never keys or authorization codes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.