← UI Sound Generator
Your token

UI Sound Generator API

Making a sound - the synthesizer, the checks, the WAV file, the code - runs free in the browser and needs no API. The API is for the one metered step: describe an app (and optionally list its moments) and get back, as JSON, one sound per moment plus the moments that should stay silent. The reply holds settings, not audio; the page turns settings into sound, and its .json download uses the same sound object.

Base URL: https://api.skillsafe.ai/v1/app-api. Every response is {"data": ...} or {"error": {"code", "message"}}; read error.code and error.message rather than the HTTP status alone.

The task field

This app has one task. Always send "task": "kit".

taskWhat it doesReply
kitChooses one interface sound per moment of the described app (the moments you list, each answered once in order, or 4 to 6 it picks), with a shared style, a kind, a name, a reason and the full sound settings for each; moments that should stay silent (typing, hover, scrolling) come back in no_sound; plus usage notes and anything it assumed.One JSON object

Input fields

Every field is a string.

FieldMeaning
task"kit"
productRequired. What the app or site is and how it should feel. Up to 1,500 characters (the page cuts at a sentence end).
momentsMoments that might need a sound, one per line, at most 8. May be empty.
currentEmpty, or JSON text of a sound to match in character: kind, name, sound, measured (ms, peak_db).
clipped_noteEmpty, or a sentence saying the description or the list was cut.

The reply

job.output.output is text holding one JSON object: kit_name, style, sounds ([{moment, kind, name, why, sound}]), no_sound ([{moment, why}]), notes and assumptions. kind is one of click, pop, toggle, tick, drop, rise, success, error, warning, notification, startup, other.

A sound is {"volume": 0.05-1, "layers": [1-8 layers]}. A noise layer: type "noise", start_ms 0-2000, length_ms 1-1000, decay_ms 0.1-500 (exponential time constant), filter (bandpass, highpass, lowpass, none), filter_hz 20-20000, q 0.1-30, gain 0-1. A tone layer: type "tone", wave (sine, triangle, square, sawtooth), start_ms 0-2000, from_hz and to_hz 20-8000, glide_ms 0-3000 (0 = steady pitch), attack_ms 0-1000, length_ms 5-3000, gain 0-1, lowpass_hz 0 (off) or 100-20000. Every layer ends by 3000 ms. These map one to one onto Web Audio nodes: an AudioBufferSourceNode of decaying noise into a BiquadFilterNode, or an OscillatorNode with exponentialRampToValueAtTime on its frequency and its gain. Bring every value into range before you use it; the page does, and lists each correction. If the balance ran low, truncated is true and the object may stop early; the page keeps every sound that arrived whole.

Worked example

Input (input.json):

{
  "task": "kit",
  "product": "Online checkout for a small coffee roaster's shop. Friendly, crisp and modern. Customers add bags of beans to a cart and pay by card.",
  "moments": "add to cart\nremove from cart\npayment successful\ncard declined\nhover over a product",
  "current": "",
  "clipped_note": ""
}

Reply:

