Prerequisites
- Node.js and npm installed.
- A Nuabase account.
Step 1: Install the SDK
Install thenuabase package and zod for schema definition.
Step 2: Get your API Key
- Log in to the Nuabase Console.
- Navigate to API Keys.
- Create a new key and copy it.
Step 3: Write your first function
Create a file namedindex.ts (or index.js):
Step 4: Run it
Run the script usingts-node or node.
What just happened?
- You defined a Schema using Zod.
- You created a Function with a natural language prompt.
- Nuabase handled the prompt execution and guaranteed the output matched your schema.
Next Steps
Now that you’ve seen the basics, learn how to integrate this into your actual application.Frontend Integration
Securely call LLMs from your React/Vue/Web app.
Server Integration
Use Nuabase in your backend services.