Managed AI inference
Approval-gated, keyless LLM calls hosted in Paris
Availability is runtime-configured. The authenticated GET /capabilities response is authoritative. When its managedInference flag is false, new builds receive no AI URL and the endpoint fails closed with 503.
Provider credentials and production-processing approval are separate gates. A credential by itself cannot activate processing, and an operator emergency-off file stops new upstream requests immediately.
When operational, PocketBase apps call LLMs through Percher without receiving a provider key. The capsule template exposes:
import { complete, streamComplete } from "./lib/ai";
const answer = await complete("Summarize this note: " + note);
await streamComplete(prompt, (token) => output.append(token), { signal });Data path
- The browser sends text and its signed-in PocketBase JWT to
POST /capsule/<app>/ai. CORS accepts only that app's Percher hostname or verified custom domain. - Percher verifies the JWT against that app's own PocketBase, rate-limits, validates, and atomically reserves the worst-case cost.
- Percher sends the text over TLS to Scaleway Generative APIs in Paris (
fr-par). Scaleway hosts the model; model creators do not receive prompts. - The completion returns through Percher. Percher stores metered token cost, not prompt or completion content.
Scaleway publishes zero prompt retention and no model training by default. Its documented exception permits retaining request content for up to two weeks to investigate rare harmful requests or unexpected service errors; aggregated anonymized API metadata may be kept for six months. Do not send data your app is not permitted to process.
Limits and models
30 requests/min per app, 20 per PocketBase user, 100 KB per request, and 2,000 output tokens. Daily caps reset at 00:00 UTC: free €0.05, Starter €0.50, Maker €2, Max €10.
gpt-oss-120b (default), qwen3.6-35b-a3b, and llama-3.3-70b-instruct. Unknown models fail closed.
Never place a provider key in a capsule, a VITE_* variable, a browser bundle, or public config. The injected AI URL is only a public Percher endpoint.