Vercel is a cloud platform for static sites and serverless functions. It’s an easy way to host your LMNT speech-enabled apps.
The steps we’ll cover in this guide go from adding the integration to your Vercel account, retreiving your LMNT API key, and using LMNT Speech and Voice in your application development.
Adding the integration
- Sign into your Vercel account and navigate to the LMNT Vercel integration page.
- Click the
- Select the Vercel project(s) you want to integrate with LMNT.
- Sign into your LMNT account in the popup to complete the integration.
You’re all set! You’ll now find a
LMNT_API_KEY environment variable in your Vercel project(s).
Accessing your LMNT API key
In requests to our servers, you’ll need to reference the LMNT API key that was added by the integration. Here are some examples of how to do so by runtime language:
api_key = os.environ.get('LMNT_API_KEY')
Learn more about environment variables in Vercel here.
With your key as enviroment variable, you can now either directly call the LMNT REST and WebSocket APIs or use our SDKs, referenced here:
Explore our REST API reference.
Streaming Speech Reference
Try the WebSocket API to stream audio.
Adding the integration to additional Vercel projects
First, give the integration access permissions to your project(s)
- Sign into your Vercel account and navigate to the
Manageon the LMNT integration.
- In your LMNT integration page, select
Manage Accesson the right-hand side of the title row.
- Select the projects that you would like to add the LMNT integration to (or select
Second, configure the integration to add
LMNT_API_KEY environment variable to permissions projects.
- Back in the LMNT integration page, select
Configureon the right-hand side of the title row.
- Select the projects that you would like to set up with an LMNT API key environment variable.
LMNT_API_KEY environment variable automatically. You will need to configure the integration to add the variable to new projects (steps 5 and 6 above).