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
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PARTNER_API_KEY> |
X-User-ID | Yes | Your internal identifier for the end user requesting the license |
Content-Type | Yes | application/json |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
track_id | UUID | Yes | The Slipstream track to license. Use any track ID returned from search or browse endpoints. |
project_name | string | No | Optional 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
}
}| Field | Description |
|---|---|
license.license_id | Unique license identifier (a 32-character hex string). Save this if you need to look up the license later. |
license.license_url | Today 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_id | Echoed track ID. |
license.track_name, license.artist_name | Track and artist metadata, ready to display in your UI. |
license.user_id | The X-User-ID you sent, echoed back. |
license.created_at | ISO-8601 timestamp. |
license.expires_at | Set only if the license has a fixed expiry. null means the license does not expire. |
usage | Your 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/5f3e7d9c8b2a4f1e6d0c5b8a3e2f7d9cThis 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."
}
}| HTTP | error.code | When it happens |
|---|---|---|
| 400 | validation_error | The request body is malformed or missing fields. Details in error.details. |
| 400 | missing_user_id | X-User-ID header was not provided. |
| 401 | missing_token | No Authorization header on the request. |
| 401 | invalid_token | The token doesn't match a known partner client. |
| 401 | revoked_token | The token has been revoked. |
| 401 | expired_token | The token has expired. |
| 403 | inactive_client | The partner client is disabled. |
| 403 | missing_scope | The token lacks the licenses:generate scope. |
| 404 | track_not_found | The track ID doesn't exist or isn't licensable for your account. |
| 429 | throttled | You 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_namefor the same user and track across retries to avoid burning through your daily quota on the same project. - Store the
license_idalongside 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.