{"name":"capability-ai","title":"Managed AI","kind":"capability","status":"available","summary":"Provider-neutral managed AI generation through Prototir.ai. The sandbox has connect-src 'none'; requests hop through the shell to a metered, moderated gateway. Prototir owns credentials and routing, while the prototype owner's paid plan and AI credits fund usage; signed-in visitors never spend their own allowance.","spec":"capability-ai","version":"sdk","versions":[],"license":"-","source":"Prototir.ai via Player Shell postMessage → platform proxy","sizeKB":null,"requires":[],"permissions":[],"flags":{"wasm":false,"streamed":false},"compatibility":"Inside the Prototir player, with AI enabled for the prototype.","install":{"manifest":"{\n  \"ai\": { \"mode\": \"managed\" }\n}","importFrom":null},"example":"const quest = await Prototir.ai.generate({\n  prompt: 'Give the player a short quest hook.',\n  maxTokens: 80\n});","api":[{"heading":"Prototir.ai","entries":[{"signature":"generate({ prompt, maxTokens?, timeoutMs? })","description":"Generates text through Prototir. Rejects with { code, message }; timeoutMs defaults to 30 seconds."}]}],"notes":["Enable it with \"ai\": { \"mode\": \"managed\" } in prototir.json. No API keys belong in a prototype: routing, moderation and allowances are handled by Prototir."],"upstreamDocs":null,"labs":[]}