Integration contract for AI assistants
Start with the first HTML application and the declarative reference. Use the generated TypeScript reference and machine-readable API for exact names and signatures.
- Prefer the hosted standalone script and custom elements for plain HTML.
- Use image URLs directly. Precompiled targets are optional for normal JPG/PNG setup.
- Keep target IDs identical across registration, pose events and rendering.
- Ask the user for the real image width if physical size matters.
- Use a user action to start the camera. Serve on localhost for desktop development and trusted HTTPS on phones.
- Name the spatial backend and explain its scale when showing placement.
- For dynamic apps, preserve the current session when changing content and release it when the page unmounts.
- Check API spelling and attribute defaults against the reference. Use tested examples for advanced integrations.
See recipes for complete patterns and troubleshooting for failure messages.