Docs Quickstart
Sign in, mint a key, and get an mp3 back from the GPU worker in five minutes.
1. Sign in
Open the console and continue with GitHub. The console only admits members of the Nexis-ai-tech organisation. The first account to sign in becomes the owner; every later sign-in is checked against the organisation on GitHub.
Signing in reads your public profile and your organisation list. It asks for no repository access and writes nothing to GitHub.
2. Mint a key
Press Mint a key, give it a name that names the consumer (nexa-bot · narration, not test), and
choose two numbers:
| field | what it controls | starting point |
|---|---|---|
| Requests / minute | How many calls the key may start in any 60-second window | 30 |
| Characters / month | Total input characters the key may send per calendar month (UTC) | 200000 |
The key is shown once. Copy it into the consumer's environment as NEXIS_TTS_KEY before you close the
banner — only a hash is stored, so there is no way to show it again.
3. Make the call
curl https://tts.nexis-ai.tech/v1/audio/speech \
-H "Authorization: Bearer $NEXIS_TTS_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "The line you want spoken.",
"instructions": "a calm, low narrator, unhurried",
"response_format": "mp3"
}' \
--output line.mp3
Expected: 200, Content-Type: audio/mpeg, and a file that plays. The response also carries
x-request-id — quote it when something goes wrong.
4. Read the receipt
curl https://tts.nexis-ai.tech/v1/usage \
-H "Authorization: Bearer $NEXIS_TTS_KEY"
{
"key": { "id": "nxs_tts_k4p9…", "name": "nexa-bot · narration" },
"period": "2026-12",
"characters": { "used": 42, "limit": 200000, "remaining": 199958 },
"requests_per_minute": 30
}
The same numbers appear in the console, per key, with the last 25 calls attached.
Using it from a program
The OpenAI SDK insists on a voice value, and this worker has no
saved voices yet. Until the operator registers one, call the HTTP endpoint directly — see
Migrating from OpenAI.
Python, standard library only:
import json, os, pathlib, urllib.request
body = json.dumps({
"input": "Two sentences are enough for a first test.",
"instructions": "a warm, direct voice",
"response_format": "mp3",
}).encode()
request = urllib.request.Request(
"https://tts.nexis-ai.tech/v1/audio/speech",
data=body,
headers={"Authorization": f"Bearer {os.environ['NEXIS_TTS_KEY']}",
"Content-Type": "application/json"},
)
with urllib.request.urlopen(request, timeout=120) as response:
pathlib.Path("line.mp3").write_bytes(response.read())
Node 20+:
import { writeFile } from "node:fs/promises";
const response = await fetch("https://tts.nexis-ai.tech/v1/audio/speech", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.NEXIS_TTS_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ input: "Ship it.", response_format: "mp3" }),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
await writeFile("line.mp3", Buffer.from(await response.arrayBuffer()));
When it does not work
| what you see | what it means | what to do |
|---|---|---|
401 invalid_key |
The header is missing or the key was revoked | Check the header name: Authorization: Bearer … |
429 rate_limited |
More than n calls in 60 seconds | Wait for the Retry-After seconds |
429 quota_exceeded |
The key's monthly characters are spent | Mint another key or raise this one's budget |
503 worker_busy |
Someone else holds the single GPU stream | Retry after Retry-After; shorten the text |
502/504 |
The worker did not answer | Retry once, then check /v1/health |
The full list is on Errors.