Skip to content

Getting Started

  • An OmnAPI account (sign up at omnapi.com).
  • An API key — see Authentication.
  • curl, or any HTTP client of your choice.
  1. Set your key as an env var so it doesn’t end up in shell history.

    Terminal window
    export OMNAPI_KEY="sk_live_..."
  2. Probe the gateway with a no-credit endpoint.

    Terminal window
    curl https://api.omnapi.com/health

    You should see {"status":"ok"}.

  3. Submit a real generation request. Below is a music compose call — see Quickstart for image and lyrics variants.

    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": "lofi jazz, rainy night, soft piano",
    "duration": 30
    }'
  4. Poll the job until terminal state. See Async Jobs for the full lifecycle.