AI in apps
Apps get AI (chat, images, speech, transcription, video) through the Kazzle AI API — one endpoint, billed in credits against the space. Don’t ask users for OpenAI/Anthropic/other provider keys unless they specifically want to bill those providers directly. The endpoints, billing, and examples are documented once in the AI API reference. This page only covers wiring it into an app.Wiring the API key
- Create a scoped Kazzle API key for the app with the
api_keytool. - Store it in a secret collection + environment under the name
KAZZLE_API_KEY(the secret name becomes the env var). - Point the process component at that collection + environment.
- Call
https://api.kazzle.app/ai/*from server-side code only.
process.env.KAZZLE_API_KEY, resolved from the vault. There is no env.vars field — secrets reach components only through the collection + environment they point at.
VITE_* variable. See Secrets for the vault wiring and AI API reference for every endpoint.