Open-source playground
for messing with text & AI art.
Clave is my little open-source toolkit for building chatbots, generative art, and whatever else you can dream up. No configs, no headaches—just code and creativity. Your AI, your key, your canvas.
const generateHero = async (product) => {
const response = await fetch('http://localhost:3000/api/chat', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
model: 'gpt-4o',
systemPrompt: 'You are a conversion rate optimization expert.',
message: `Write 3 high-converting Hero Sections (Headline, Subhead, CTA) for: ${product}`
})
});
const data = await response.json();
console.log(data.text);
};
// Usage
generateHero('A smart wallet that tracks your spending');
Production Ready
Everything you need to build state-of-the-art AI experiences, right out of the box.
Real-time Streaming
Low-latency WebSocket connections ensure your users never wait for a response.
Type-Safe SDKs
Full TypeScript support with auto-generated types for all API responses.
Edge Compatible
Runs on Vercel Edge, Cloudflare Workers, and Deno Deploy seamlessly.
Generative Media
Create stunning images and assets programmatically.
Context Retention
Smart context management automatically handles token limits and history.
Open Source
MIT Licensed
Community
Join Discord