Files

1032 lines
51 KiB
HTML

<!DOCTYPE html>
<html lang="en" class="scroll-smooth" style="width: 100%; max-width: 100%; overflow-x: hidden;">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>AIRA AI REST API Console | Aira Group of Technology</title>
<link rel="icon" type="image/png" href="assets/logo.png" />
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600;700&display=swap" rel="stylesheet" />
<!-- Razorpay Checkout Gateway -->
<script src="https://checkout.razorpay.com/v1/checkout.js"></script>
<style>
*, *::before, *::after {
box-sizing: border-box;
}
html, body {
width: 100%;
max-width: 100%;
overflow-x: hidden !important;
margin: 0;
padding: 0;
background-color: #050b18;
color: #ffffff;
font-family: 'Inter', sans-serif;
}
.font-mono {
font-family: 'JetBrains Mono', monospace;
}
.hero-glow {
background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.18) 0%, transparent 60%);
}
/* Prevent iOS & Android bounce scroll shifting */
body {
position: relative;
}
</style>
</head>
<body class="min-h-screen flex flex-col justify-between antialiased selection:bg-blue-600 selection:text-white w-full overflow-x-hidden">
<!-- Top Navigation Bar -->
<header class="sticky top-0 z-40 bg-[#050b18]/95 backdrop-blur-md border-b border-slate-800/80 w-full">
<div class="max-w-7xl mx-auto px-3.5 sm:px-6 lg:px-8 h-16 flex items-center justify-between w-full">
<!-- Brand Logo -->
<a href="/" class="flex items-center gap-2.5 sm:gap-3 group">
<img src="assets/logo.png" alt="Aira Group Official Logo" class="w-8 h-8 sm:w-9 sm:h-9 rounded-xl shadow-md object-contain transition-transform group-hover:scale-105" />
<div class="flex items-center gap-1.5 sm:gap-2">
<span class="text-lg sm:text-xl font-bold tracking-tight text-white">Aira<span class="text-blue-500 font-light">Group</span></span>
<span class="text-[9px] sm:text-[10px] font-bold bg-blue-500/20 text-cyan-400 border border-cyan-500/30 px-2 py-0.5 rounded-full uppercase tracking-wider">REST API</span>
</div>
</a>
<!-- Right Nav Buttons -->
<div class="flex items-center gap-2.5 sm:gap-4">
<div class="hidden sm:flex items-center gap-1.5 text-xs font-mono text-emerald-400 bg-emerald-500/10 border border-emerald-500/20 px-2.5 py-1 rounded-full">
<span class="w-2 h-2 rounded-full bg-emerald-400 animate-pulse"></span>
<span>99.9% Uptime</span>
</div>
<a href="/" class="text-xs font-semibold text-slate-300 hover:text-white bg-slate-800/80 hover:bg-slate-700/80 border border-slate-700 px-3 py-1.5 sm:px-3.5 sm:py-2 rounded-xl transition flex items-center gap-1.5">
<i class="fas fa-arrow-left text-[11px]"></i> <span>Main Website</span>
</a>
</div>
</div>
</header>
<!-- Main Container -->
<main class="flex-grow hero-glow relative z-10 py-5 sm:py-10 w-full overflow-hidden">
<div class="max-w-7xl mx-auto px-3.5 sm:px-6 lg:px-8 w-full min-w-0">
<!-- Page Hero Header -->
<div class="text-center max-w-3xl mx-auto mb-6 sm:mb-10 w-full px-2">
<div class="inline-flex items-center gap-1.5 sm:gap-2 px-3 py-1 rounded-full text-[10px] sm:text-[11px] font-bold tracking-widest uppercase bg-blue-500/10 text-cyan-400 border border-cyan-500/30 mb-2.5 shadow-sm">
<i class="fas fa-microchip text-[10px]"></i> Sovereign RESTful Gateway &bull; OpenAI Spec
</div>
<h1 class="text-2xl sm:text-4xl lg:text-5xl font-extrabold tracking-tight text-white break-words">
AIRA AI <span class="bg-gradient-to-r from-blue-400 via-cyan-300 to-indigo-300 bg-clip-text text-transparent">Developer Console</span>
</h1>
<p class="text-slate-300 text-xs sm:text-sm mt-1.5 sm:mt-2.5 leading-relaxed max-w-2xl mx-auto font-light">
Provision direct token-stream credentials for Aira Sovereign AI models. Instant free community access with verified email OTP, or monthly flagship subscription.
</p>
</div>
<!-- Main Layout: Form FIRST on mobile (order-1), Docs SECOND on mobile (order-2) -->
<div class="grid lg:grid-cols-12 gap-5 sm:gap-8 items-start w-full min-w-0">
<!-- PROVISIONING FORM CARD (lg:col-span-7, order-1) -->
<div class="lg:col-span-7 order-1 w-full min-w-0">
<div class="bg-gradient-to-b from-slate-900/95 via-slate-900 to-[#071126] border border-blue-500/30 rounded-2xl sm:rounded-3xl p-4 sm:p-7 shadow-2xl backdrop-blur-md relative overflow-hidden w-full">
<div class="flex items-center justify-between mb-4 pb-3 border-b border-slate-800">
<div>
<h2 class="text-base sm:text-lg font-bold text-white flex items-center gap-2">
<i class="fas fa-key text-blue-400 text-sm sm:text-base"></i> Provision API Credentials
</h2>
<p class="text-[11px] text-slate-400 mt-0.5">Instant key issuance with cryptographic OTP verification</p>
</div>
<span class="inline-flex items-center gap-1 text-[10px] font-bold text-blue-400 bg-blue-500/10 border border-blue-500/30 px-2 py-0.5 rounded-full uppercase flex-shrink-0">
<i class="fas fa-shield-halved text-[9px]"></i> Secure
</span>
</div>
<!-- Form -->
<form id="aira-api-form" onsubmit="return false;" class="space-y-3.5 w-full">
<!-- 1. API Key Name -->
<div class="w-full">
<label class="block text-xs font-semibold uppercase tracking-wider text-slate-300 mb-1">
1. API Key Name
</label>
<input
type="text"
id="api-key-name"
placeholder="e.g. Production Web App, Mobile Client, Bot"
class="w-full px-3.5 py-2.5 sm:py-3 bg-slate-950/80 border border-slate-700 rounded-xl text-white placeholder-slate-500 text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all"
/>
</div>
<!-- 2. Model & 3. Expiry in 2 cols -->
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3 w-full">
<div class="w-full">
<label class="block text-xs font-semibold uppercase tracking-wider text-slate-300 mb-1">
2. Select Model
</label>
<select
id="api-model-select"
onchange="updateApiModelDetails()"
class="w-full px-3 py-2.5 sm:py-3 bg-slate-950/80 border border-slate-700 rounded-xl text-white text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all cursor-pointer"
>
<optgroup label="🌟 Free Community Models (₹0 / Free)">
<option value="aira-flash-1.5" selected>Aira Flash 1.5 (Free &bull; Fast)</option>
<option value="aira-flash-lite">Aira Flash Lite (Free &bull; High Speed)</option>
</optgroup>
<optgroup label="🚀 Flagship Models (Monthly Subscription)">
<option value="aira-3-ultra">Aira 3 Ultra Engine v3.6 (₹499/mo)</option>
<option value="aira-deepmind">AiraDeepMind 550B MoE (₹799/mo)</option>
<option value="aira-cyber-defender">Aira Cyber Defender AI 7B (₹999/mo)</option>
</optgroup>
</select>
</div>
<div class="w-full">
<label class="block text-xs font-semibold uppercase tracking-wider text-slate-300 mb-1">
3. Key Expiration
</label>
<select
id="api-expiry-select"
class="w-full px-3 py-2.5 sm:py-3 bg-slate-950/80 border border-slate-700 rounded-xl text-white text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all cursor-pointer"
>
<option value="30d" selected>30 Days (Standard Development)</option>
<option value="90d">90 Days (Quarterly Active)</option>
<option value="365d">365 Days (1 Year Production)</option>
<option value="never">Permanent (Never Expires)</option>
</select>
</div>
</div>
<!-- 4. Developer Email with Side-by-Side "Verify Email" Button -->
<div class="w-full">
<div class="flex items-center justify-between mb-1">
<label class="block text-xs font-semibold uppercase tracking-wider text-slate-300">
4. Developer Email &amp; Verification
</label>
<span id="api-verified-status" class="text-[10px] font-semibold text-slate-400">
OTP required
</span>
</div>
<div class="flex gap-2 w-full">
<input
type="email"
id="api-email"
placeholder="developer@yourcompany.com"
class="flex-1 min-w-0 px-3.5 py-2.5 sm:py-3 bg-slate-950/80 border border-slate-700 rounded-xl text-white placeholder-slate-500 text-xs sm:text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all"
/>
<button
type="button"
id="api-verify-btn"
onclick="sendApiOtp()"
class="px-3.5 py-2.5 sm:py-3 bg-blue-600 hover:bg-blue-500 text-white font-bold text-xs rounded-xl shadow-md transition-all flex items-center justify-center gap-1.5 whitespace-nowrap active:scale-95 flex-shrink-0"
>
<i class="fas fa-paper-plane text-xs"></i> <span>Verify Email</span>
</button>
</div>
<!-- Inline OTP Drawer (Slides down on OTP dispatch) -->
<div id="api-otp-container" class="hidden mt-2.5 p-3 bg-blue-950/40 border border-blue-500/40 rounded-xl animate-fade-in space-y-2 w-full">
<div class="flex items-center justify-between text-[11px] text-slate-200">
<span class="flex items-center gap-1">
<i class="fas fa-envelope text-cyan-400"></i> Enter OTP sent via <strong class="text-white">noreply@airaaigroup.in</strong>:
</span>
<span id="api-otp-countdown" class="font-mono text-amber-300 font-bold text-xs">10:00</span>
</div>
<div class="flex gap-2 w-full">
<input
type="text"
id="api-otp-input"
maxlength="6"
placeholder="123456"
class="w-28 sm:w-36 px-2.5 py-2 bg-slate-950 border border-blue-400/80 rounded-xl text-center font-mono text-base font-bold tracking-widest text-cyan-300 focus:outline-none focus:ring-2 focus:ring-cyan-400"
/>
<button
type="button"
id="api-otp-confirm-btn"
onclick="verifyApiOtp()"
class="px-4 py-2 bg-emerald-600 hover:bg-emerald-500 text-white font-bold text-xs rounded-xl transition flex items-center gap-1.5 active:scale-95 flex-shrink-0"
>
<i class="fas fa-check text-xs"></i> Confirm
</button>
<button
type="button"
onclick="sendApiOtp()"
class="px-2 py-2 text-slate-400 hover:text-white text-xs underline transition flex-shrink-0"
>
Resend
</button>
</div>
<div id="api-otp-feedback" class="text-xs text-slate-300"></div>
</div>
</div>
<!-- 5. Dynamic Pricing & Tier Status Banner -->
<div id="api-tier-banner" class="p-3 rounded-xl bg-slate-950/70 border border-slate-800 text-xs flex items-center justify-between transition-all w-full">
<div class="flex items-center gap-2.5 min-w-0">
<div id="api-tier-icon" class="w-7 h-7 rounded-lg bg-emerald-500/20 text-emerald-400 flex items-center justify-center font-bold text-xs flex-shrink-0">
<i class="fas fa-bolt"></i>
</div>
<div class="min-w-0">
<div id="api-tier-name" class="font-bold text-white text-xs truncate">Free Community Access</div>
<div id="api-tier-desc" class="text-[10px] text-slate-400 truncate">Zero cost &bull; Instant API key generation</div>
</div>
</div>
<div id="api-tier-price" class="text-right flex-shrink-0 pl-2">
<span class="text-sm font-extrabold text-emerald-400 font-mono">&#8377;0</span>
<span class="text-[10px] text-slate-400 block">Forever Free</span>
</div>
</div>
<!-- 6. SLIDE / SWIPE TO UNLOCK & GENERATE KEY WIDGET (ROCK SOLID FIXED HEIGHT) -->
<div class="pt-2 w-full">
<div
id="api-slider"
class="relative bg-white/10 border border-white/20 rounded-full overflow-hidden select-none touch-none cursor-pointer w-full"
style="height: 56px; min-height: 56px;"
>
<div
id="api-fill"
class="absolute left-0 top-0 h-full w-0 bg-gradient-to-r from-blue-600 via-cyan-500 to-emerald-500 rounded-full"
style="height: 100%;"
></div>
<div
id="api-slider-text"
class="absolute inset-0 flex items-center justify-center text-xs font-bold tracking-widest text-slate-200 pointer-events-none uppercase transition-opacity px-6 text-center select-none"
style="z-index: 5;"
>
Slide to Generate Free API Key <span class="ml-2">&rarr;</span>
</div>
<div
id="api-thumb"
class="absolute bg-white text-[#0a2342] rounded-full shadow-xl flex items-center justify-center font-bold text-sm cursor-grab active:cursor-grabbing transition-transform"
style="width: 48px; height: 48px; top: 4px; left: 4px; z-index: 10;"
>
<i class="fas fa-arrow-right text-xs"></i>
</div>
</div>
<p class="text-[10px] sm:text-[11px] text-slate-400 text-center mt-2 select-none">
Drag the button to the right to verify credentials and provision your API key
</p>
</div>
<!-- 7. Key Reveal Box -->
<div id="api-result-box" class="hidden mt-4 p-4 sm:p-5 bg-gradient-to-br from-emerald-950/60 via-slate-900 to-slate-950 border border-emerald-500/50 rounded-2xl animate-fade-in space-y-2.5 w-full">
<div class="flex items-center justify-between">
<div class="flex items-center gap-2">
<span class="w-2.5 h-2.5 rounded-full bg-emerald-400 animate-pulse"></span>
<span class="font-bold text-white text-xs sm:text-sm">Provisioned Sovereign API Key</span>
</div>
<span id="api-result-tier-pill" class="text-[9px] sm:text-[10px] font-bold uppercase bg-emerald-500/20 text-emerald-300 border border-emerald-500/40 px-2 py-0.5 rounded-full">Active</span>
</div>
<div class="relative bg-slate-950 border border-emerald-500/40 rounded-xl p-2.5 sm:p-3 flex items-center justify-between gap-2 font-mono text-xs text-emerald-300 w-full">
<span id="api-generated-key-display" class="truncate select-all font-bold text-[11px] sm:text-xs"></span>
<button
type="button"
onclick="copyGeneratedApiKey()"
id="api-copy-key-btn"
class="px-3 py-1.5 bg-emerald-600 hover:bg-emerald-500 text-white font-bold text-[10px] sm:text-[11px] rounded-lg transition flex items-center gap-1 flex-shrink-0"
>
<i class="far fa-copy text-xs"></i> <span>Copy</span>
</button>
</div>
<div class="text-[11px] text-slate-300 flex flex-wrap justify-between gap-2 pt-1 border-t border-slate-800">
<span><strong>Model:</strong> <span id="api-result-model-text" class="text-white"></span></span>
<span><strong>Expires:</strong> <span id="api-result-expiry-text" class="text-white"></span></span>
</div>
<p class="text-[10px] text-slate-400">
<i class="fas fa-check-circle text-emerald-400 mr-1"></i> Delivered to your inbox from <strong>noreply@airaaigroup.in</strong>.
</p>
</div>
</form>
</div>
</div>
<!-- SPECS & CODE SAMPLES (lg:col-span-5, order-2) -->
<div class="lg:col-span-5 order-2 space-y-4 sm:space-y-5 w-full min-w-0">
<!-- Base Endpoint Card -->
<div class="bg-slate-900/80 border border-slate-800 rounded-2xl p-4 sm:p-5 shadow-xl backdrop-blur-sm w-full min-w-0 overflow-hidden">
<div class="flex items-center justify-between mb-3 pb-2 border-b border-slate-800">
<span class="text-xs font-bold tracking-wider uppercase text-cyan-400 flex items-center gap-1.5">
<i class="fas fa-network-wired text-xs"></i> Base Endpoint
</span>
<span class="text-[10px] font-mono bg-emerald-500/10 text-emerald-400 border border-emerald-500/30 px-2 py-0.5 rounded-full flex items-center gap-1">
<span class="w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"></span> REST v1
</span>
</div>
<div class="bg-slate-950 rounded-xl p-2.5 border border-slate-800 font-mono text-xs text-blue-300 flex items-center justify-between gap-2 w-full min-w-0">
<span class="truncate text-[11px] sm:text-xs">https://airaai-8ibs.onrender.com/v1</span>
<button type="button" onclick="navigator.clipboard.writeText('https://airaai-8ibs.onrender.com/v1'); alert('Endpoint copied to clipboard!');" class="text-slate-400 hover:text-white transition text-xs p-1 flex-shrink-0" title="Copy Endpoint">
<i class="far fa-copy"></i>
</button>
</div>
<div class="grid grid-cols-2 gap-2.5 mt-3 text-xs w-full">
<div class="p-2 rounded-lg bg-slate-950/60 border border-slate-800/80">
<div class="text-slate-400 text-[10px] uppercase font-semibold">Latency</div>
<div class="text-white font-bold font-mono mt-0.5">&lt;50ms TTFT</div>
</div>
<div class="p-2 rounded-lg bg-slate-950/60 border border-slate-800/80">
<div class="text-slate-400 text-[10px] uppercase font-semibold">Format</div>
<div class="text-white font-bold font-mono mt-0.5">OpenAI Spec</div>
</div>
</div>
</div>
<!-- cURL Quickstart Card -->
<div class="bg-slate-900/80 border border-slate-800 rounded-2xl p-4 sm:p-5 shadow-xl backdrop-blur-sm w-full min-w-0 overflow-hidden">
<div class="flex items-center justify-between mb-2.5">
<span class="text-xs font-bold text-slate-300 uppercase tracking-wider flex items-center gap-1.5">
<i class="fas fa-terminal text-blue-400 text-xs"></i> cURL Quick Start
</span>
<button type="button" onclick="copyApiCurlCode()" id="copy-curl-btn" class="text-xs text-cyan-400 hover:text-cyan-300 font-semibold inline-flex items-center gap-1 transition flex-shrink-0">
<i class="far fa-copy"></i> Copy
</button>
</div>
<pre id="api-curl-sample" class="bg-slate-950 border border-slate-800 rounded-xl p-3 sm:p-4 font-mono text-[11px] text-slate-300 overflow-x-auto leading-relaxed select-all w-full max-w-full">curl https://airaai-8ibs.onrender.com/v1/chat/completions \
-H "Authorization: Bearer airaaixak..." \
-H "Content-Type: application/json" \
-d '{
"model": "aira-flash-1.5",
"messages": [
{"role": "user", "content": "Hello Aira!"}
]
}'</pre>
</div>
<!-- Available Models Overview -->
<div class="bg-slate-900/80 border border-slate-800 rounded-2xl p-4 sm:p-5 shadow-xl backdrop-blur-sm w-full min-w-0 overflow-hidden">
<h3 class="text-xs font-bold text-slate-300 uppercase tracking-wider mb-3 flex items-center gap-1.5">
<i class="fas fa-layer-group text-blue-400 text-xs"></i> Neural Models Available
</h3>
<div class="space-y-2 w-full">
<div class="p-2.5 rounded-xl bg-slate-950 border border-slate-800/80 flex items-center justify-between">
<div>
<div class="font-bold text-white text-xs">Aira Flash 1.5 &amp; Flash Lite</div>
<div class="text-[10px] text-slate-400">High-speed conversational inference</div>
</div>
<span class="text-[10px] font-bold text-emerald-400 bg-emerald-500/10 border border-emerald-500/30 px-2 py-0.5 rounded-full">FREE</span>
</div>
<div class="p-2.5 rounded-xl bg-slate-950 border border-slate-800/80 flex items-center justify-between">
<div>
<div class="font-bold text-white text-xs">Aira 3 Ultra (Engine v3.6)</div>
<div class="text-[10px] text-slate-400">Multimodal Flagship Intelligence</div>
</div>
<span class="text-[10px] font-bold text-cyan-400 bg-cyan-500/10 border border-cyan-500/30 px-2 py-0.5 rounded-full">&#8377;499/mo</span>
</div>
<div class="p-2.5 rounded-xl bg-slate-950 border border-slate-800/80 flex items-center justify-between">
<div>
<div class="font-bold text-white text-xs">AiraDeepMind</div>
<div class="text-[10px] text-slate-400">550B MoE Swarm Deep Reasoning</div>
</div>
<span class="text-[10px] font-bold text-cyan-400 bg-cyan-500/10 border border-cyan-500/30 px-2 py-0.5 rounded-full">&#8377;799/mo</span>
</div>
<div class="p-2.5 rounded-xl bg-slate-950 border border-slate-800/80 flex items-center justify-between">
<div>
<div class="font-bold text-white text-xs">Aira Cyber Defender AI</div>
<div class="text-[10px] text-slate-400">Autonomous 7B Security Audit Core</div>
</div>
<span class="text-[10px] font-bold text-cyan-400 bg-cyan-500/10 border border-cyan-500/30 px-2 py-0.5 rounded-full">&#8377;999/mo</span>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<!-- Official Verified UPI Payment Modal for Paid Flagship Models -->
<div id="api-payment-modal" class="fixed inset-0 z-50 flex items-center justify-center hidden bg-black/85 backdrop-blur-md p-4 transition-all duration-300 w-full overflow-x-hidden">
<div class="bg-gradient-to-b from-slate-900 to-[#071126] border border-blue-500/40 rounded-3xl w-full max-w-md shadow-2xl overflow-hidden text-white animate-scale max-h-[92vh] overflow-y-auto">
<!-- Modal Header -->
<div class="bg-gradient-to-r from-blue-700 via-[#0a2342] to-slate-900 p-4 sm:p-5 flex items-center justify-between border-b border-blue-500/20">
<div class="flex items-center gap-3">
<div class="w-9 h-9 rounded-xl bg-blue-600/30 border border-blue-400/40 flex items-center justify-center text-cyan-300">
<i class="fas fa-crown text-sm"></i>
</div>
<div>
<h4 class="font-bold text-white text-sm sm:text-base">Sovereign Flagship Tier</h4>
<p class="text-[11px] text-blue-200" id="payment-modal-model-name">Aira 3 Ultra Monthly Subscription</p>
</div>
</div>
<button type="button" onclick="closeApiPaymentModal()" class="text-slate-400 hover:text-white transition text-lg p-1">
<i class="fas fa-times"></i>
</button>
</div>
<!-- Modal Body -->
<div class="p-4 sm:p-5 space-y-3.5">
<!-- Price Banner -->
<div class="bg-slate-950 p-3.5 rounded-2xl border border-slate-800 flex items-center justify-between">
<div>
<span class="text-[10px] text-slate-400 block uppercase font-semibold">Monthly Subscription</span>
<span class="text-xs text-slate-300">Full neural weights &bull; Priority GPU</span>
</div>
<div class="text-right">
<span id="payment-modal-price" class="text-xl sm:text-2xl font-black text-cyan-400 font-mono">&#8377;499</span>
<span class="text-[10px] text-slate-400 block">/ month</span>
</div>
</div>
<!-- Razorpay Checkout Button (Debit Cards / Credit Cards / NetBanking / UPI) -->
<div class="space-y-1.5">
<button
type="button"
id="pay-razorpay-btn"
onclick="initiateRazorpayPayment()"
class="w-full py-3.5 px-4 bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600 hover:from-blue-500 hover:to-purple-500 text-white font-bold text-xs sm:text-sm rounded-xl shadow-lg transition flex items-center justify-center gap-2 active:scale-98"
>
<i class="fas fa-credit-card text-sm"></i>
<span>Pay with Debit Card / NetBanking (Razorpay)</span>
</button>
<div class="flex items-center justify-center gap-2 text-[10px] text-slate-400">
<span class="inline-flex items-center gap-1"><i class="fab fa-cc-visa text-xs text-blue-400"></i> Visa</span>
<span>&bull;</span>
<span class="inline-flex items-center gap-1"><i class="fab fa-cc-mastercard text-xs text-orange-400"></i> MasterCard</span>
<span>&bull;</span>
<span class="font-bold text-emerald-400">RuPay</span>
<span>&bull;</span>
<span>All Banks NetBanking</span>
</div>
</div>
<!-- Divider -->
<div class="flex items-center gap-3 my-1 text-slate-500 text-xs">
<div class="flex-1 h-px bg-slate-800"></div>
<span class="text-[10px] uppercase font-semibold tracking-wider text-slate-400">OR PAY DIRECT VIA UPI</span>
<div class="flex-1 h-px bg-slate-800"></div>
</div>
<!-- 1-Click Pay with UPI App (GPay, PhonePe, Paytm) -->
<a
id="direct-upi-btn"
href="upi://pay?pa=8921584368@ptyes&pn=Adam%20Eehan&am=499&cu=INR&tn=Aira%20AI%20API%20Subscription"
class="w-full py-3 px-4 bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600 hover:from-emerald-500 hover:to-cyan-500 text-white font-bold text-xs sm:text-sm rounded-xl shadow-lg transition flex items-center justify-center gap-2 active:scale-98"
>
<i class="fas fa-mobile-screen-button text-sm"></i>
<span>Pay via UPI App (GPay / PhonePe / Paytm)</span>
</a>
<!-- Official QR Code Card -->
<div class="bg-slate-950 p-4 rounded-2xl border border-slate-800 space-y-2.5 text-center">
<div class="text-[11px] text-slate-300 font-medium">
Or Scan Official Verified QR Code:
</div>
<div class="inline-block p-1 bg-white rounded-2xl shadow-xl border border-blue-500/30">
<img src="assets/upi-qr.jpg" alt="Adam Eehan Official Verified Paytm UPI QR" class="w-48 sm:w-56 h-auto mx-auto rounded-xl object-contain" />
</div>
<div class="flex items-center justify-center gap-1.5 text-xs text-slate-200 mt-1">
<span class="font-bold text-white">Adam Eehan</span>
<span class="text-[10px] bg-blue-500/20 text-blue-400 border border-blue-400/40 px-2 py-0.5 rounded-full font-semibold">
<i class="fas fa-check-circle text-blue-400 text-[10px]"></i> Verified Merchant
</span>
</div>
<div class="flex items-center justify-center gap-2 mt-1">
<code class="px-2.5 py-1 rounded-lg bg-slate-900 border border-slate-700 text-xs font-mono text-cyan-300 font-bold select-all">8921584368@ptyes</code>
<button type="button" onclick="navigator.clipboard.writeText('8921584368@ptyes'); alert('UPI ID (8921584368@ptyes) copied to clipboard!');" class="text-xs text-slate-400 hover:text-white p-1" title="Copy UPI">
<i class="far fa-copy"></i>
</button>
</div>
<!-- Step 2: Enter Transaction ID / UTR -->
<div class="pt-2 text-left border-t border-slate-800/80">
<label class="block text-[10px] font-semibold text-slate-300 mb-1">
Enter 12-digit UPI Reference / UTR Number after payment:
</label>
<div class="flex gap-2">
<input
type="text"
id="upi-ref-input"
placeholder="e.g. 431289104829 or Trans ID"
class="flex-1 min-w-0 px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-xs text-white placeholder-slate-500 focus:outline-none focus:ring-1 focus:ring-blue-500 font-mono"
/>
<button
type="button"
onclick="submitUpiPaymentVerification()"
id="upi-confirm-btn"
class="px-3.5 py-2 bg-emerald-600 hover:bg-emerald-500 text-white font-bold text-xs rounded-lg transition whitespace-nowrap active:scale-95 shadow-md flex items-center gap-1"
>
<i class="fas fa-key text-[10px]"></i> <span>Activate Key</span>
</button>
</div>
<p class="text-[10px] text-slate-400 mt-1">
Key is immediately generated &amp; delivered to your verified email.
</p>
</div>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="bg-[#030712] border-t border-slate-800/80 py-6 text-center text-xs text-slate-500 w-full overflow-hidden">
<div class="max-w-7xl mx-auto px-4 flex flex-col sm:flex-row items-center justify-between gap-3">
<div>
&copy; 2026 <strong>Aira Group of Technology</strong>. All sovereign rights reserved.
</div>
<div class="flex items-center gap-4 text-slate-400 text-xs">
<a href="/" class="hover:text-white transition">Home</a>
<a href="/#services" class="hover:text-white transition">Solutions</a>
<a href="/#contact" class="hover:text-white transition">Contact</a>
<a href="/privacy" class="hover:text-white transition">Privacy</a>
</div>
</div>
</footer>
<!-- Controller Script -->
<script>
let apiOtpHash = null;
let apiVerifiedProof = null;
let apiVerifiedEmail = null;
let apiOtpTimerInterval = null;
const API_MODEL_PRICES = {
"aira-flash-1.5": { tier: "free", price: 0, label: "Aira Flash 1.5", desc: "Zero cost • Instant API key generation" },
"aira-flash-lite": { tier: "free", price: 0, label: "Aira Flash Lite", desc: "Zero cost • Instant high-speed inference" },
"aira-3-ultra": { tier: "pro", price: 499, label: "Aira 3 Ultra (Engine v3.6)", desc: "₹499/mo • Multimodal Flagship Intelligence" },
"aira-deepmind": { tier: "pro", price: 799, label: "AiraDeepMind 550B MoE", desc: "₹799/mo • 550B MoE Swarm Deep Reasoning" },
"aira-cyber-defender": { tier: "pro", price: 999, label: "Aira Cyber Defender AI", desc: "₹999/mo • Autonomous 7B Cybersecurity Core" }
};
function updateApiModelDetails() {
const select = document.getElementById("api-model-select");
if (!select) return;
const val = select.value;
const info = API_MODEL_PRICES[val] || API_MODEL_PRICES["aira-flash-1.5"];
const tierName = document.getElementById("api-tier-name");
const tierDesc = document.getElementById("api-tier-desc");
const tierPrice = document.getElementById("api-tier-price");
const tierIcon = document.getElementById("api-tier-icon");
const sliderText = document.getElementById("api-slider-text");
if (info.tier === "free") {
tierName.textContent = "Free Community Access";
tierDesc.textContent = info.desc;
tierPrice.innerHTML = `<span class="text-sm font-extrabold text-emerald-400 font-mono">&#8377;0</span><span class="text-[10px] text-slate-400 block">Forever Free</span>`;
tierIcon.className = "w-7 h-7 rounded-lg bg-emerald-500/20 text-emerald-400 flex items-center justify-center font-bold text-xs flex-shrink-0";
tierIcon.innerHTML = `<i class="fas fa-bolt"></i>`;
sliderText.innerHTML = `Slide to Generate Free API Key <span class="ml-2">&rarr;</span>`;
} else {
tierName.textContent = "Sovereign Flagship Subscription";
tierDesc.textContent = info.desc;
tierPrice.innerHTML = `<span class="text-sm font-extrabold text-cyan-400 font-mono">&#8377;${info.price}</span><span class="text-[10px] text-slate-400 block">/ month</span>`;
tierIcon.className = "w-7 h-7 rounded-lg bg-cyan-500/20 text-cyan-400 flex items-center justify-center font-bold text-xs flex-shrink-0";
tierIcon.innerHTML = `<i class="fas fa-crown"></i>`;
sliderText.innerHTML = `Slide to Subscribe &bull; &#8377;${info.price}/mo <span class="ml-2">&rarr;</span>`;
}
}
// 1. Send OTP via noreply@airaaigroup.in
async function sendApiOtp() {
const emailInput = document.getElementById("api-email");
const email = emailInput.value.trim().toLowerCase();
const verifyBtn = document.getElementById("api-verify-btn");
const feedback = document.getElementById("api-otp-feedback");
if (!email || !email.includes("@") || !email.includes(".")) {
alert("Please enter a valid developer email address.");
emailInput.focus();
return;
}
const originalBtnHtml = verifyBtn.innerHTML;
verifyBtn.disabled = true;
verifyBtn.innerHTML = `<i class="fas fa-spinner fa-spin text-xs"></i> Sending...`;
try {
const res = await fetch("/api/otp", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ action: "send", email })
});
const data = await res.json();
if (res.ok && data.success) {
apiOtpHash = data.otpHash;
document.getElementById("api-otp-container").classList.remove("hidden");
feedback.innerHTML = `<span class="text-emerald-400"><i class="fas fa-check-circle"></i> Code sent to <strong>${email}</strong> via noreply@airaaigroup.in!</span>`;
startApiOtpCountdown(600); // 10 minutes
document.getElementById("api-otp-input").focus();
} else {
alert(data.error || "Failed to send verification email. Please try again.");
}
} catch (err) {
console.error("[OTP Send Error]:", err);
alert("Network error while dispatching verification code. Please try again.");
} finally {
verifyBtn.disabled = false;
verifyBtn.innerHTML = originalBtnHtml;
}
}
function startApiOtpCountdown(durationSec) {
clearInterval(apiOtpTimerInterval);
let rem = durationSec;
const timerEl = document.getElementById("api-otp-countdown");
apiOtpTimerInterval = setInterval(() => {
if (rem <= 0) {
clearInterval(apiOtpTimerInterval);
timerEl.textContent = "Expired";
return;
}
rem--;
const m = Math.floor(rem / 60);
const s = rem % 60;
timerEl.textContent = `${m}:${s < 10 ? '0' : ''}${s}`;
}, 1000);
}
// 2. Verify OTP
async function verifyApiOtp() {
const email = document.getElementById("api-email").value.trim().toLowerCase();
const otpInput = document.getElementById("api-otp-input");
const otp = otpInput.value.trim();
const confirmBtn = document.getElementById("api-otp-confirm-btn");
const feedback = document.getElementById("api-otp-feedback");
if (!otp || otp.length < 6) {
alert("Please enter the complete 6-digit verification code.");
otpInput.focus();
return;
}
confirmBtn.disabled = true;
confirmBtn.innerHTML = `<i class="fas fa-spinner fa-spin text-xs"></i>`;
try {
const res = await fetch("/api/otp", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ action: "verify", email, otp, otpHash: apiOtpHash })
});
const data = await res.json();
if (res.ok && data.verified) {
apiVerifiedProof = data.proof;
apiVerifiedEmail = email;
clearInterval(apiOtpTimerInterval);
document.getElementById("api-email").readOnly = true;
document.getElementById("api-email").classList.add("bg-slate-900/50", "text-slate-400");
const verifyBtn = document.getElementById("api-verify-btn");
verifyBtn.className = "px-3.5 py-2.5 sm:py-3 bg-emerald-600/30 text-emerald-400 border border-emerald-500/40 font-bold text-xs rounded-xl flex items-center gap-1.5 cursor-default flex-shrink-0";
verifyBtn.innerHTML = `<i class="fas fa-check-circle"></i> Verified`;
verifyBtn.disabled = true;
document.getElementById("api-verified-status").innerHTML = `<span class="text-emerald-400 font-bold"><i class="fas fa-check-circle"></i> Email Verified</span>`;
document.getElementById("api-otp-container").classList.add("hidden");
} else {
feedback.innerHTML = `<span class="text-rose-400"><i class="fas fa-triangle-exclamation"></i> ${data.error || "Invalid code"}</span>`;
}
} catch (err) {
console.error("[OTP Verify Error]:", err);
feedback.innerHTML = `<span class="text-rose-400">Verification error. Please retry.</span>`;
} finally {
confirmBtn.disabled = false;
confirmBtn.innerHTML = `<i class="fas fa-check text-xs"></i> Confirm`;
}
}
// 3. Slide to Unlock Widget (Rock-Solid Touch & Mouse Tracking)
(function initApiSlider() {
const slider = document.getElementById('api-slider');
const thumb = document.getElementById('api-thumb');
const fill = document.getElementById('api-fill');
const text = document.getElementById('api-slider-text');
if (!slider || !thumb || !fill) return;
let isDragging = false;
let startX = 0;
let isProcessing = false;
const getMaxX = () => slider.offsetWidth - 52;
function onStart(clientX) {
if (isProcessing) return;
isDragging = true;
startX = clientX - thumb.offsetLeft;
thumb.style.transition = 'none';
fill.style.transition = 'none';
}
function onMove(clientX) {
if (!isDragging || isProcessing) return;
const maxX = getMaxX();
let left = clientX - startX;
left = Math.max(4, Math.min(left, maxX));
thumb.style.left = left + 'px';
fill.style.width = (left + 24) + 'px';
text.style.opacity = Math.max(0, 1 - (left / (maxX * 0.7)));
if (left >= maxX - 4) {
isDragging = false;
triggerApiAction();
}
}
function onEnd() {
if (!isDragging || isProcessing) return;
isDragging = false;
resetSlider();
}
function resetSlider() {
thumb.style.transition = 'left 0.3s ease-out';
fill.style.transition = 'width 0.3s ease-out';
thumb.style.left = '4px';
fill.style.width = '0px';
text.style.opacity = '1';
setTimeout(() => {
thumb.style.transition = '';
fill.style.transition = '';
}, 300);
}
// Mouse events
thumb.addEventListener('mousedown', (e) => onStart(e.clientX));
window.addEventListener('mousemove', (e) => onMove(e.clientX));
window.addEventListener('mouseup', onEnd);
// Touch events (mobile friendly)
thumb.addEventListener('touchstart', (e) => onStart(e.touches[0].clientX), { passive: true });
window.addEventListener('touchmove', (e) => onMove(e.touches[0].clientX), { passive: true });
window.addEventListener('touchend', onEnd);
async function triggerApiAction() {
const keyName = document.getElementById("api-key-name").value.trim() || "Default Client";
const model = document.getElementById("api-model-select").value;
const expiry = document.getElementById("api-expiry-select").value;
const email = document.getElementById("api-email").value.trim().toLowerCase();
if (!apiVerifiedProof || apiVerifiedEmail !== email) {
alert("Please verify your email address using the 'Verify Email' button and enter the 6-digit OTP first!");
resetSlider();
document.getElementById("api-email").focus();
return;
}
const modelInfo = API_MODEL_PRICES[model] || API_MODEL_PRICES["aira-flash-1.5"];
if (modelInfo.tier === "pro") {
openApiPaymentModal(model, modelInfo);
resetSlider();
return;
}
isProcessing = true;
text.textContent = "Generating Key...";
thumb.innerHTML = `<i class="fas fa-spinner fa-spin text-xs"></i>`;
try {
const res = await fetch("/api/generate-key", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
keyName,
model,
expiry,
email,
proof: apiVerifiedProof
})
});
const data = await res.json();
if (res.ok && data.success) {
revealGeneratedApiKey(data);
} else {
alert(data.error || "Failed to generate API key.");
}
} catch (err) {
console.error("[Generate Key Error]:", err);
alert("Network error while generating API key.");
} finally {
isProcessing = false;
thumb.innerHTML = `<i class="fas fa-arrow-right text-xs"></i>`;
resetSlider();
}
}
})();
function revealGeneratedApiKey(data) {
const box = document.getElementById("api-result-box");
document.getElementById("api-generated-key-display").textContent = data.apiKey;
document.getElementById("api-result-model-text").textContent = data.model;
document.getElementById("api-result-expiry-text").textContent = data.expiryDate;
document.getElementById("api-result-tier-pill").textContent = data.tier.toUpperCase() + " ACTIVE";
box.classList.remove("hidden");
box.scrollIntoView({ behavior: "smooth", block: "nearest" });
}
function copyGeneratedApiKey() {
const key = document.getElementById("api-generated-key-display").textContent;
const btn = document.getElementById("api-copy-key-btn");
navigator.clipboard.writeText(key).then(() => {
const original = btn.innerHTML;
btn.innerHTML = `<i class="fas fa-check text-xs"></i> Copied!`;
btn.className = "px-3 py-1.5 bg-cyan-600 text-white font-bold text-[10px] sm:text-[11px] rounded-lg transition flex items-center gap-1 flex-shrink-0";
setTimeout(() => {
btn.innerHTML = original;
btn.className = "px-3 py-1.5 bg-emerald-600 hover:bg-emerald-500 text-white font-bold text-[10px] sm:text-[11px] rounded-lg transition flex items-center gap-1 flex-shrink-0";
}, 2500);
});
}
function copyApiCurlCode() {
const code = document.getElementById("api-curl-sample").innerText;
const btn = document.getElementById("copy-curl-btn");
navigator.clipboard.writeText(code).then(() => {
btn.innerHTML = `<i class="fas fa-check text-emerald-400"></i> Copied`;
setTimeout(() => {
btn.innerHTML = `<i class="far fa-copy"></i> Copy`;
}, 2000);
});
}
// 4. Payment Modal Logic
let activePaidModel = null;
let activePaidInfo = null;
function openApiPaymentModal(model, info) {
activePaidModel = model;
activePaidInfo = info;
document.getElementById("payment-modal-model-name").textContent = `${info.label} Monthly Subscription`;
document.getElementById("payment-modal-price").innerHTML = `&#8377;${info.price}`;
const upiBtn = document.getElementById("direct-upi-btn");
if (upiBtn) {
upiBtn.href = `upi://pay?pa=8921584368@ptyes&pn=Adam%20Eehan&am=${info.price}&cu=INR&tn=Aira%20API%20Subscription%20${encodeURIComponent(info.label)}`;
}
document.getElementById("api-payment-modal").classList.remove("hidden");
}
function closeApiPaymentModal() {
document.getElementById("api-payment-modal").classList.add("hidden");
}
async function initiateRazorpayPayment() {
if (!activePaidInfo) return;
const email = document.getElementById("api-email").value.trim().toLowerCase();
const keyName = document.getElementById("api-key-name").value.trim() || "Pro API Client";
const model = activePaidModel || document.getElementById("api-model-select").value;
const btn = document.getElementById("pay-razorpay-btn");
const originalHtml = btn.innerHTML;
btn.disabled = true;
btn.innerHTML = `<i class="fas fa-spinner fa-spin text-xs"></i> Connecting Razorpay...`;
try {
// 1. Create Order via /api/razorpay
const orderRes = await fetch("/api/razorpay", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
action: "create_order",
amount: activePaidInfo.price,
model: activePaidInfo.label,
clientName: keyName,
clientEmail: email
})
});
const orderData = await orderRes.json();
if (!orderRes.ok || !orderData.success) {
throw new Error(orderData.error || "Failed to create Razorpay Order.");
}
const options = {
key: orderData.keyId || "rzp_test_TxofzW5ecpQ1MX",
amount: orderData.order.amount,
currency: orderData.order.currency || "INR",
name: "Aira Group of Technology",
description: `AIRA AI API Monthly Subscription - ${activePaidInfo.label}`,
image: "https://www.airaaigroup.in/assets/logo.png",
order_id: orderData.order.id,
prefill: {
name: keyName,
email: email
},
theme: {
color: "#0a2342"
},
modal: {
ondismiss: function() {
btn.disabled = false;
btn.innerHTML = originalHtml;
}
},
handler: async function(response) {
btn.innerHTML = `<i class="fas fa-spinner fa-spin text-xs"></i> Verifying Payment...`;
try {
// 2. Verify payment signature
const verifyRes = await fetch("/api/razorpay", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
action: "verify_payment",
order_id: response.razorpay_order_id,
payment_id: response.razorpay_payment_id,
signature: response.razorpay_signature
})
});
const verifyData = await verifyRes.json();
if (verifyRes.ok && verifyData.verified) {
await completePaidKeyGeneration(response.razorpay_payment_id);
} else {
alert("Payment verification issue. Fallback key generation in progress.");
await completePaidKeyGeneration(response.razorpay_payment_id);
}
} catch (vErr) {
console.warn("[Verify Error]:", vErr);
await completePaidKeyGeneration(response.razorpay_payment_id);
} finally {
btn.disabled = false;
btn.innerHTML = originalHtml;
}
}
};
if (typeof Razorpay !== "undefined") {
const rzp = new Razorpay(options);
rzp.on('payment.failed', function(resp) {
alert("Payment failed: " + (resp.error ? resp.error.description : "Payment could not be completed"));
btn.disabled = false;
btn.innerHTML = originalHtml;
});
rzp.open();
} else {
alert("Razorpay SDK is loading. You can also pay directly via UPI / QR below!");
btn.disabled = false;
btn.innerHTML = originalHtml;
}
} catch (err) {
console.error("[Razorpay Init Error]:", err);
alert(err.message || "Failed to initialize Razorpay checkout. You can also pay directly via UPI / QR below!");
btn.disabled = false;
btn.innerHTML = originalHtml;
}
}
async function submitUpiPaymentVerification() {
const refInput = document.getElementById("upi-ref-input");
const ref = refInput.value.trim();
if (!ref || ref.length < 6) {
alert("Please enter the UPI Reference / UTR Number or Transaction ID.");
refInput.focus();
return;
}
const confirmBtn = document.getElementById("upi-confirm-btn");
confirmBtn.disabled = true;
confirmBtn.innerHTML = `<i class="fas fa-spinner fa-spin text-xs"></i> Verifying...`;
await completePaidKeyGeneration("upi_ref_" + ref);
confirmBtn.disabled = false;
confirmBtn.innerHTML = `Activate Key`;
}
async function completePaidKeyGeneration(paymentId) {
const keyName = document.getElementById("api-key-name").value.trim() || "Pro Client";
const model = activePaidModel || document.getElementById("api-model-select").value;
const expiry = document.getElementById("api-expiry-select").value;
const email = document.getElementById("api-email").value.trim().toLowerCase();
try {
const res = await fetch("/api/generate-key", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
keyName,
model,
expiry,
email,
proof: apiVerifiedProof,
paymentId
})
});
const data = await res.json();
if (res.ok && data.success) {
closeApiPaymentModal();
revealGeneratedApiKey(data);
} else {
alert(data.error || "Payment verification failed.");
}
} catch (err) {
console.error("[Paid Key Generation Error]:", err);
alert("Network error while generating API key.");
}
}
</script>
</body>
</html>