Quickstart
All examples assume OMNAPI_KEY is set in your environment.
1. Generate music (Producer)
Section titled “1. Generate music (Producer)”curl -X POST https://api.omnapi.com/api/v1/producer/generate/music/compose \ -H "x-api-key: $OMNAPI_KEY" \ -H "Content-Type: application/json" \ -d '{"prompt": "ambient post-rock, distant guitars", "duration": 60}'const job = await fetch( "https://api.omnapi.com/api/v1/producer/generate/music/compose", { method: "POST", headers: { "x-api-key": process.env.OMNAPI_KEY!, "Content-Type": "application/json", }, body: JSON.stringify({ prompt: "ambient post-rock, distant guitars", duration: 60 }), },).then((r) => r.json());2. Generate lyrics
Section titled “2. Generate lyrics”curl -X POST https://api.omnapi.com/api/v1/producer/generate/lyrics \ -H "x-api-key: $OMNAPI_KEY" \ -H "Content-Type: application/json" \ -d '{"theme": "lost in a coastal town", "language": "en"}'3. Generate image cover art
Section titled “3. Generate image cover art”curl -X POST https://api.omnapi.com/api/v1/producer/generate/image \ -H "x-api-key: $OMNAPI_KEY" \ -H "Content-Type: application/json" \ -d '{"prompt": "synthwave album cover, neon palms"}'Polling the result
Section titled “Polling the result”All compose/generate endpoints return a job descriptor:
{ "jobId": "job_01H...", "status": "queued", "createdAt": "2026-05-23T10:00:00Z"}Poll the job until terminal state:
curl https://api.omnapi.com/api/v1/tasks/$JOB_ID \ -H "x-api-key: $OMNAPI_KEY"See Async Jobs for backoff strategy, timeouts and final-state semantics.
Where to go next
Section titled “Where to go next”- Hit the Interactive API Reference to try every endpoint without leaving your browser.
- Read Errors for the canonical error code list.