API Reference
Licenses
Generate a license

Generate a license

Issue a license for one track on behalf of one of your end users. See the Licensing overview for the conceptual flow.

POST/api/v1/licenses/generate

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PARTNER_API_KEY>
X-User-IDYesYour internal identifier for the end user requesting the license
Content-TypeYesapplication/json

Request body

FieldTypeRequiredDescription
track_idUUIDYesThe Slipstream track to license. Use any track ID returned from search or browse endpoints.
project_namestringNoOptional label for the project this license is for. Up to 255 characters. Useful for your own bookkeeping.

Example request

curl https://api.slipstreammusic.com/api/v1/licenses/generate \
  -X POST \
  -H "Authorization: Bearer $PARTNER_API_KEY" \
  -H "X-User-ID: user-12345" \
  -H "Content-Type: application/json" \
  -d '{
    "track_id": "8a4b2c1d-9e7f-4a6b-b3c2-1f8d4e5a7c6b",
    "project_name": "Spring 2026 promo cut"
  }'

Response

200 OK

{
  "success": true,
  "license": {
    "license_id": "5f3e7d9c8b2a4f1e6d0c5b8a3e2f7d9c",
    "license_url": "5f3e7d9c8b2a4f1e6d0c5b8a3e2f7d9c",
    "track_id": "8a4b2c1d-9e7f-4a6b-b3c2-1f8d4e5a7c6b",
    "track_name": "Cinematic Rise",
    "artist_name": "Jane Doe",
    "user_id": "user-12345",
    "created_at": "2026-04-30T18:42:11.508Z",
    "expires_at": null
  },
  "usage": {
    "daily_used": 13,
    "monthly_used": 306,
    "daily_limit": 1000,
    "monthly_limit": 30000
  }
}
FieldDescription
license.license_idUnique license identifier (a 32-character hex string). Save this if you need to look up the license later.
license.license_urlToday returns the same value as license_id. The public URL is built by prefixing it with https://license.slipstreammusic.com/v/. Construct it client-side until this field returns the full URL directly.
license.track_idEchoed track ID.
license.track_name, license.artist_nameTrack and artist metadata, ready to display in your UI.
license.user_idThe X-User-ID you sent, echoed back.
license.created_atISO-8601 timestamp.
license.expires_atSet only if the license has a fixed expiry. null means the license does not expire.
usageYour daily and monthly quota state.

Same user, same track, same project_name: you get back the same license. The endpoint is safe to call repeatedly.

Building the public license URL

https://license.slipstreammusic.com/v/{license_id}

Example:

https://license.slipstreammusic.com/v/5f3e7d9c8b2a4f1e6d0c5b8a3e2f7d9c

This is the URL you attach to the user's project, video export, or download bundle. The page at that URL is human-readable proof of the license.

Errors

All error responses look like this:

{
  "success": false,
  "error": {
    "code": "track_not_found",
    "message": "Track doesn't exist."
  }
}
HTTPerror.codeWhen it happens
400validation_errorThe request body is malformed or missing fields. Details in error.details.
400missing_user_idX-User-ID header was not provided.
401missing_tokenNo Authorization header on the request.
401invalid_tokenThe token doesn't match a known partner client.
401revoked_tokenThe token has been revoked.
401expired_tokenThe token has expired.
403inactive_clientThe partner client is disabled.
403missing_scopeThe token lacks the licenses:generate scope.
404track_not_foundThe track ID doesn't exist or isn't licensable for your account.
429throttledYou hit a rate limit (burst, daily, or monthly).

Rate limits

Two limits apply on top of your daily and monthly quotas:

  • A short burst limit per API key, to protect against accidental loops.
  • The standard daily and monthly quotas configured for your partnership.

When throttled, the response includes the standard Retry-After header (in seconds). Current usage is also returned in usage so you can decide whether to back off, requeue, or surface a message to your user.

Tips

  • Reuse licenses where possible. Pass the same project_name for the same user and track across retries to avoid burning through your daily quota on the same project.
  • Store the license_id alongside the user's work. That identifier is the source of truth.
  • Show the license URL in your UI if your users want it. The page at the URL is built to be shown to end users without confusion.