Skip to main content
POST
/
api
/
ai
/
audio
/
generate
Generate audio
curl --request POST \
  --url https://hub.oxen.ai/api/ai/audio/generate \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "prompt": "<string>",
  "audio_urls": [
    "<string>"
  ],
  "image_url": "<string>",
  "output_format": "<string>",
  "pitch": 123,
  "response_format": "<string>",
  "sample_rate": 123,
  "save_to_workbench": true,
  "speed": 123,
  "voice": "<string>",
  "volume": 123
}
'
{
  "audios": [
    {
      "url": "<string>"
    }
  ],
  "created": 123,
  "model": "<string>"
}

Body

application/json

Audio generation request

model
string
required
prompt
string
required

Text prompt or text to synthesize

audio_urls
string[] | null

Reference audio URLs for voice cloning

image_url
string | null

Reference image URL

output_format
string | null

wav, mp3, pcm, or ogg_opus

pitch
integer | null
response_format
string | null

url (default) or b64_json

sample_rate
integer | null

Output sample rate in Hz

save_to_workbench
boolean | null

Persist the generated audio to the workbench (default true)

speed
number | null
voice
string | null

Preset voice name or cloned voice ID

volume
number | null

Response

Generated audio

audios
object[]
created
integer
model
string