Natif API playground
Try every Natif endpoint on your own device. Models run in your browser with WebGPU; nothing is sent to a server. The open-source SDK picks the best model for your device for free; Pro lets you pin an exact model, including any Hugging Face model.
Endpoints
ai.chat()— Chat with history (in the SDK)Multi-turn chat. Your app owns the history: pass it in, get the updated history back. Streams tokens; the prompt prefix is cached between turns.
ai.chat()— FAQ answer (no history) (in the SDK)One question, one answer, grounded in your FAQ. No history: each call is independent, so it's fast and the FAQ prefix stays cached.
ai.extract()— Extract structured data (in the SDK)Turns free text into typed JSON validated by your zod schema. Invalid output is repaired once, then (optionally) falls back to the cloud with the same schema.
ai.classify()— Classify text (in the SDK)Zero-shot classification: give labels, get exactly one back. Great for routing tickets, moderation queues, intent detection.
ai.speak()— Text to speech (preview: works in the playground, not yet an SDK method)Natural voice generated on the device. English, Spanish, Portuguese, French and Korean.
ai.transcribe()— Speech to text (preview: works in the playground, not yet an SDK method)Transcribes audio on the device with Whisper. Record from the mic or upload a file — the audio never leaves the browser.
ai.image()— Generate an image (preview: works in the playground, not yet an SDK method)Text to image on the device's GPU (WebGPU). 384×384. Good for product shots, thumbnails, avatars and game art.
ai.video()— Compose a video (preview: works in the playground, not yet an SDK method)Image + captions + narration → vertical MP4 (1080×1920) encoded on the device with WebCodecs. No render servers, no per-minute cost.
Quick start
npm i natif zod
import { createClient } from "natif";
const ai = createClient({ consent: { cloudFallback: false } });
const r = await ai.chat({ message: "Hi!" });
console.log(r.text, r.meta.modelId); // runs on the device
Also for React Native (@natif/react-native), Expo (@natif/expo), Swift and Kotlin. Docs: benatif.com/docs · Guide for AI assistants: llms.txt