LMNT provides official client SDKs to make it easier to work with the LMNT API. Each SDK provides idiomatic interfaces, type safety, and built-in support for streaming, retries, and error handling.
Python
Sync and async clients with type hints and streaming helpers
TypeScript
Node.js, Deno, Bun, and browser support
Go
Context-based cancellation with functional options
Quick installation
pip install lmntQuick start
import asyncio
import os
from lmnt import AsyncLmnt
async def main():
client = AsyncLmnt(
api_key=os.environ.get('LMNT_API_KEY'), # This is the default and can be omitted
)
async with client.speech.with_streaming_response.generate(
text="Uhh, did you see the weather in Palo Alto tomorrow? Yeah, can't believe it's gonna rain, dude. Like what?",
voice='leah',
) as response:
await response.stream_to_file('hello.mp3')
asyncio.run(main())Requirements
| SDK | Minimum version |
|---|---|
| Python | 3.10+ |
| TypeScript | 4.5+ (Node.js 20+) |
| Go | 1.23+ |