Getting Started
Get AuraImage running in your project in under 5 minutes.
Prerequisites
- Node.js 18+
- An AuraImage account and API key pair
Install the CLI
npm install -g @auraimage/cliInitialize Your Project
Running aura init in your project root creates an aura.config.json with your project slug and keys, and writes the correct environment variables to .env.local.
aura initYou will be prompted for:
- Your Public Key (safe to expose in frontend code)
- Your Secret Key (stays in your backend / CI only)
- Your project slug (public-facing, e.g.
narek)
The resulting aura.config.json:
{
"slug": "narek",
"publicKey": "pk_live_...",
"devSlug": "dev-narek",
"baseUrl": "https://auraimage.ai"
}Authentication: Dual-Key System
AuraImage separates concerns between frontend and backend:
| Key | Where to use | What it does |
|---|---|---|
Public Key (pk_*) | Frontend, Shadcn component | Identifies your project for read/display requests |
Secret Key (sk_*) | Backend, MCP server, CI/CD | Signs upload requests via HMAC — never expose in client code |
Environment Variables
NEXT_PUBLIC_AURA_PUBLIC_KEY=pk_live_...
AURA_SECRET_KEY=sk_live_...
AURA_SLUG=narekYour First Upload
1. Generate a signature (server-side)
import { AuraImage } from '@auraimage/sdk';
const aura = new AuraImage({ secretKey: process.env.AURA_SECRET_KEY });
const signature = aura.signUpload({
slug: 'narek',
maxSize: '5mb',
expires: Date.now() + 3600_000,
});2. Upload from the client
const formData = new FormData();
formData.append('file', file);
const response = await fetch('https://api.auraimage.ai/v1/upload', {
method: 'POST',
headers: { 'X-Aura-Signature': signature },
body: formData,
});
const { url } = await response.json();
// url → "https://auraimage.ai/narek/hero-image.avif"3. Use the URL
<img src="https://auraimage.ai/narek/hero-image.jpg?w=800&fmt=auto" alt="Hero" />Or use the <AuraImage /> component for automatic Triple-Stage Loading — see Components.
Next Steps
- Set up URL transformations (resize, crop, format)
- Add the Shadcn component to your project
- Connect the MCP server so your AI agent can manage images