Skip to content

Identity Check API

The Identity Check API is the core integration point for platforms. Use it before allowing users to create AI avatars.

Check if a name and image match a protected identity.

POST /v1/lmif/identity/check
const result = await lmif.identity.check({
name: "Taylor Swift",
imageUrl: "https://example.com/avatar.jpg"
});
FieldTypeRequiredDescription
namestringYesName of the identity to check
imageUrlstringYesURL of the avatar image
descriptionstringNoAvatar description (improves detection)
contextstringNoAdditional context (platform, use case)
{
"isBoxed": true,
"isClaimed": true,
"confidence": 0.95,
"matchedIdentity": {
"claimId": "claim_xyz789",
"boxId": "box_abc123",
"name": "Taylor Swift",
"variations": ["T. Swift", "Taylor Alison Swift"],
"entityType": "INDIVIDUAL",
"verificationTier": "GOLD"
},
"policy": "MONETIZE",
"policyDetails": {
"royaltyRate": 0.10,
"revenueTypes": ["subscription", "per_message", "tips"],
"contentGuidelines": "https://..."
},
"detection": {
"layer": 1,
"classification": "EXACT_MATCH",
"parodyLikelihood": 0.02
},
"action": "TRACK_REVENUE"
}
FieldTypeDescription
isBoxedbooleanWhether the identity is protected
isClaimedbooleanWhether the identity is claimed (verified)
confidencenumberDetection confidence (0-1)
matchedIdentityobjectDetails of the matched identity
policystringProtection policy if boxed
policyDetailsobjectPolicy-specific configuration
detectionobjectDetection system details
actionstringRecommended action for platform
ActionMeaningWhat to Do
ALLOWNo protectionProceed normally
BLOCKIdentity blockedPrevent avatar creation
REQUIRE_LICENSELicense requiredRedirect to licensing flow
TRACK_REVENUERevenue share requiredCreate avatar, enable tracking
VERIFY_COMMERCIALCheck commercial statusAsk user about commercial intent
REVIEW_PARODYPossible parodyAllow with parody disclaimer

Check multiple identities in a single request.

POST /v1/lmif/identity/check/batch
const results = await lmif.identity.checkBatch([
{ name: "Celebrity A", imageUrl: "https://..." },
{ name: "Celebrity B", imageUrl: "https://..." },
{ name: "Celebrity C", imageUrl: "https://..." }
]);
FieldTypeRequiredDescription
identitiesarrayYesArray of identity objects
identities[].namestringYesName to check
identities[].imageUrlstringYesImage URL
identities[].idstringNoYour internal ID (returned in response)
{
"results": [
{
"id": "your_internal_id_1",
"name": "Celebrity A",
"isBoxed": true,
"policy": "BLOCK_ALL",
"action": "BLOCK"
},
{
"id": "your_internal_id_2",
"name": "Celebrity B",
"isBoxed": false,
"action": "ALLOW"
},
{
"id": "your_internal_id_3",
"name": "Celebrity C",
"isBoxed": true,
"policy": "MONETIZE",
"royaltyRate": 0.15,
"action": "TRACK_REVENUE"
}
],
"meta": {
"total": 3,
"boxed": 2,
"unprotected": 1,
"processingTime": 245
}
}
async function checkBeforeCreating(name: string, imageUrl: string) {
const result = await lmif.identity.check({ name, imageUrl });
switch (result.action) {
case 'ALLOW':
return { allowed: true };
case 'BLOCK':
return {
allowed: false,
message: 'This identity is protected and cannot be used'
};
case 'REQUIRE_LICENSE':
return {
allowed: false,
requiresLicense: true,
licenseUrl: `/license/${result.matchedIdentity.boxId}`
};
case 'TRACK_REVENUE':
return {
allowed: true,
tracking: {
boxId: result.matchedIdentity.boxId,
royaltyRate: result.policyDetails.royaltyRate
}
};
case 'VERIFY_COMMERCIAL':
return {
allowed: 'pending',
question: 'Will this avatar be used for commercial purposes?'
};
default:
return { allowed: false };
}
}
async function safeIdentityCheck(name: string, imageUrl: string) {
try {
const result = await lmif.identity.check({ name, imageUrl });
return result;
} catch (error) {
if (error.code === 'RATE_LIMITED') {
// Wait and retry
await sleep(error.retryAfter * 1000);
return safeIdentityCheck(name, imageUrl);
}
if (error.code === 'VALIDATION_ERROR') {
// Log and fail gracefully
console.error('Invalid request:', error.details);
return { action: 'ALLOW' }; // Fail open
}
// Unknown error - fail closed
console.error('Identity check failed:', error);
return { action: 'BLOCK', reason: 'Service unavailable' };
}
}
  1. Check before creation - Always check identity before allowing avatar creation
  2. Cache appropriately - Results can be cached for up to 1 hour
  3. Handle all actions - Implement handlers for all possible actions
  4. Include context - Providing description and context improves detection
  5. Use batch for imports - When importing existing avatars, use batch API
  6. Implement retry logic - Handle rate limits gracefully
CodeDescription
INVALID_IMAGE_URLImage URL is invalid or inaccessible
IMAGE_TOO_LARGEImage exceeds size limit (10MB)
INVALID_NAMEName is empty or invalid
BATCH_TOO_LARGEBatch exceeds 100 identities