AK
Developer playground

SDK Playground

Same Scene Graph. Same Timeline. Six adapters. Pick a framework and see how SceneWeave integrates.

dartsceneweave
final editor = SceneWeaveEditor(
  projectId: "proj_coffee_ad_001",
  sceneGraph: sceneGraphJson,
  adapter: SceneWeaveBridgeAdapter.iframe,
);

editor.onTimelineChanged((timeline) {
  saveTimeline(timeline);
});

editor.onExportCompleted((exportResult) {
  showDownload(exportResult.url);
});

Live response

SDK initializedok
Scene Graph parsedok
Timeline generatedok
Preview readyok
Export endpoint availableok
Selected adapter: flutter

API contract

initializeEditor()
input{ projectId, sceneGraph?, timeline?, adapter }
outputEditorHandle
emitssdk.ready
loadSceneGraph()
inputSceneGraph
outputTimeline
emitssceneGraph.loaded
loadTimeline()
inputTimeline
outputTimeline
emitstimeline.created
updateTimeline()
inputTimeline
outputTimeline
emitstimeline.updated
selectClip()
input{ clipId }
outputClipSelection
emitstimeline.clipSelected
generateVoice()
input{ text, voice }
outputVoiceAsset
emitsvoice.generated
regenerateShot()
input{ shotId, prompt, preserve[] }
outputShotVersion
emitsshot.regenerated
startExport()
inputExportOptions
outputExportJob
emitsexport.started
subscribeToEvents()
input(event) => void
outputUnsubscribe
emits*
configureAIProvider()
input{ provider, proxyEndpoint }
outputProviderConfig
emitssdk.ready
configureRenderBackend()
input{ queueEndpoint, webhookUrl }
outputRenderBackendConfig
emitsexport.rendering
handleError()
inputErrorPayload
outputvoid
emitserror

Shared contract samples

Importable JSON fixtures validated by the SDK contract helpers.

Scene Graph JSONjson
{
  "contractVersion": "2026-05-21",
  "projectId": "proj_coffee_ad_001",
  "projectName": "Coffee Brand Ad",
  "sceneId": "scene_01",
  "shotId": "shot_01_A",
  "duration": 5,
  "fps": 24,
  "resolution": {
    "width": 1920,
    "height": 1080
  },
  "video": {
    "assetId": "asset_video_001",
    "url": "/mock/coffee-ad-shot.mp4",
    "prompt": "A young professional taking the first sip of coffee at sunrise"
  },
  "dialogue": {
    "character": "Narrator",
    "text": "Start your morning with clarity.",
    "emotion": "warm",
    "language": "English",
    "accent": "Neutral English"
  },
  "subtitle": {
    "text": "Start your morning with clarity.",
    "style": "cinematic_bottom"
  },
  "brand": {
    "name": "BeanCraft Coffee",
    "placement": "coffee cup visible in foreground"
  }
}
Timeline JSONjson
{
  "contractVersion": "2026-05-21",
  "timelineId": "tl_coffee_ad_001",
  "projectId": "proj_coffee_ad_001",
  "sceneId": "scene_01",
  "duration": 5,
  "tracks": [
    {
      "id": "track_video",
      "type": "video",
      "clips": [
        {
          "id": "video-1",
          "assetId": "asset_video_001",
          "start": 0,
          "end": 5
        }
      ]
    },
    {
      "id": "track_voice",
      "type": "audio",
      "clips": [
        {
          "id": "voice-1",
          "assetId": "voice_001",
          "start": 0.4,
          "end": 4.6,
          "source": "tts"
        }
      ]
    },
    {
      "id": "track_subtitle",
      "type": "subtitle",
      "clips": [
        {
          "id": "subtitle-1",
          "text": "Start your morning with clarity.",
          "start": 0.5,
          "end": 4.6,
          "style": "cinematic_bottom"
        }
      ]
    }
  ]
}
Bridge Commandjson
{
  "contractVersion": "2026-05-21",
  "id": "cmd_001",
  "type": "sdk.command",
  "adapter": "postMessage",
  "name": "initializeEditor",
  "payload": {
    "projectId": "proj_coffee_ad_001",
    "sceneGraphUrl": "/api/projects/proj_coffee_ad_001/scene-graph",
    "timelineUrl": "/api/projects/proj_coffee_ad_001/timeline",
    "aiProvider": {
      "provider": "example-ai",
      "proxyEndpoint": "/api/sceneweave/ai"
    },
    "renderBackend": {
      "queueEndpoint": "/api/sceneweave/render-jobs"
    }
  },
  "replyTo": "https://app.beancraft.coffee"
}
SDK Eventjson
{
  "contractVersion": "2026-05-21",
  "id": "evt_001",
  "name": "timeline.created",
  "ts": "2026-05-21T09:00:00.305Z",
  "payload": {
    "projectId": "proj_coffee_ad_001",
    "timelineId": "tl_coffee_ad_001",
    "tracks": 3,
    "duration": 5
  }
}
AI Requestjson
{
  "contractVersion": "2026-05-21",
  "requestId": "ai_req_001",
  "projectId": "proj_coffee_ad_001",
  "sceneId": "scene_01",
  "action": "regenerate",
  "prompt": "Make the lighting warmer while preserving the same character and coffee cup.",
  "preserve": [
    "character",
    "brand",
    "duration",
    "subtitleTiming"
  ],
  "inputs": {
    "shotId": "shot_01_A",
    "timelineId": "tl_coffee_ad_001"
  }
}
AI Responsejson
{
  "contractVersion": "2026-05-21",
  "requestId": "ai_req_001",
  "status": "succeeded",
  "assets": [
    {
      "assetId": "asset_video_001_v3",
      "type": "video",
      "url": "/mock/coffee-ad-shot-v3.mp4",
      "duration": 5
    }
  ]
}
Export Jobjson
{
  "contractVersion": "2026-05-21",
  "id": "exp_9F2A",
  "projectId": "proj_coffee_ad_001",
  "project": "Coffee Brand Ad",
  "status": "Completed",
  "resolution": "1080p",
  "started": "2026-05-21T09:02:00.000Z",
  "duration": "00:00:12",
  "output": "coffee-ad-v3.mp4",
  "lifecycle": [
    "queued",
    "manifest.created",
    "assets.fetched",
    "audio.mixed",
    "encoded",
    "uploaded"
  ]
}
Error Payloadjson
{
  "contractVersion": "2026-05-21",
  "code": "TIMELINE_SUBTITLE_OVERRUN",
  "message": "Subtitle timing overrun detected.",
  "severity": "warning",
  "retryable": true,
  "details": {
    "clipId": "subtitle-1",
    "voiceClipId": "voice-1",
    "delta": "0.3s"
  }
}