Extension API Endpoints
Complete reference for extension REST endpoints
Extension API Endpoints
This document provides detailed reference for all Chrome extension API endpoints, including request/response formats and examples.
Base URL
All endpoints are relative to your Lazer instance:
https://lazer.yourdomain.com/api/extension
Authentication
All endpoints require Bearer token authentication:
Authorization: Bearer lzr_your_token_here
See Authentication for details.
GET /api/extension/projects
List all projects for the authenticated user.
Request
GET /api/extension/projects HTTP/1.1
Host: lazer.yourdomain.com
Authorization: Bearer lzr_abc123...
Response
{
"projects": [
{
"id": "proj_abc123",
"name": "Feature Film - The Awakening",
"status": "DEVELOPMENT",
"genre": "Sci-Fi",
"updatedAt": "2026-02-14T10:30:00Z",
"sceneCount": 42
},
{
"id": "proj_def456",
"name": "Commercial - Tech Product",
"status": "PRODUCTION",
"genre": "Commercial",
"updatedAt": "2026-02-13T15:20:00Z",
"sceneCount": 8
}
]
}
Fields
id(string) - Unique project identifiername(string) - Project namestatus(string) - Project status: DEVELOPMENT, PRE_PRODUCTION, PRODUCTION, POST_PRODUCTION, COMPLETED, ARCHIVEDgenre(string) - Project genre (nullable)updatedAt(string) - ISO 8601 timestamp of last updatesceneCount(number) - Total number of scenes in project
Status Codes
200- Success401- Unauthorized (invalid or expired token)
GET /api/extension/scenes
List all scenes for a specific project.
Request
GET /api/extension/scenes?projectId=proj_abc123 HTTP/1.1
Host: lazer.yourdomain.com
Authorization: Bearer lzr_abc123...
Query Parameters
projectId(string, required) - Project ID to fetch scenes for
Response
{
"scenes": [
{
"id": "scene_001",
"sceneId": "001",
"storyBeat": "INT. SPACESHIP BRIDGE - DAY\n\nCommander watches the stars...",
"act": 1,
"macroScene": "Opening sequence"
},
{
"id": "scene_002",
"sceneId": "002",
"storyBeat": "EXT. ALIEN PLANET - CONTINUOUS\n\nThe crew explores...",
"act": 1,
"macroScene": "Discovery"
}
]
}
Fields
id(string) - Unique scene database identifiersceneId(string) - Scene number (e.g., "001", "002A")storyBeat(string) - Scene description/action (nullable)act(number) - Act number (nullable)macroScene(string) - Macro scene/sequence name (nullable)
Status Codes
200- Success400- Bad Request (missing projectId)401- Unauthorized404- Project not found or not owned by user
GET /api/extension/scene-assets
List asset versions for a specific scene.
Request
GET /api/extension/scene-assets?projectId=proj_abc123&sceneId=001&assetType=VIDEO&limit=30 HTTP/1.1
Host: lazer.yourdomain.com
Authorization: Bearer lzr_abc123...
Query Parameters
projectId(string, required) - Project IDsceneId(string, required) - Scene ID (e.g., "001")assetType(string, optional) - Filter by asset type: IMAGE, VIDEO, AUDIO, MUSIC, VOICE, NARRATION, STORYBOARD, OTHERlimit(number, optional) - Max results (default: 30, max: 100)
Response
{
"scene": {
"id": "scene_001",
"sceneId": "001",
"storyBeat": "INT. SPACESHIP BRIDGE - DAY..."
},
"assets": [
{
"id": "asset_xyz789",
"assetType": "VIDEO",
"platformKey": "openai-sora",
"prompt": "A futuristic spaceship bridge with holographic displays",
"outputUrl": "https://cdn.sora.com/video123.mp4",
"thumbnailUrl": "https://cdn.sora.com/thumb123.jpg",
"status": "GENERATED",
"versionNumber": 3,
"createdAt": "2026-02-14T12:00:00.000Z"
}
]
}
Fields
Scene Object
id(string) - Scene database IDsceneId(string) - Scene numberstoryBeat(string) - Scene description
Asset Object
id(string) - Asset version IDassetType(string) - Asset typeplatformKey(string) - Platform slugprompt(string) - Generation promptoutputUrl(string) - Media file URLthumbnailUrl(string) - Thumbnail URL (nullable)status(string) - DRAFT, GENERATED, SELECTED, APPROVED, FINALversionNumber(number) - Version number within scene/type/platformcreatedAt(string) - ISO 8601 timestamp
Status Codes
200- Success400- Bad Request (missing required params)401- Unauthorized404- Project or scene not found
GET /api/extension/platforms
List all available AI platforms.
Request
GET /api/extension/platforms HTTP/1.1
Host: lazer.yourdomain.com
Authorization: Bearer lzr_abc123...
Response
{
"platforms": [
{
"id": "platform_001",
"slug": "openai-sora",
"name": "OpenAI Sora",
"provider": "OpenAI",
"specialties": ["video", "image"],
"supportedOutput": ["VIDEO", "IMAGE"],
"homepageUrl": "https://sora.com",
"docsUrl": "https://platform.openai.com/docs/sora"
},
{
"id": "platform_002",
"slug": "google-veo",
"name": "Google Gemini / Veo",
"provider": "Google",
"specialties": ["video", "image", "multi"],
"supportedOutput": ["VIDEO", "IMAGE"],
"homepageUrl": "https://gemini.google.com",
"docsUrl": "https://ai.google.dev/veo"
}
]
}
Fields
id(string) - Platform database IDslug(string) - Unique platform key (used in ingest)name(string) - Display nameprovider(string) - Company/organizationspecialties(array) - Tags like "video", "image", "audio", "music"supportedOutput(array) - Asset types: VIDEO, IMAGE, AUDIO, etc.homepageUrl(string) - Platform homepage (nullable)docsUrl(string) - Platform documentation (nullable)
Status Codes
200- Success401- Unauthorized
POST /api/extension/ingest
Create a new asset version from captured data.
Request
POST /api/extension/ingest HTTP/1.1
Host: lazer.yourdomain.com
Authorization: Bearer lzr_abc123...
Content-Type: application/json
{
"projectId": "proj_abc123",
"sceneId": "001",
"platformKey": "openai-sora",
"assetType": "VIDEO",
"prompt": "A futuristic spaceship bridge with holographic displays",
"outputUrl": "https://cdn.sora.com/video123.mp4",
"thumbnailUrl": "https://cdn.sora.com/thumb123.jpg",
"title": "Take 2 - Brighter lighting",
"sourceUrl": "https://sora.com/generate/abc123",
"modelName": "Sora Turbo",
"negativePrompt": "dark, gloomy",
"metadata": {
"duration": 5,
"aspectRatio": "16:9",
"seed": 42
},
"tags": ["hero", "approved"],
"status": "GENERATED",
"notes": "Client prefers this version",
"shotId": "shot_xyz789"
}
Request Body
Required Fields
projectId(string) - Project ID (must belong to authenticated user)sceneId(string) - Scene ID (e.g., "001")platformKey(string) - Platform slug (e.g., "openai-sora")assetType(string) - Asset type: IMAGE, VIDEO, AUDIO, MUSIC, VOICE, NARRATION, STORYBOARD, OTHERprompt(string) - Generation prompt (min 1 character)outputUrl(string, optional) - Media file URL (must be valid HTTP/HTTPS URL)
Optional Fields
platformId(string) - Platform database ID (alternative to platformKey)title(string) - Descriptive titlesourceUrl(string) - Platform page URL where generatedthumbnailUrl(string) - Thumbnail/preview URLmodelName(string) - AI model name/versionnegativePrompt(string) - Things to avoid in generationmetadata(object) - Structured JSON metadata (duration, aspectRatio, seed, etc.)tags(array) - Array of string tagsstatus(string) - DRAFT, GENERATED, SELECTED (default: DRAFT)notes(string) - Free-form notesshotId(string) - Shot ID if capturing to specific shotselected(boolean) - Mark as selected (overrides status)externalAssetId(string) - Platform's job/generation IDpromptPackageId(string) - Prompt package this was generated from (advanced)compareGroup(string) - Compare group identifier (advanced)rightsState(string) - Rights state: UNKNOWN, NON_COMMERCIAL, COMMERCIAL_ALLOWED, RESTRICTED (default: UNKNOWN)createPromptPackage(boolean) - Auto-create a prompt package from the capturepromptPackage(object) - Custom prompt package data (name, prompt, negativePrompt, constraints, targetAspectRatio, targetDurationSec, styleProfile, tags, metadata)provenance(object) - JSON provenance metadata (capture source, extension version)platformLabel(string) - Platform display nameparentVersionId(string) - Parent version for iteration chainscostEstimateUsd(number) - Estimated cost in USDgenerationSeconds(number) - Generation timequeueWaitSeconds(number) - Queue wait time
Response
{
"ok": true,
"asset": {
"id": "asset_xyz789",
"versionNumber": 3,
"platformKey": "openai-sora",
"platformLabel": "OpenAI Sora",
"assetType": "VIDEO",
"status": "GENERATED",
"rightsState": "UNKNOWN",
"shotId": "shot_xyz789",
"createdAt": "2026-02-14T12:00:00.000Z"
}
}
Status Codes
200- Success (asset created)400- Bad Request (validation error)401- Unauthorized404- Project, scene, or shot not found500- Internal server error
Validation Rules
promptmust be at least 1 characteroutputUrlmust be a valid HTTP/HTTPS URL (if provided)sceneIdis case-insensitive and auto-uppercasedplatformKeyis case-insensitive and auto-lowercasedassetTypemust match enum values exactlymetadatamust be valid JSON
GET /api/extension/profile
Get user profile and extension preferences.
Request
GET /api/extension/profile HTTP/1.1
Host: lazer.yourdomain.com
Authorization: Bearer lzr_abc123...
Response
{
"preferences": {
"lastActiveProjectId": "proj_abc123",
"lastActiveSceneId": "scene_001",
"defaultAssetType": "VIDEO",
"defaultStatus": "GENERATED",
"enabledPlatforms": ["openai-sora", "google-veo", "freepik-ai"],
"autoFillEnabled": true
}
}
Fields
lastActiveProjectId(string) - Last selected projectlastActiveSceneId(string) - Last selected scenedefaultAssetType(string) - Default asset typedefaultStatus(string) - Default statusenabledPlatforms(array) - Enabled platform keysautoFillEnabled(boolean) - Auto-fill on detection
Status Codes
200- Success401- Unauthorized
PUT /api/extension/profile
Update user preferences.
Request
PUT /api/extension/profile HTTP/1.1
Host: lazer.yourdomain.com
Authorization: Bearer lzr_abc123...
Content-Type: application/json
{
"preferences": {
"lastActiveProjectId": "proj_abc123",
"lastActiveSceneId": "scene_002",
"defaultAssetType": "IMAGE"
}
}
Request Body
preferences(object) - Partial preferences update (any fields from GET response)
Response
Same as GET /api/extension/profile (returns updated preferences).
Status Codes
200- Success400- Bad Request (invalid preferences)401- Unauthorized404- User not found
GET /api/extension/shots
List shots for a specific scene.
Request
GET /api/extension/shots?sceneDbId=scene_001 HTTP/1.1
Host: lazer.yourdomain.com
Authorization: Bearer lzr_abc123...
Query Parameters
sceneDbId(string, required) - Scene database ID
Response
{
"shots": [
{
"id": "shot_xyz789",
"shotCode": "001A",
"description": "Wide shot of spaceship bridge",
"sortOrder": 1
},
{
"id": "shot_abc123",
"shotCode": "001B",
"description": "Close-up of commander",
"sortOrder": 2
}
]
}
Fields
id(string) - Shot database IDshotCode(string) - Shot code/numberdescription(string) - Shot description (nullable)sortOrder(number) - Sort order within scene
Status Codes
200- Success400- Bad Request (missing sceneDbId)401- Unauthorized404- Scene not found
GET /api/extension/characters
List characters for a specific project.
Request
GET /api/extension/characters?projectId=proj_abc123 HTTP/1.1
Host: lazer.yourdomain.com
Authorization: Bearer lzr_abc123...
Query Parameters
projectId(string, required) - Project ID
Response
{
"characters": [
{
"id": "char_001",
"name": "Commander Sarah Chen",
"role": "Protagonist",
"description": "Starship commander with cybernetic enhancements"
},
{
"id": "char_002",
"name": "Lieutenant Marcus Reed",
"role": "Supporting",
"description": "First officer and tactical expert"
}
]
}
Status Codes
200- Success400- Bad Request (missing projectId)401- Unauthorized404- Project not found
PATCH /api/extension/asset-update
Update asset selection or compare group.
Request
PATCH /api/extension/asset-update HTTP/1.1
Host: lazer.yourdomain.com
Authorization: Bearer lzr_abc123...
Content-Type: application/json
{
"assetId": "asset_xyz789",
"selected": true,
"compareGroup": "batch-2026-02-14"
}
Request Body
assetId(string, required) - Asset version IDselected(boolean, optional) - Mark as selected/unselectedcompareGroup(string, optional) - Compare group identifier
Status Codes
200- Success400- Bad Request (validation error)401- Unauthorized404- Asset not found
Error Handling
All endpoints return errors in a consistent format:
{
"error": "Error message",
"details": { ... }
}
Common Errors
401 Unauthorized
{
"error": "Unauthorized"
}
400 Bad Request (validation)
{
"error": "Invalid payload",
"details": {
"fieldErrors": {
"prompt": ["Required"],
"outputUrl": ["Invalid URL"]
}
}
}
404 Not Found
{
"error": "Scene not found"
}