Developer API

API Reference

The HanoLab REST API lets you integrate music generation, voice conversion, stem separation, and mastering into your own product. Available on the Creator plan and above.

Base URL

https://hanolab.com

Authentication

All requests must include a bearer token. Generate a key from your account dashboard.

Authorization: Bearer hnl_live_xxxxxxxxxxxx

Async Job Pattern

Generation endpoints are asynchronous. A successful submission returns a task ID. Poll /api/v1/tasks/[id] or subscribe to the SSE progress stream until status is completed, then read output_urls from the response.

Endpoints

POST/api/v1/music/generate

Submit a text-to-music or lyrics-to-song generation job.

{
  "prompt": "cinematic synthwave, 120 bpm",
  "lyrics": "",
  "duration": 30,
  "guidance": 7.5,
  "seed": null,
  "style_model_id": null
}
POST/api/v1/voice/convert

Convert the vocal of an audio file using a target voice model.

{
  "audio_url": "https://cdn.hanolab.com/inputs/xxx.wav",
  "voice_model_id": "vm_123",
  "pitch_shift": 0,
  "protect": 0.33
}
POST/api/v1/voice/clone

Train a lightweight voice model from a reference clip.

{
  "reference_url": "https://cdn.hanolab.com/inputs/ref.wav",
  "name": "My Voice",
  "epochs": 100
}
POST/api/v1/toolkit/separate

Separate vocals, drums, bass, and other instruments.

{
  "audio_url": "https://cdn.hanolab.com/inputs/song.mp3",
  "stems": ["vocals", "drums", "bass", "other"]
}
POST/api/v1/toolkit/master

Reference-based mastering — match loudness and tone to a target.

{
  "target_url": "https://cdn.hanolab.com/inputs/target.wav",
  "reference_url": "https://cdn.hanolab.com/inputs/reference.wav"
}
GET/api/v1/tasks/[id]

Get task status and output URLs once complete.

GET/api/v1/tasks/[id]/progress

Server-Sent Events stream for real-time task progress.

Billing & Limits

The API is billed separately from your workstation subscription on a pay-per-call basis. Each call is deducted from a prepaid balance you top up from your account dashboard. See the pricing page for per-endpoint prices.

  • Creator: API access unlocked · 5 concurrent jobs · standard rates
  • Pro: API access unlocked · 20 concurrent jobs · 20% volume discount on every call
  • Enterprise: custom concurrency, SLA, and volume pricing — contact sales

Errors

The API returns standard HTTP status codes. Error responses are JSON:

{
  "error": "insufficient_credits",
  "message": "Your plan does not have enough credits.",
  "status": 402
}
code

Ready to build?

Upgrade to a plan with API access and start integrating HanoLab into your workflow.

View Plans