Skip to content

Quickstart

All examples assume OMNAPI_KEY is set in your environment.

Terminal window
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}'
Terminal window
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"}'
Terminal window
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"}'

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:

Terminal window
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.