{"_id":"@actorhubai/sdk","_rev":"3-4d665f56fa607d2c3a3e9324622b3ef3","name":"@actorhubai/sdk","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@actorhubai/sdk","version":"0.1.0","keywords":["actorhub","ai","deepfake","identity","verification","consent","face-recognition","api","sdk"],"author":{"name":"ActorHub.ai","email":"actorhub.ai@gmail.com"},"license":"MIT","_id":"@actorhubai/sdk@0.1.0","maintainers":[{"name":"actorhub.ai","email":"actorhub.ai@gmail.com"}],"homepage":"https://actorhub.ai","bugs":{"url":"https://github.com/actorhub/actorhub-sdk-js/issues"},"dist":{"shasum":"97e8dc072253a8c1a630dbb5c1d56378d1ffec44","tarball":"https://registry.npmjs.org/@actorhubai/sdk/-/sdk-0.1.0.tgz","fileCount":7,"integrity":"sha512-awY5xfMZnp9fz7lgktRYC+JNX8T7dFjImV5iP7u1294F88gHtzWFEwz6Fv5k7lg349KA88u+TPwsRg/j8Ck+NA==","signatures":[{"sig":"MEUCIQDyYGfNnhCaODtQqga/poUxvNpNavW/bhTYo7YZLwmi1gIgMqIcNKMN8fP9WN1BlWUjmD1pO3WXtYsSy7gvZ/W6eQM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59610},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=16.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"f82fa486af67df1e2f4e795c21c25f1e16b402b4","scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts --format cjs,esm --dts --clean","test:run":"vitest run","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"actorhub.ai","email":"actorhub.ai@gmail.com"},"repository":{"url":"git+https://github.com/actorhub/actorhub-sdk-js.git","type":"git"},"_npmVersion":"10.9.3","description":"Official JavaScript/TypeScript SDK for ActorHub.ai - Verify AI-generated content against protected identities","directories":{},"_nodeVersion":"22.19.0","dependencies":{"cross-fetch":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.0.0","tsup":"^8.0.0","eslint":"^8.0.0","vitest":"^1.0.0","typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.0_1768744239091_0.07636126173788926","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@actorhubai/sdk","version":"0.2.0","keywords":["actorhub","ai","deepfake","identity","verification","consent","face-recognition","api","sdk"],"author":{"name":"ActorHub.ai","email":"actorhub.ai@gmail.com"},"license":"MIT","_id":"@actorhubai/sdk@0.2.0","maintainers":[{"name":"actorhub.ai","email":"actorhub.ai@gmail.com"}],"homepage":"https://actorhub.ai","bugs":{"url":"https://github.com/actorhub/actorhub-sdk-js/issues"},"dist":{"shasum":"370bf79e7f2139c4162722c2256fedab713e1c76","tarball":"https://registry.npmjs.org/@actorhubai/sdk/-/sdk-0.2.0.tgz","fileCount":7,"integrity":"sha512-rxru04R1uxuUqxiJeNrQ9lMgQ6dTeHiiJj+7tdeDNoOuvrue0qPJuxd/xRXjHZmWxcVhmkh2jy1QiK6YkYarfQ==","signatures":[{"sig":"MEUCIAXIS0VpJ07lRL+Bk78cKmTAH5ULqyqVPUT+HD9SVNnQAiEAmNHsMvXXfkTnwmNQaZq96hExyos4vvAL4TQhN8xpHxo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":60824},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=16.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts --format cjs,esm --dts --clean","test:run":"vitest run","typecheck":"tsc --noEmit"},"_npmUser":{"name":"actorhub.ai","email":"actorhub.ai@gmail.com"},"repository":{"url":"git+https://github.com/actorhub/actorhub-sdk-js.git","type":"git"},"_npmVersion":"10.9.3","description":"Official JavaScript/TypeScript SDK for ActorHub.ai - Verify AI-generated content against protected identities","directories":{},"_nodeVersion":"22.19.0","dependencies":{"cross-fetch":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.0.0","tsup":"^8.0.0","eslint":"^8.0.0","vitest":"^1.0.0","typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.0_1775689661712_0.9003796361380283","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"_id":"@actorhubai/sdk@0.2.1","bugs":{"url":"https://github.com/actorhub/actorhub-sdk-js/issues"},"dist":{"shasum":"ca9fd0f0efa333c119d1486f728d8ae52bf95666","tarball":"https://registry.npmjs.org/@actorhubai/sdk/-/sdk-0.2.1.tgz","fileCount":7,"integrity":"sha512-WYtzpM2zG5id0X0dbDW8wzwMI5xGHx2ThYNnTvZCzbNF28COWWoA3AHCj4t2otxuV9hQAGdmjS8isqsthOOAKg==","signatures":[{"sig":"MEYCIQC55Y1bd5ryx4kbFClGbhKuhXIhbXY6YDSFENFKq4sRPQIhAIJyDAQCTs6ei6QRB3KK8ByjDJfpDpVvmfLj+HzgaNZq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICGWXdtnXWNzq4i5VZale3HDQKbMQ25huDFuj50mcbeTAiEAiEYcGvP9dXkaeEFMr1125c6KniBisEp8m2RNHK4C9aY="}],"unpackedSize":61340},"main":"dist/index.js","name":"@actorhubai/sdk","types":"dist/index.d.ts","author":{"name":"ActorHub.ai","email":"actorhub.ai@gmail.com"},"module":"dist/index.mjs","engines":{"node":">=16.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"license":"MIT","scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","lint":"eslint src --ext .ts","test":"vitest","build":"tsup src/index.ts --format cjs,esm --dts --clean","test:run":"vitest run","typecheck":"tsc --noEmit"},"version":"0.2.1","_npmUser":{"name":"actorhub.ai","email":"actorhub.ai@gmail.com"},"homepage":"https://actorhub.ai","keywords":["actorhub","licensing","likeness","talent","consent","identity","verification","face-recognition","ai"],"repository":{"url":"git+https://github.com/actorhub/actorhub-sdk-js.git","type":"git"},"_npmVersion":"10.9.3","description":"Client for the ActorHub.ai consent API: check whether a face belongs to a verified person, and what they consented to, before anything is generated. ActorHub.ai licenses verified people as AI talent.","directories":{},"maintainers":[{"name":"actorhub.ai","email":"actorhub.ai@gmail.com"}],"_nodeVersion":"22.19.0","dependencies":{"cross-fetch":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.0.0","tsup":"^8.0.0","eslint":"^8.0.0","vitest":"^1.0.0","typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.2.1_1790056269695_0.7012497083959022"}}},"time":{"created":"2026-01-18T13:50:38.996Z","modified":"2026-09-22T05:51:09.935Z","0.1.0":"2026-01-18T13:50:39.249Z","0.2.0":"2026-04-08T23:07:41.883Z","0.2.1":"2026-09-22T05:51:09.784Z"},"bugs":{"url":"https://github.com/actorhub/actorhub-sdk-js/issues"},"author":{"name":"ActorHub.ai","email":"actorhub.ai@gmail.com"},"license":"MIT","homepage":"https://actorhub.ai","keywords":["actorhub","licensing","likeness","talent","consent","identity","verification","face-recognition","ai"],"repository":{"url":"git+https://github.com/actorhub/actorhub-sdk-js.git","type":"git"},"description":"Client for the ActorHub.ai consent API: check whether a face belongs to a verified person, and what they consented to, before anything is generated. ActorHub.ai licenses verified people as AI talent.","maintainers":[{"name":"actorhub.ai","email":"actorhub.ai@gmail.com"}],"readme":"# ActorHub JavaScript/TypeScript SDK\n\nOfficial JavaScript/TypeScript client for the [ActorHub.ai](https://actorhub.ai) consent API.\n\nActorHub.ai is where real people become licensed AI talent: they verify who they are, set\nthe terms their likeness may be used on, and brands license a verified person for a\ncampaign. This SDK is the check that makes such a licence meaningful — given an image, it\nanswers whether the face belongs to a verified person and what that person agreed to,\nbefore anything is generated.\n\n## Installation\n\n```bash\nnpm install @actorhubai/sdk\n# or\nyarn add @actorhubai/sdk\n# or\npnpm add @actorhubai/sdk\n```\n\n## Quick Start\n\n```typescript\nimport { ActorHub } from '@actorhubai/sdk';\n\n// Initialize the client\nconst client = new ActorHub({ apiKey: 'your-api-key' });\n\n// Check whether the face in an image belongs to a verified person\nconst result = await client.verify({\n  imageUrl: 'https://example.com/image.jpg'\n});\n\nif (result.protected) {\n  console.log('Verified person found: check their consent before generating.');\n  for (const identity of result.identities) {\n    console.log(`  - ${identity.displayName} (similarity: ${identity.similarityScore})`);\n  }\n}\n```\n\n## Features\n\n- **TypeScript First**: Full type definitions included\n- **Universal**: Works in Node.js and browsers\n- **Identity Verification**: Check whether a face belongs to a verified person\n- **Consent Checking**: Verify consent before AI generation\n- **Marketplace Access**: Browse and license identities\n- **Automatic Retries**: Built-in retry logic with exponential backoff\n- **Error Handling**: Typed error classes for easy handling\n\n## Usage Examples\n\n### Verify Image\n\n```typescript\nimport { ActorHub } from '@actorhubai/sdk';\n\nconst client = new ActorHub({ apiKey: 'your-api-key' });\n\n// From URL\nconst result = await client.verify({\n  imageUrl: 'https://example.com/image.jpg'\n});\n\n// From base64\nconst result = await client.verify({\n  imageBase64: 'base64-encoded-data...'\n});\n\nconsole.log(`Protected: ${result.protected}`);\nconsole.log(`Faces detected: ${result.facesDetected}`);\n```\n\n### Check Consent (for AI Platforms)\n\n```typescript\nconst result = await client.checkConsent({\n  imageUrl: 'https://example.com/face.jpg',\n  platform: 'runway',\n  intendedUse: 'video',\n  region: 'US'\n});\n\nif (result.protected) {\n  for (const face of result.faces) {\n    console.log(`Consent for video: ${face.consent.videoGeneration}`);\n    console.log(`License available: ${face.license.available}`);\n  }\n}\n```\n\n### Browse Marketplace\n\n```typescript\n// Search listings\nconst listings = await client.listMarketplace({\n  query: 'actor',\n  category: 'ACTOR',\n  sortBy: 'popular',\n  limit: 10\n});\n\nfor (const listing of listings) {\n  console.log(`${listing.title} - $${listing.basePriceUsd}`);\n}\n```\n\n### Purchase License\n\n```typescript\nimport { LicenseType, UsageType } from '@actorhubai/sdk';\n\nconst purchase = await client.purchaseLicense({\n  identityId: 'uuid-here',\n  licenseType: LicenseType.STANDARD,\n  usageType: UsageType.COMMERCIAL,\n  projectName: 'My AI Project',\n  projectDescription: 'Creating promotional content',\n  durationDays: 30,\n});\n\n// Redirect user to Stripe checkout\nconsole.log(`Checkout URL: ${purchase.checkoutUrl}`);\n```\n\n### Get My Licenses\n\n```typescript\nconst licenses = await client.getMyLicenses({ status: 'active' });\n\nfor (const license of licenses) {\n  console.log(`${license.identityName} - ${license.licenseType} - Expires: ${license.expiresAt}`);\n}\n```\n\n## Error Handling\n\n```typescript\nimport {\n  ActorHub,\n  AuthenticationError,\n  RateLimitError,\n  ValidationError,\n  NotFoundError,\n} from '@actorhubai/sdk';\n\nconst client = new ActorHub({ apiKey: 'your-api-key' });\n\ntry {\n  const result = await client.verify({\n    imageUrl: 'https://example.com/image.jpg'\n  });\n} catch (error) {\n  if (error instanceof AuthenticationError) {\n    console.error('Invalid API key');\n  } else if (error instanceof RateLimitError) {\n    console.error(`Rate limit exceeded. Retry after: ${error.retryAfter} seconds`);\n  } else if (error instanceof ValidationError) {\n    console.error(`Validation error: ${error.message}`);\n  } else if (error instanceof NotFoundError) {\n    console.error('Resource not found');\n  }\n}\n```\n\n## Configuration\n\n```typescript\nconst client = new ActorHub({\n  apiKey: 'your-api-key',\n  baseUrl: 'https://api.actorhub.ai',  // Custom base URL\n  timeout: 30000,                       // Request timeout in ms\n  maxRetries: 3,                        // Max retry attempts\n});\n```\n\n## API Reference\n\n### ActorHub Client\n\n| Method | Description |\n|--------|-------------|\n| `verify()` | Check whether an image shows a verified person |\n| `getIdentity()` | Get identity details by ID |\n| `checkConsent()` | Check consent status for AI generation |\n| `listMarketplace()` | Search marketplace listings |\n| `getMyLicenses()` | Get user's purchased licenses |\n| `purchaseLicense()` | Purchase a license |\n| `getActorPack()` | Get Actor Pack status |\n\n## Browser Usage\n\nThe SDK works in browsers with native `fetch`:\n\n```html\n<script type=\"module\">\n  import { ActorHub } from 'https://esm.sh/@actorhubai/sdk';\n\n  const client = new ActorHub({ apiKey: 'your-api-key' });\n  const result = await client.verify({ imageUrl: '...' });\n</script>\n```\n\n## Requirements\n\n- Node.js 16+ (for Node.js usage)\n- Modern browser with ES2020 support\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n## Links\n\n- [Documentation](https://docs.actorhub.ai)\n- [API Reference](https://api.actorhub.ai/docs)\n- [GitHub](https://github.com/actorhub/actorhub-sdk-js)\n- [npm](https://www.npmjs.com/package/@actorhubai/sdk)\n","readmeFilename":"README.md"}