Text-to-Music

AI song generation API for full music creation workflows

Create full songs from prompts with support for lyrics or instrumental workflows, making it easier to ship music generation inside your product.

View current credit pricing

Why teams evaluate this API

A strong fit for teams building AI music generation, creative experimentation, or end-user composition experiences.

Best-fit teams

  • AI music generation products
  • Creator platforms with song creation flows
  • Apps that prototype tracks from prompts

Core capabilities

  • Prompt-to-song generation with configurable song settings
  • Instrumental and lyrics-based workflow support
  • Async processing for longer-running tasks
  • Simple cost modeling via credits per request

Typical implementation flow

  1. 1Capture prompt, style, BPM, and title preferences
  2. 2Submit generation jobs asynchronously
  3. 3Track job status in your app or dashboard
  4. 4Store and surface finished songs for editing or export

Example request

Set OMNAPI_KEY on your server and create REQUEST_ID once for this logical request. Reuse that ID on transport retries. A new generation can incur a charge; review current pricing first.

curl --fail-with-body --max-time 60 -X POST "https://api.omnapi.com/api/v1/producer/generate/music/compose" \
  -H "x-api-key: $OMNAPI_KEY" \
  -H "Idempotency-Key: $REQUEST_ID" \
  -H "Content-Type: application/json" \
  --data '{
  "soundPrompt": "Warm instrumental indie pop, jangly guitars and brushed drums",
  "instrumental": true,
  "length": 60
}'

soundPrompt is required and allows up to 500 characters. length accepts 1–600 seconds. Add approved lyrics when you want a vocal song instead of this instrumental example.

See the authentication and task quickstart and complete request schema.

FAQ

What kinds of products use this page?

Use this endpoint when your application needs to turn a musical brief into audio. Save the task ID, handle terminal errors, and review the result before publishing.

Why is async workflow emphasized?

Longer-running media jobs are easier to manage reliably with queueing, status tracking, and result retrieval patterns.