POST
/
audio
/
speech
from together import Together
import os

client = Together(
api_key=os.environ.get("TOGETHER_API_KEY"),
)

response = client.audio.speech.create(
model="cartesia/sonic-2",
input="The quick brown fox jumps over the lazy dog.",
voice="laidback woman",
)

response.stream_to_file("audio.wav")
This response does not have an example.

Authorizations

Authorization
string
header
default:default
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200
application/octet-stream

OK

The response is of type file.