Skip to main content
createFn lets your backend call Nuabase for individual inputs using your API key—no token exchange needed on the server.

Initialize Nua with your API key

Define and call a function

Pass a prompt and output schema to createFn, then invoke the returned function with your input value.
The result is typed from your schema, so you can safely use result.data in downstream server logic.