Operations

Q: What is SketchAPI?

A: SketchAPI is the hosted developer platform and asynchronous drawing API for embedding Sketchpad. It covers runtime readiness, events, documents, layers, selection, tools, brushes, media, open, save, and optional hosted file workflows.


Q: Does the browser client require an account or API key?

A: Your server uses a project API key to create a short-lived session. The browser receives only that session and never receives the API key. Projects, allowed origins, and keys are managed through the dashboard.


Q: How do I activate a plan?

A: Pick a tier on the pricing page. Developer starts free instantly, Business and Scale activate through checkout on your Sketchpad account, and Commercial is scoped with the team. Every tier includes the SketchAPI subscription that project and key management requires.


Q: Do I install the full editor from npm?

A: No. Load the versioned browser client from SketchAPI.com. SketchAPI hosts the editor runtime inside an isolated frame and does not distribute the private codebase to customer applications.


Q: Does SketchAPI save files?

A: A mounted frame may expose sketchpad.files, a browser-backed native document library. It is not account storage, cloud sync, or sharing. Use the open/save API to connect portable artwork to storage owned by your application.


Q: How is Sketchpad different from SketchAPI?

A: Sketchpad is the drawing product running in the hosted frame. SketchAPI is the developer platform and the API object owned by each mounted Sketchpad instance.


Q: Can more than one editor run on a page?

A: Yes. Create a separate session and Sketchpad for each host element. Each instance owns its API, documents, input, renderer, UI, listeners, and teardown.


Q: How do I clean up an editor?

A: Keep the Sketchpad instance and call destroy() when its host view is removed. Abort an in-progress mount with the signal passed to mount().


Q: Where are the current contracts?

A: Use the generated browser API reference and the service API reference. They are generated from canonical implementation contracts rather than handwritten signature tables.


Q: Which browsers does SketchAPI support?

A: The v1 release gate mounts and draws through real pointer input in the current Playwright Chromium, Firefox, and WebKit desktop engines. WebGL is the compatibility baseline; WebGPU is optional. Android Chrome and iOS Safari emulation exercise native touch input and mobile layout, while hardware mobile certification remains a separate release requirement.


Q: How do TypeScript projects pin the hosted browser contract?

A: Download the declaration served beside the v1 browser client and keep it under source control with your integration:

curl --fail https://sketchapi.com/sdk/v1/sketchapi.d.ts 	--output types/sketchapi-v1.d.ts

Map the exact browser URL to that file in tsconfig.json:

{
	"compilerOptions": {
		"paths": {
			"https://sketchapi.com/sdk/v1/sketchapi.js": ["./types/sketchapi-v1.d.ts"]
		}
	}
}

The browser still loads the hosted URL. TypeScript uses the pinned local file for editor and build-time checks. Refresh both intentionally when adopting a new hosted contract revision.