Vision model trained to test code changes from a diff
Glance is Morph’s vision model, trained specifically to test code changes. Give it a diff and a URL—it figures out what to test and returns video, screenshots, errors, and network logs.
Embed test recordings directly into your PRs, or use the SDK to integrate into your product—post results to your users’ PRs, Slack, Linear, or anywhere else.
import { MorphClient } from '@morphllm/morphsdk';const morph = new MorphClient({ apiKey: "YOUR_API_KEY" });const result = await morph.browser.execute({ url: "https://preview-abc.vercel.app", diff: prDiff, // Glance uses the diff to decide what to test task: "Test the changes in this PR", recordVideo: true});// What you get backconsole.log(result.success); // Agent's pass/fail assessmentconsole.log(result.result); // What it foundif (result.recordingId) { const recording = await morph.browser.getRecording(result.recordingId); console.log(recording.videoUrl); // Full video console.log(recording.networkUrl); // Network logs console.log(recording.consoleUrl); // Console/errors // Get embeddable WebP for PRs, Slack, etc. const { webpUrl } = await recording.getWebp({ maxSizeMb: 5 }); console.log(``); // Markdown-ready}