specs-internet

Implements HTTP requests, remote media downloads, and connectivity checks in Lens Studio using InternetModule.

16|2|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/lens-studio-devs/ls-extensions --skill specs-internet-lens-studio-devs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: specs-internet
Source: https://github.com/lens-studio-devs/ls-extensions/tree/main/plugins/ls-clad/skills/specs-internet
Command: npx skills add https://github.com/lens-studio-devs/ls-extensions --skill specs-internet-lens-studio-devs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building networked Spectacles lenses requires correct use of Lens Studio's InternetModule and RemoteMediaModule APIs, which have non-obvious constraints (protected Request constructors, unsupported body readers, preview limitations) that cause common implementation failures. ## Core Features & Use Cases - HTTP/HTTPS Requests: Make GET, POST, PUT, and DELETE calls via the Fetch API or the legacy performHttpRequest method, with JSON body handling and header configuration. - Remote Media Loading: Download images, video, audio, and glTF models from URLs and convert them into Textures, AudioTrackAssets, or instantiable GltfAssets. - Connectivity Handling: Check internet availability and react to status changes with DeviceInfoSystem to build offline-aware UX. - Use Case: Prototype an AI-powered lens by calling OpenAI, Gemini, Anthropic, or DeepSeek APIs directly via InternetModule.fetch using the included DirectAI TypeScript examples. ## Quick Start Ask the agent to write a Lens Studio component that fetches JSON from a REST API using InternetModule and handles the offline case.

Frequently Asked Questions about specs-internet

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make an HTTP request in Lens Studio?

Use InternetModule.fetch with a URL and init object containing the method, headers, and body. Acquire the module with require('LensStudio:InternetModule'), then await the response and read it with response.text(), response.json(), or response.bytes().

How to download remote images or glTF models in Spectacles lenses?

Create a resource with internetModule.makeResourceFromUrl, then pass it to RemoteMediaModule methods like loadResourceAsImageTexture or loadResourceAsGltfAsset. The callbacks return a Texture or GltfAsset you can assign to materials or instantiate in the scene.

Why does new Request() fail with TS2674 in Lens Studio?

The Request constructor is protected in some Lens Studio TypeScript configurations, causing error TS2674. Pass the URL and init object directly to internetModule.fetch() instead of constructing a Request instance.

Does the Fetch API work in the Lens Studio preview window?

Fetch only works in Preview when Device Type Override is set to Spectacles; otherwise all requests return 404. The API also requires Lens Studio v5.3+ and Spectacles OS v5.58.6621 or later.

What are the limitations of fetch in Lens Studio?

Response bodies can only be read via text(), json(), and bytes(); blob(), arrayBuffer(), and the body property are unsupported. Insecure http connections require Experimental APIs and cannot be published, while https lenses are publishable.

How do I detect internet connectivity changes in a Spectacles lens?

Call global.deviceInfoSystem.isInternetAvailable() for the current status and subscribe to global.deviceInfoSystem.onInternetStatusChanged to react when connectivity changes. This requires Lens Studio v5.7+ and Spectacles OS v5.60.x+.