Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

1014 B
Raw Blame
export interface AvatarCreatorOptions {
	/** DOM node to mount the modal in. Defaults to document.body. */
	container?: HTMLElement;
	/** URL of the Avatar Studio iframe. Defaults to https://three.ws/avatar-studio/index.html. */
	studioUrl?: string;
	/** Avaturn session URL for edit mode (created via /api/avatars/:id/session). */
	avaturnSessionUrl?: string;
	/** Called with the GLB Blob when the user exports. */
	onExport?: (blob: Blob) => void | Promise<void>;
	/** Called when the user closes the modal without exporting. */
	onClose?: () => void;
}

export class AvatarCreator {
	constructor(opts?: AvatarCreatorOptions);
	open(): Promise<void>;
	close(): void;
	dispose(): void;
}

export interface SaveBlobOptions {
	bearerToken: string;
	apiOrigin?: string;
	name?: string;
	description?: string;
	tags?: string[];
	visibility?: 'public' | 'unlisted' | 'private';
	source?: string;
}

export function saveBlob(
	blob: Blob,
	opts: SaveBlobOptions,
): Promise<{ id: string; url: string; slug: string }>;