On the Studio plan you can generate songs programmatically. Send a prompt, get back a job, and poll for the finished audio — ideal for building Mypaattu into your own app or workflow.
Getting your API key
- 1Go to Studio → API Access (open it).
- 2Create a key and copy it somewhere safe — you won’t be able to see it again.
- 3Send it as a Bearer token in the Authorization header.
Keep keys secret
Your key can spend your credits. Never ship it in front-end code or commit it to a repo — call the API from your server.
Generate a song
Send a POST with your prompt. You’ll get a jobId back immediately.
curl -X POST https://mypaattu.com/api/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "a soulful Hindi love ballad with tabla and piano",
"mode": "GENERATE",
"language": "Hindi"
}'Poll for the result
Generation runs in the background. Poll the status endpoint with your jobId until the song is ready.
curl https://mypaattu.com/api/v1/status/JOB_ID \
-H "Authorization: Bearer YOUR_API_KEY"Credits & limits
Each successful generation uses one API credit, and the Studio plan includes a monthly API credit allowance. Requests are rate-limited per key, so space out bulk jobs. Your remaining credits come back in each response.
Note
Full request options, error codes and the response schema live in the API reference under Studio → API Access.
Ready to try it?
Open the Studio and put this into practice.