Quickstart
Make your first speech requests in a few minutes: one call that turns text into
audio, one that turns that audio back into text, and one that shows what they cost.
The examples use Python with the requests library, or Node.js 18 or newer.
Create an API key
Sign up at api.llynx.io with your business email, verify
it and accept the terms. Open API keys and create a key. It is shown once; store it
on your server and never in a browser or mobile app. The examples read it from the
LLYNX_API_KEY environment variable.
Turn text into speech
Send the text, its language tag and an optional voice gender. The response body is a complete WAV file, so save it straight to disk.
Play hello.wav. This sentence is 51 characters, so it costs about 0.5 credits; the
X-Llynx-Credits-Reserved response header shows the exact figure.
Turn speech into text
Upload a recording with the language spoken in it. Here bonjour.m4a is a short French
voice note; the hello.wav you just generated works too, with language set to en.
The response is JSON:
Any recording works the same way: WAV, MP3, M4A, FLAC, Ogg or WebM, up to 60 seconds.
Swap the tag to try another language, for example hi, ta or es.
Before you go to production
- Languages. Every request names its language with a tag from the Languages page. Requests in other languages are rejected.
- Limits. Recordings up to 60 seconds and 32 MiB; text up to 2,000 characters per request. Generated audio is WAV, 16-bit mono at 24 kHz.
- Charges. Transcription costs one credit per 20 seconds of audio, rounded up to the whole second. Speech costs one credit per 100 input characters. Buy more with a one-time pack; see credits and packs.
- Failures. A request that fails after it was accepted is refunded. Results are not stored, so a retry is a new request; see retries and failures.
- Reference. Request and response fields, headers and error codes are in the API reference.