Audra SDKs: npm audra and pip install audra — Audra
There are two official SDKs — npm i audra for Node, pip install audra for Python — plus the zero-install path: the OpenAI SDK pointed at the compat base URL. They are not redundant. The native SDKs speak the v2 wire format (text, format, Idempotency-Key, the jobs API); the OpenAI SDK path is the migration shortcut. This post is the decision guide and the install snippet for each.
npm: the Node client
npm install audra
import { Audra } from "audra";
import { writeFile } from "node:fs/promises";
const audra = new Audra({ apiKey: process.env.AUDRA_API_KEY });
const job = await audra.speech.jobs.create({
model: "audra-essential",
voice: "june",
text: chapterText, // up to 500k chars
format: "mp3",
});
const done = await audra.speech.jobs.wait(job.id); // polls until completed
await writeFile("chapter.mp3", await done.audio());
pip: the Python client
pip install audra
from audra import Audra
audra = Audra(api_key=os.environ["AUDRA_API_KEY"])
resp = audra.speech.create(
model="audra-essential",
voice="june",
text="Chapter one. The river was low that autumn.",
format="mp3",
idempotency_key=str(uuid.uuid4()), # safe retries
)
open("chapter.mp3", "wb").write(resp.audio)
Native SDK vs OpenAI SDK: when each wins
- Use the OpenAI SDK (base_url https://audratalks.com/v1) when you are migrating an existing OpenAI-TTS codebase and want zero new dependencies — /blog/openai-sdk-tts-migration has the swap. You get input/response_format naming and the audio.speech surface, not the jobs API.
- Use the native SDKs when you are building fresh: first-class jobs.wait() polling (no hand-rolled GET /v2/speech/jobs/{id} loops), typed Idempotency-Key support, and field names that match /openapi.yaml exactly — text and format, not input and response_format.
- Both SDKs share the same operational envelope: sync up to 50k chars, jobs up to 500k, 60 RPM free / 120 RPM paid per key, Bearer auth, mp3 or wav output at −16 LUFS.
Whatever you pick, keep the key in env and rotate at /dashboard/keys (rotation limited to 5/hour). The Python production checklist — retries, chunking, error classes — is at /blog/python-openai-sdk-audra-tts.