The New Black AI

Create a Soundtrack API

Create a Soundtrack — workflow

Compose an original track from a prompt and an optional picture, or lay a soundtrack on one of your videos.

POST/v1/generateworkflow: freeform_audio-v1

One endpoint serves every workflow — this page documents freeform_audio-v1, the current version. Credits are debited at submission (2 cr standard, 2 cr pro); a failed generation is refunded automatically. Earlier versions of this endpoint, if any, keep being served under their own names.

ParameterValue for this workflow
workflow"freeform_audio-v1" required
promptDescribe the creation or the change — English works best.
referenceReference image or video — one public HTTPS URL.
ratioauto · 9:16 · 1:1 · 3:4 · 2:3 · 4:3 · 3:2
tier"standard" (2 cr), "pro" (2 cr)
webhook_urlOptional — we POST the outcome here when the generation settles. Without it, poll the URL returned in the response until the status settles.

Example request

curl -X POST https://thenewblack.ai/api/v1/generate \
  -H "Authorization: Bearer tnb_live_XXXXXXXXXXXX" \
  -H "Content-Type: application/json" \
  -d '{
    "workflow": "freeform_audio-v1",
    "prompt": "Describe the creation or the change",
    "reference": "https://example.com/image.jpg",
    "ratio": "auto",
    "tier": "standard"
  }'
// 202 Accepted
{
  "generation_id": "3f1c9a6e-...",
  "status": "running",
  "poll": "/api/v1/generations/3f1c9a6e-..."
}

Example response

Poll /v1/generations/{id} (or receive the webhook) until the generation settles:

// 200 OK
{
  "generation_id": "3f1c9a6e-...",
  "workflow": "freeform_audio",
  "status": "succeeded",
  "result": {
    "type": "image",
    "url": "https://.../result.webp",
    "thumbnail": "https://.../thumb.webp"
  }
}

Results are stored for 48 hours — copy them to your own storage. Authentication, errors and webhooks are documented in the full API reference.

Frequently asked questions

What does the Create a Soundtrack endpoint need?

reference (Reference image or video, optional), a prompt — all as listed in the parameter table above, and in GET /v1/catalog.

How is it billed?

Per generation, at the standard, pro or ultra price shown above; a failed generation is refunded.

How much does it cost?

2 credits on the standard tier, 2 on pro. Credits come with plans and packs; a failed generation is always refunded.

Other endpoints: Virtual Try-On API · AI Fashion Models API · Fashion Design API · Reimagine Model API · Swap Model API · AI Stylist API · all endpoints