Telnyx
Telnyx provider for AI SDK 7
Telnyx provides an AI SDK provider for the Vercel AI SDK, giving developers access to chat models, embeddings, speech-to-text, and text-to-speech through a single package.
The Telnyx provider is a good fit if you want:
- One package for multiple AI capabilities: chat, embeddings, transcription, and speech generation
- OpenAI-compatible model access: use Telnyx-hosted models through a familiar API pattern
- Speech support in the same provider: combine text and voice workflows in one integration
- Simple setup: standard API key configuration with the AI SDK
Learn more in the Telnyx documentation.
Setup
The @telnyx/ai-sdk-provider package (v2.0.0+) supports AI SDK 7 and the Provider V4 specification.
Install it alongside AI SDK 7:
$ pnpm add @telnyx/ai-sdk-provider ai@^7 zod
$ npm install @telnyx/ai-sdk-provider ai@^7 zod
$ yarn add @telnyx/ai-sdk-provider ai@^7 zod
$ bun add @telnyx/ai-sdk-provider ai@^7 zod
Set your Telnyx API key as an environment variable:
Provider Instance
To create a Telnyx provider instance, use the createTelnyx function:
You can also use the default telnyx export when TELNYX_API_KEY is set in your environment.