Amazon
Jedes Amazon-Modell auf Synthorai: ein Endpoint, Live-Preise.
1 Modell · realtime / audio · ab $0.06/M Input
Warum Amazon über Synthorai
- Nutzungsbasierte Abrechnung, kein Abo. Ein Key, jedes Modell. Kein Amazon-Konto erforderlich.
- Keine Prompt-Speicherung. Standardmäßig keine Prompt-Speicherung am Gateway; upstream gelten die Datenrichtlinien von Amazon. Details →
Amazon-Modelle & Preise
| Modell | Input /M | Output /M |
|---|---|---|
| nova-2-sonicgeschlossene Beta | $0.06 | $0.24 |
Listenpreise der Anbieter, ohne Plattform-Aufschlag. Die Preise werden auf jeder Modellseite live aktualisiert. Dies sind offizielle Listenpreise. Angemeldete Kunden sehen auf /console/pricing die effektiven Preise inklusive Workspace-Rabatten.
Amazon-Modelle in 30 Sekunden nutzen
import asyncio, base64, json, websockets
URL = "wss://synthorai.io/v1/realtime?model=nova-2-sonic"
# Send ONLY the Authorization header — the beta protocol is retired.
HEADERS = {"Authorization": "Bearer sk-syn-..."}
async def main():
async with websockets.connect(URL, additional_headers=HEADERS) as ws:
# 1) configure the speech-to-speech session
await ws.send(json.dumps({
"type": "session.update",
"session": {
"type": "realtime",
"output_modalities": ["audio"],
"audio": {"output": {"voice": "alloy"}},
},
}))
# 2) send input audio (base64 PCM16), then request a spoken reply
await ws.send(json.dumps({"type": "input_audio_buffer.append", "audio": pcm16_b64}))
await ws.send(json.dumps({"type": "input_audio_buffer.commit"}))
await ws.send(json.dumps({"type": "response.create"}))
# 3) stream the model's audio (and text) back
async for raw in ws:
ev = json.loads(raw)
if ev["type"] == "response.audio.delta":
play(base64.b64decode(ev["delta"])) # audio out
elif ev["type"] == "response.done":
break
asyncio.run(main())import WebSocket from "ws";
const ws = new WebSocket("wss://synthorai.io/v1/realtime?model=nova-2-sonic", {
// Send ONLY the Authorization header — the beta protocol is retired.
headers: { Authorization: "Bearer sk-syn-..." },
});
ws.on("open", () => {
// configure the speech-to-speech session
ws.send(JSON.stringify({ type: "session.update", session: {
type: "realtime", output_modalities: ["audio"], audio: { output: { voice: "alloy" } },
} }));
// send input audio (base64 PCM16), then request a spoken reply
ws.send(JSON.stringify({ type: "input_audio_buffer.append", audio: pcm16Base64 }));
ws.send(JSON.stringify({ type: "input_audio_buffer.commit" }));
ws.send(JSON.stringify({ type: "response.create" }));
});
ws.on("message", (raw) => {
const ev = JSON.parse(raw.toString());
if (ev.type === "response.audio.delta") playAudio(Buffer.from(ev.delta, "base64")); // audio out
else if (ev.type === "response.done") ws.close();
});# Realtime is a WebSocket protocol — use a WS client such as websocat.
# Each line below is one OpenAI Realtime event (JSON) sent to the session.
websocat -H 'Authorization: Bearer sk-syn-...' \
'wss://synthorai.io/v1/realtime?model=nova-2-sonic' <<'EOF'
{"type":"session.update","session":{"type":"realtime","output_modalities":["audio"],"audio":{"output":{"voice":"alloy"}}}}
{"type":"input_audio_buffer.append","audio":"<base64-pcm16>"}
{"type":"input_audio_buffer.commit"}
{"type":"response.create"}
EOF
# Responses stream back as response.audio.delta (base64 audio out) … response.donepackage main
import (
"net/http"
"github.com/gorilla/websocket"
)
func main() {
h := http.Header{}
h.Set("Authorization", "Bearer sk-syn-...")
// Send ONLY the Authorization header — the beta protocol is retired.
c, _, err := websocket.DefaultDialer.Dial("wss://synthorai.io/v1/realtime?model=nova-2-sonic", h)
if err != nil {
panic(err)
}
defer c.Close()
// configure the speech-to-speech session, send audio, request a spoken reply
c.WriteJSON(map[string]any{"type": "session.update", "session": map[string]any{
"type": "realtime", "output_modalities": []string{"audio"},
"audio": map[string]any{"output": map[string]any{"voice": "alloy"}}}})
c.WriteJSON(map[string]any{"type": "input_audio_buffer.append", "audio": pcm16B64})
c.WriteJSON(map[string]any{"type": "input_audio_buffer.commit"})
c.WriteJSON(map[string]any{"type": "response.create"})
for {
var ev struct {
Type string `json:"type"`
Delta string `json:"delta"`
}
if err := c.ReadJSON(&ev); err != nil {
return
}
if ev.Type == "response.audio.delta" {
playAudio(ev.Delta) // base64 audio out
} else if ev.Type == "response.done" {
return
}
}
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.WebSocket;
import java.util.concurrent.CompletionStage;
// JDK built-in WebSocket — no extra dependency needed.
WebSocket ws = HttpClient.newHttpClient().newWebSocketBuilder()
.header("Authorization", "Bearer sk-syn-...")
// Send ONLY the Authorization header — the beta protocol is retired.
.buildAsync(URI.create("wss://synthorai.io/v1/realtime?model=nova-2-sonic"), new WebSocket.Listener() {
public CompletionStage<?> onText(WebSocket w, CharSequence data, boolean last) {
// handle response.audio.delta (base64 audio out) / response.done here
w.request(1);
return null;
}
}).join();
// configure the session, send input audio, then request a spoken reply
ws.sendText("{\"type\":\"session.update\",\"session\":{\"type\":\"realtime\",\"output_modalities\":[\"audio\"],\"audio\":{\"output\":{\"voice\":\"alloy\"}}}}", true);
ws.sendText("{\"type\":\"input_audio_buffer.append\",\"audio\":\"<base64-pcm16>\"}", true);
ws.sendText("{\"type\":\"input_audio_buffer.commit\"}", true);
ws.sendText("{\"type\":\"response.create\"}", true);Über Amazon
Die Nova-Familie von Amazon umfasst Text-, multimodale und Speech-to-Speech-Modelle. Auf Synthorai ist die Speech-to-Speech-Reihe über denselben Realtime-Socket und Schlüssel erreichbar wie die aller anderen Anbieter, mit Live-Pay-as-you-go-Preisen und ohne dass ein Amazon-Konto erforderlich ist.
FAQ
Wie bekomme ich einen Amazon-API-Key ohne Abo?
Sie brauchen kein Amazon-Konto: Registrieren Sie sich bei Synthorai, erstellen Sie einen API-Key, und jedes Amazon-Modell auf dieser Seite funktioniert über den OpenAI-kompatiblen Endpoint: nutzungsbasierte Abrechnung, ohne Abo (als „geschlossene Beta“ markierte Modelle erfordern zusätzlich eine genehmigte Bewerbung).
Was kostet die Amazon API?
Token-basiert abgerechnete Modelle starten bei $0.06/M Input-Tokens; der Live-Preis pro Einheit steht für jedes Modell in der Tabelle oben; es sind Listenpreise der Anbieter ohne Plattform-Aufschlag.
Kann ich meinen eigenen Amazon-Key nutzen (BYOK)?
BYOK ist für Amazon noch nicht verfügbar; Anfragen laufen zu den aufgeführten Tarifen über die verwalteten Kanäle von Synthorai.
Wie sieht die Datenspeicherungs-Richtlinie von Amazon über die API aus?
Standardmäßig keine Prompt-Speicherung am Gateway; upstream gelten die Datenrichtlinien von Amazon.
Weitere Anbieter