UlazAI developer docs

Developer documentation

Audio Generation API

Generate music, voiceovers, and sound effects using UlazAI credits. Results are delivered asynchronously: submit a job, then poll the status endpoint until it completes.

Authentication: use Authorization: Bearer <ulazai_api_key> or Authorization: Token <token>.

🎡 Music

POST /api/v1/music/generate/ Auth Required

Generate a music track from a prompt.

Request Body

{
  "prompt": "Upbeat synthwave track with neon retro vibes",
  "model": "V5",               // Options: "V5", "V4_5PLUS" (default: V4_5PLUS)
  "duration": 30,              // Optional (seconds)
  "instrumental": true,        // Optional (default: true)
  "title": "Neon Nights",      // Optional
  "style": "synthwave, 120bpm" // Optional
}

Response (201 Created)

{
  "success": true,
  "data": {
    "music_id": "uuid-here",
    "status": "processing",
    "status_url": "/api/v1/music/status/uuid-here/",
    "credits_used": 12,
    "credits_remaining": 88
  }
}

Credit cost: 12 credits per request.

GET /api/v1/music/status/<music_id>/ Auth Required

Poll for job completion.

Response (200 OK, completed)

{
  "success": true,
  "data": {
    "music_id": "uuid-here",
    "status": "completed",
    "audio_url": "https://media.ulazai.com/...",
    "credits_used": 12
  }
}

πŸŽ™οΈ Voiceover

POST /api/v1/voiceover/generate/ Auth Required

Convert text to a voiceover.

Request Body (TTS)

{
  "model": "tts_turbo_25",     // Options: "tts_turbo_25", "tts_v3"
  "text": "Welcome to UlazAI Studio. Let's create something amazing.",
  "voice": "Rachel",          // Optional
  "speed": 1.0                // Optional (0.7 - 1.2)
}

Request Body (Dialogue)

{
  "model": "dialogue_v3",
  "dialogue": [
    {"voice": "Rachel", "text": "We need a new hook for this ad."},
    {"voice": "Roger",  "text": "Let's make it shorter and punchier."}
  ]
}

Credit cost: based on character count. Turbo 2.5: 12 credits per 1,000 chars. V3/Dialogue: 14 credits per 1,000 chars.

GET /api/v1/voiceover/status/<voiceover_id>/ Auth Required

Poll for completion and retrieve the audio URL.

πŸ”Š Sound Effects

POST /api/v1/sound-effects/generate/ Auth Required

Generate a sound effect from a prompt.

Request Body

{
  "text": "A futuristic UI beep with a short tail",
  "loop": false,
  "duration_seconds": 2.5
}

Credit cost: 0.24 credits/sec (rounded up), minimum 1 credit.

GET /api/v1/sound-effects/status/<sfx_id>/ Auth Required

Poll for completion and retrieve the audio URL.