Skip to content

Licenses API

The Licenses API allows platforms to request, manage, and report usage for licenses on protected identities.

List licenses for your platform.

GET /v1/lmif/licenses
const licenses = await lmif.licenses.list({
status: 'active',
limit: 20
});
ParameterTypeDescription
statusstringpending, active, expired, revoked
boxIdstringFilter by box ID
tierstringFilter by tier
limitintegerMax items
offsetintegerItems to skip
{
"data": [
{
"id": "lic_abc123",
"boxId": "box_xyz789",
"identityName": "Taylor Swift",
"tier": "commercial",
"status": "active",
"monthlyFee": 500,
"royaltyRate": 0.10,
"validFrom": "2024-01-01T00:00:00Z",
"expiresAt": "2025-01-01T00:00:00Z",
"autoRenew": true
}
],
"meta": {
"total": 15,
"limit": 20,
"offset": 0
}
}

Get details of a specific license.

GET /v1/lmif/licenses/{id}
const license = await lmif.licenses.get('lic_abc123');
{
"data": {
"id": "lic_abc123",
"boxId": "box_xyz789",
"identityName": "Taylor Swift",
"tier": "commercial",
"status": "active",
"monthlyFee": 500,
"currency": "USD",
"royaltyRate": 0.10,
"validFrom": "2024-01-01T00:00:00Z",
"expiresAt": "2025-01-01T00:00:00Z",
"autoRenew": true,
"terms": {
"maxUsers": 50000,
"contentGuidelines": "https://...",
"nsfw": false,
"exclusivity": false,
"territory": "worldwide"
},
"usage": {
"currentPeriod": "2024-01",
"subscribers": 5000,
"messages": 250000,
"revenue": 25000,
"royaltyDue": 2500
}
}
}

Request a new license for a protected identity.

POST /v1/lmif/licenses/request
const request = await lmif.licenses.request({
boxId: 'box_xyz789',
tier: 'commercial',
useCase: 'AI companion platform',
estimatedUsers: 10000,
acceptGuidelines: true
});
FieldTypeRequiredDescription
boxIdstringYesID of the protected box
tierstringYespersonal, creator, commercial, enterprise
useCasestringYesDescription of intended use
estimatedUsersintegerNoEstimated user count
acceptGuidelinesbooleanYesAccept content guidelines
messagestringNoMessage to identity owner
{
"data": {
"id": "req_new456",
"boxId": "box_xyz789",
"status": "pending",
"tier": "commercial",
"submittedAt": "2024-01-15T10:00:00Z",
"estimatedReviewTime": "48-72 hours",
"pricing": {
"monthlyFee": 500,
"royaltyRate": 0.10,
"currency": "USD"
}
}
}

Check the status of a license request.

GET /v1/lmif/licenses/request/{id}
const status = await lmif.licenses.getRequestStatus('req_new456');
{
"data": {
"id": "req_new456",
"status": "pending",
"submittedAt": "2024-01-15T10:00:00Z"
}
}
{
"data": {
"id": "req_new456",
"status": "approved",
"license": {
"id": "lic_abc123",
"tier": "commercial",
"monthlyFee": 500,
"validFrom": "2024-01-17T00:00:00Z",
"expiresAt": "2025-01-17T00:00:00Z"
}
}
}
{
"data": {
"id": "req_new456",
"status": "denied",
"reason": "Use case not aligned with brand guidelines",
"deniedAt": "2024-01-16T14:00:00Z"
}
}

Renew an existing license.

POST /v1/lmif/licenses/{id}/renew
const renewal = await lmif.licenses.renew('lic_abc123', {
term: 12, // months
tier: 'commercial' // can upgrade
});
{
"data": {
"id": "lic_abc123",
"status": "active",
"previousExpiry": "2025-01-17T00:00:00Z",
"newExpiry": "2026-01-17T00:00:00Z"
}
}

Cancel an active license.

DELETE /v1/lmif/licenses/{id}
await lmif.licenses.cancel('lic_abc123', {
reason: 'no_longer_needed',
effectiveDate: 'end_of_billing_period'
});

Report usage metrics for royalty calculation.

POST /v1/lmif/licenses/{id}/usage
await lmif.licenses.reportUsage('lic_abc123', {
period: '2024-01',
metrics: {
subscribers: 5000,
messages: 250000,
tips: 15000,
adImpressions: 1000000
},
revenue: {
subscriptions: 25000,
messages: 5000,
tips: 15000,
ads: 2000
}
});
FieldTypeRequiredDescription
periodstringYesReporting period (YYYY-MM)
metricsobjectYesUsage metrics
revenueobjectYesRevenue by type
{
"data": {
"licenseId": "lic_abc123",
"period": "2024-01",
"totalRevenue": 47000,
"royaltyRate": 0.10,
"royaltyDue": 4700,
"paymentStatus": "pending",
"dueDate": "2024-02-15T00:00:00Z"
}
}
StatusDescription
pendingRequest under review
activeLicense in effect
expiredLicense term ended
revokedRevoked by identity owner
cancelledCancelled by platform