Quick Start Guide
Get up and running with Aku API in minutes.
Prerequisites
Before you begin, make sure you have:
1. Installation
First, install the Aku SDK for your preferred language:
bash
npm install @aku/sdk
2. Initialize the SDK
Initialize the SDK with your API key:
javascript
import { Aku } from '@aku/sdk';
// Initialize the client with your API key
const aku = new Aku({
apiKey: 'your_api_key',
});
Security Note
Never hardcode your API key in your source code. Use environment variables instead.
javascript
import { Aku } from '@aku/sdk';
// Better approach using environment variables
const aku = new Aku({
apiKey: process.env.AKU_API_KEY,
});
3. Using Agents
Agents are specialized AI assistants designed for specific real estate tasks. Here's how to use them:
javascript
// Create a property description agent
const agent = aku.agents.create('property-description', {
model: 'gpt-4', // or 'anthropic/claude-3' or 'local/llama-3'
});
// Generate a property description
const description = await agent.generate({
property: {
type: 'apartment',
bedrooms: 2,
bathrooms: 1,
sqft: 1200,
features: ['hardwood floors', 'updated kitchen', 'balcony'],
neighborhood: 'downtown',
city: 'Seattle',
state: 'WA',
}
});
console.log(description);
4. Using Prompts
Prompts are pre-defined templates for generating specific types of content:
javascript
// Use a prompt template
const result = await aku.prompts.generate('neighborhood-analysis', {
model: 'gpt-4',
location: {
neighborhood: 'Capitol Hill',
city: 'Seattle',
state: 'WA',
}
});
console.log(result);
5. Creating Workflows
Workflows allow you to chain multiple agents and prompts together:
javascript
// Create a workflow
const workflow = aku.workflows.create();
// Add steps to the workflow
workflow.addStep('neighborhood-analysis', {
location: {
neighborhood: 'Capitol Hill',
city: 'Seattle',
state: 'WA',
}
});
workflow.addStep('property-description', {
property: {
type: 'apartment',
bedrooms: 2,
bathrooms: 1,
sqft: 1200,
features: ['hardwood floors', 'updated kitchen', 'balcony'],
neighborhood: 'Capitol Hill',
city: 'Seattle',
state: 'WA',
}
});
// Execute the workflow
const results = await workflow.execute({
model: 'gpt-4',
});
console.log(results);
Next Steps
Now that you've got the basics down, here are some resources to help you go further:
- API Reference - Complete documentation of all API endpoints
- Best Practices - Tips for getting the most out of Aku API
- Use Cases - Real-world examples of Aku API in action
- GitHub Repository - Contribute to the Aku API open-source project