Harakumo Docs
One API key, your whole cloud. Every service through the SDK, the CLI, or plain HTTP.
Getting started
Everything in Harakumo is reachable with a single API key. Create one in Dashboard → Settings → API Keys (it acts with the developer role — it can create and manage resources, but not billing or members). Then pick any interface: the SDK, the CLI, or plain HTTP.
npm install @harakumo/sdknpm install -g @harakumo/cli
harakumo login --key hk_live_…import Harakumo from '@harakumo/sdk';
const hk = new Harakumo({ apiKey: process.env.HARAKUMO_API_KEY });
const { projects } = await hk.projects.list();Authentication
Send your key as a Bearer token. The same key works across every service and every interface.
curl https://harakumo.com/api/projects \
-H "Authorization: Bearer hk_live_…"const hk = new Harakumo({ apiKey: 'hk_live_…' });harakumo login --key hk_live_… # saved to ~/.harakumo/config.jsonProjects
Projects are the container for every resource. Create one first, then attach functions, databases, storage, and more.
const { project } = await hk.projects.create({ name: 'my-app', framework: 'Next.js' });
const { projects } = await hk.projects.list();Functions
Serverless functions deployed to the Cloudflare edge (Workers) — ~0ms cold starts, zero egress.
const fn = await hk.functions.create(project.id, { name: 'hello', runtime: 'node20' });
await hk.functions.invoke(fn.function.id);Storage
S3-compatible object storage on Cloudflare R2 — zero egress fees. Upload and download with presigned URLs; bytes flow straight to R2.
const { bucket } = await hk.storage.create(project.id, { name: 'uploads' });
const { url } = await hk.storage.presign(bucket.id, { key: 'file.png', method: 'put', contentType: 'image/png' });
// PUT your bytes to url — never touches our serversDatabases
Managed databases. Edge SQLite runs on real Cloudflare D1 and is queryable directly; Postgres/MySQL/Redis are provisioned per project.
const { database } = await hk.databases.create(project.id, { name: 'app', engine: 'sqlite' });
const rows = await hk.databases.query(database.id, 'SELECT * FROM users LIMIT 10');Vector DB
Embedding collections for semantic search, RAG, and AI memory. Choose dimensions to match your model.
const { collection } = await hk.vectors.create(project.id, {
name: 'docs', dimensions: 1536, metric: 'cosine',
});Memory
Context and memory stores for AI apps — key-value state, conversation history, or semantic recall, with optional TTL.
const { store } = await hk.memory.create(project.id, { name: 'chat', kind: 'conversation' });Agents
Configurable AI agents — give them a model, instructions, and tools, then run tasks on demand.
const { agent } = await hk.agents.create(project.id, {
name: 'triage', model: 'claude-fable-5', instructions: 'Triage tickets by urgency.',
tools: ['web_search', 'email'],
});
const { run } = await hk.agents.run(agent.id, 'Triage today\'s open tickets');AI Gateway
One endpoint for every model. Use "auto" to route to the cheapest capable model; get latency, tokens, and cost back on every call.
const answer = await hk.ai.generate({ model: 'auto', prompt: 'Summarize edge functions.' });
console.log(answer.output, answer.cost);Deployments
Connect a git repo and push to deploy: the default branch ships to production, other branches get preview URLs.
await hk.deployments.connectRepo(project.id, { repoUrl: 'https://github.com/you/repo' });
await hk.deployments.push(project.id); // → production
await hk.deployments.push(project.id, 'feature'); // → preview URLDomains
Search and register domains through the built-in registrar, then connect them to a project with automatic SSL.
const { results } = await hk.domains.search('mystartup');
const { registration } = await hk.domains.register('mystartup.dev');
await hk.domains.connect(registration.id, project.id);Payments
Let your customers accept payments (Stripe Connect). Enable per project, onboard via Stripe, then create checkout sessions — a platform fee is applied automatically.
const { account, onboardingUrl } = await hk.payments.enable(project.id);
// send the seller to onboardingUrl; once live:
const { session } = await hk.payments.createSession(account.id, { amountCents: 2900, description: 'Pro plan' });Auth
Drop-in authentication for your apps — user pools with social login, MFA, and JWT issuing, per project.
const { pool, clientSecret } = await hk.auth.enable(project.id);
const { token } = await hk.auth.signup(pool.id, { email: 'user@example.com' });Media
Upload, transcode, and stream video, images, and audio — plus live channels with RTMP ingest and HLS playback.
const { asset } = await hk.media.create(project.id, { name: 'promo', kind: 'video' });
const live = await hk.media.create(project.id, { name: 'launch', kind: 'live' });
await hk.media.goLive(live.asset.id);Transactional email delivered by AWS SES from your verified domain, with a per-org send log.
await hk.mail.send({ to: 'you@example.com', subject: 'Welcome', text: 'Hello!' });