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
Authentication
All requests must include a bearer token. Generate a key from your account dashboard.
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
/api/v1/music/generateSubmit 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
}/api/v1/voice/convertConvert 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
}/api/v1/voice/cloneTrain a lightweight voice model from a reference clip.
{
"reference_url": "https://cdn.hanolab.com/inputs/ref.wav",
"name": "My Voice",
"epochs": 100
}/api/v1/toolkit/separateSeparate vocals, drums, bass, and other instruments.
{
"audio_url": "https://cdn.hanolab.com/inputs/song.mp3",
"stems": ["vocals", "drums", "bass", "other"]
}/api/v1/toolkit/masterReference-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"
}/api/v1/tasks/[id]Get task status and output URLs once complete.
/api/v1/tasks/[id]/progressServer-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
}Ready to build?
Upgrade to a plan with API access and start integrating HanoLab into your workflow.
View Plans