{
  "kit_name": "Fresh Roast Checkout",
  "style": "Crisp, short and round: soft sine and triangle tones in a mid register with a light noise tick on presses. It keeps a friendly, modern checkout feeling quick and calm while paying.",
  "sounds": [
    {
      "moment": "add to cart",
      "kind": "pop",
      "name": "Bag pop",
      "why": "Adding a bag is a small, frequent action, so it gets a tiny crisp pop that confirms the tap without drawing attention.",
      "sound": {
        "volume": 1,
        "layers": [
          {
            "type": "noise",
            "start_ms": 0,
            "length_ms": 8,
            "decay_ms": 1.1,
            "filter": "bandpass",
            "filter_hz": 4500,
            "q": 3,
            "gain": 0.3
          },
          {
            "type": "tone",
            "wave": "sine",
            "start_ms": 0,
            "from_hz": 520,
            "to_hz": 260,
            "glide_ms": 40,
            "attack_ms": 0,
            "length_ms": 60,
            "gain": 0.3,
            "lowpass_hz": 0
          }
        ]
      }
    },
    {
      "moment": "remove from cart",
      "kind": "drop",
      "name": "Soft drop",
      "why": "Removing an item is the opposite of adding, so a short falling sine mirrors the pop and signals the item leaving.",
      "sound": {
        "volume": 1,
        "layers": [
          {
            "type": "tone",
            "wave": "sine",
            "start_ms": 0,
            "from_hz": 700,
            "to_hz": 300,
            "glide_ms": 90,
            "attack_ms": 5,
            "length_ms": 110,
            "gain": 0.25,
            "lowpass_hz": 0
          }
        ]
      }
    },
    {
      "moment": "payment successful",
      "kind": "success",
      "name": "Paid chime",
      "why": "A completed card payment is the most important confirmation in the shop, so it gets a rising three-note triangle chime that stays short.",
      "sound": {
        "volume": 1,
        "layers": [
          {
            "type": "tone",
            "wave": "triangle",
            "start_ms": 0,
            "from_hz": 587.33,
            "to_hz": 587.33,
            "glide_ms": 0,
            "attack_ms": 10,
            "length_ms": 160,
            "gain": 0.25,
            "lowpass_hz": 0
          },
          {
            "type": "tone",
            "wave": "triangle",
            "start_ms": 90,
            "from_hz": 739.99,
            "to_hz": 739.99,
            "glide_ms": 0,
            "attack_ms": 10,
            "length_ms": 160,
            "gain": 0.25,
            "lowpass_hz": 0
          },
          {
            "type": "tone",
            "wave": "triangle",
            "start_ms": 180,
            "from_hz": 880,
            "to_hz": 880,
            "glide_ms": 0,
            "attack_ms": 10,
            "length_ms": 220,
            "gain": 0.25,
            "lowpass_hz": 0
          }
        ]
      }
    },
    {
      "moment": "card declined",
      "kind": "error",
      "name": "Gentle decline",
      "why": "A declined card must not be missed, so a low, short falling tone tells the customer something needs fixing without sounding harsh.",
      "sound": {
        "volume": 1,
        "layers": [
          {
            "type": "tone",
            "wave": "triangle",
            "start_ms": 0,
            "from_hz": 220,
            "to_hz": 120,
            "glide_ms": 200,
            "attack_ms": 8,
            "length_ms": 260,
            "gain": 0.22,
            "lowpass_hz": 800
          },
          {
            "type": "tone",
            "wave": "sine",
            "start_ms": 0,
            "from_hz": 165,
            "to_hz": 90,
            "glide_ms": 200,
            "attack_ms": 8,
            "length_ms": 260,
            "gain": 0.2,
            "lowpass_hz": 0
          }
        ]
      }
    }
  ],
  "no_sound": [
    {
      "moment": "hover over a product",
      "why": "Hover is frequent and decorative, so it stays silent and gets only a visual highlight."
    }
  ],
  "notes": [
    "Trigger each sound on the action's result (cart updated, payment confirmed, card refused), not on the button press alone.",
    "Every sound needs a visual equivalent, such as a cart count change, a success message or an error banner.",
    "Give people a visible way to turn sounds off, and start muted if the browser or device asks for reduced motion or quiet.",
    "Play sounds only after a user interaction so the browser allows audio."
  ],
  "assumptions": [
    "Assumed the shop is used on screens where sound can be played, and that people may be in quiet places."
  ]
}

Errors

HTTPWhat to do
401The token is missing, expired or a guest token on a run. Get a personal token on the token page.
402The balance is below what the run reserves. Top up at skillsafe.ai/account/billing.
400The body is not a JSON object of the fields above, or product is missing.
429Wait and retry with the same Idempotency-Key.

Step 1 — a tiny client helper

One function that sends JSON and unwraps the {data, error} envelope.

BASE="https://api.skillsafe.ai/v1/app-api"
TOKEN="paste-your-token-here"   # from https://ui-sound-generator.skillsafe.ai/tokens.html
api() { # api METHOD PATH [JSON-BODY]
  curl -s -X "$1" "$BASE$2" -H "Content-Type: application/json" \
    ${TOKEN:+-H "Authorization: Bearer $TOKEN"} ${3:+--data "$3"}
}

Step 2 — a token

A guest token is enough for /me and /estimate. A run is metered, so it needs your personal token: sign in on the token page and copy it.

# a guest token (enough for /me and /estimate); a run needs your personal token from /tokens.html
TOKEN=$(curl -s -X POST "$BASE/guest" -H "Content-Type: application/json" -d '{"slug":"ui-sound-generator"}' | jq -r '.data.token')

Step 3 — who am I, and my balance

subject_type is guest or user; credits is the balance (1 credit = $0.0001).

api GET /me | jq '.data | {subject_type, credits}' 

Step 4 — price a run for free

/estimate charges nothing and starts no job. hold_credits is the amount reserved while a run is in flight, not the price; the run is charged what it uses.

# input.json: the run input object - {"task": "kit", "product": "Online checkout for a small coffee shop...", "moments": "add to cart\npayment successful", "current": "", "clipped_note": ""}
api POST /estimate "$(cat input.json)" | jq '.data | {hold_credits, min_credits, model, model_alias, markup_bps, warnings}' 

Step 5 — run it and wait for the job

Send an Idempotency-Key derived from the input: a retry with the same key is never billed twice.

KEY="ui-sound-generator:kit:$(shasum -a 256 input.json | cut -c1-16):a1"
JOB=$(curl -s -X POST "$BASE/run" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: $KEY" --data @input.json | jq -r '.data.job_id')
while :; do
  J=$(api GET "/jobs/$JOB"); S=$(echo "$J" | jq -r '.data.status')
  case "$S" in succeeded|failed|cancelled) break;; esac; sleep 2
done
echo "$J" | jq -r '.data.output.output' > reply.json   # one JSON object: kit_name, style, sounds, ...
echo "$J" | jq '.data | {charged_credits, truncated}' 

Step 6 — or stream it

/run-stream sends Server-Sent Events while the job runs and the finished job at the end.

# Server-Sent Events: tick/delta events while the job runs, then a final event with the job
curl -N -s -X POST "$BASE/run-stream" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: ui-sound-generator:kit:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json