Before
from openai import OpenAI
client = OpenAI(
api_key="sk-proj-…"
)Uttera's audio API speaks the same language as OpenAI's. Change two lines and your code keeps working — with the official SDK, no wrappers and no patches.
Tested against the official Python openai SDK · Without
changing a single call
This is literally everything that changes.
from openai import OpenAI
client = OpenAI(
api_key="sk-proj-…"
)from openai import OpenAI
client = OpenAI(
api_key="sk-echo-…",
base_url="https://api.uttera.ai/v1"
)The rest of the file is untouched.
Checked against the official SDK, not inferred from the docs.
client.audio.speech.create(
model="tts-1",
voice="dora",
input="Hola.")
With tts-1 and tts-1-hd, as there. The voices are ours:
GET /v1/audio/voices lists them.
client.audio.transcriptions.create(
model="whisper-1",
file=f)
Whisper large-v3-turbo underneath. Takes wav mp3 flac ogg opus aiff m4a
webm.
client.models.list()
Returns tts-1, tts-1-hd and whisper-1. Handy
to check at a glance that the key and the URL are right.
Promising full compatibility and letting you crash in production would be worse than promising nothing.
chat.completions, embeddings, images and the rest
return 404. Uttera does audio: it is not a replacement for all of OpenAI, it
is a replacement for its audio part.
If your application uses both, keep the OpenAI client for text and create a second client for audio. Four lines.
Outside the OpenAI shape there are things that do not exist there: translating a recording into another language with voice, a structured summary, who speaks and when, tone and speaker profile, sound effects and music.
They are called the same way, with the same client and the same key. They are all here →
Because if it were only «the same but from someone else», there would be no reason.
Audio is processed on our own hardware in Spain. There is no international transfer to justify, no standard clauses, and no question about which law reaches your data. Why that decides purchases →
Not yours and not anyone's. Audio is processed and discarded on answering: no copy is left to do it with, even if we wanted to.
The engines are published under an open licence. A privacy claim you can only take on faith is worth less than one you can read. The code →
With nothing installed beyond what you already have.
export UTTERA_API_KEY=sk-echo-…
python3 - <<'PY'
import os
from openai import OpenAI
c = OpenAI(api_key=os.environ["UTTERA_API_KEY"],
base_url="https://api.uttera.ai/v1")
print([m.id for m in c.models.list()])
r = c.audio.speech.create(model="tts-1", voice="dora", input="It works.")
open("prueba.mp3", "wb").write(r.content)
PY
There are equivalent examples in curl and Node in uttera-examples →