Skip to main content
This page explains how usage and billing work for AI Websites built with Runable. Runable separates build-time costs from run-time costs so you can develop freely and scale only when your website gets real traffic.

Two types of usage

AI Websites have two distinct usage layers:
  1. Credit usage — for building and editing websites
  2. Infrastructure usage — for running websites in production

Adding AI Features to Your Website

When you create an AI website, you can add AI-powered features for your visitors. Here’s how credits work when your website users interact with AI.

What You Get

Built-in AI Gateway Access:
  • Your website comes with a unique API key (AI_GATEWAY_API_KEY)
  • Pre-configured access to 13+ AI models (GPT-5, Claude, Gemini)
  • Your users can interact with AI directly through your website
  • You pay only for what your users consume
What This Enables:
  • AI chatbots on your website
  • Image generation tools
  • Content creation features
  • Virtual try-on experiences
  • AI-powered search and recommendations
  • Custom AI features you build

How Credits Work

Credit System:
  • You are charged based on your website visitors’ AI usage
  • Credits deducted automatically when users make AI requests
  • Minimum charge: 1 credit per request
Real Example:
Your website visitor asks AI chatbot a question:
- Input: 500 tokens (user's question)
- Output: 1,000 tokens (AI's answer)
- Model: Claude Haiku
- Credits charged: 5.5 → 6 credits

How Billing Works

Automatic Tracking:
  1. Your website user interacts with AI feature
  2. Request sent using your website’s API key
  3. System checks your credit balance
  4. If sufficient credits → request processed
  5. Usage calculated (tokens counted)
  6. Credits deducted from your account
  7. Usage logged for your records
Credit Balance Protection:
  • Balance checked before processing request
  • If insufficient credits → request blocked (HTTP 402 error)
  • Your users see error message (you can customize it)
  • No partial charges (all-or-nothing)
Billing Organization:
  • Each website gets its own billing organization
  • Separate credit pool per website (optional)
  • Track usage independently across your websites

What Your Users Experience

When Credits Are Available:
  • AI features work seamlessly
  • Fast responses (streaming support)
  • Access to multiple AI models
  • Real-time interactions
When Credits Run Out:
  • AI features stop working
  • HTTP 402 error returned
  • Your website can show custom message:
    • “AI features temporarily unavailable”
    • “Please try again later”
    • Or redirect to upgrade page
Error Handling:
// Your website can catch errors
try {
  const response = await fetch('/api/gateway/v1/chat/completions', {
    headers: { 'Authorization': `Bearer ${AI_GATEWAY_API_KEY}` }
  });
} catch (error) {
  if (error.status === 402) {
    // Show "service unavailable" message
  }
  if (error.status === 429) {
    // Show "rate limit exceeded" message
  }
}

Cost Management

Optimize Your Costs:
  1. Use Cheaper Models:
    • Haiku for simple tasks (10x cheaper than Opus)
    • Instant models for quick responses
    • Reserve expensive models for complex tasks
  2. Cache Prompts:
    • Reuse context to save 90% on cached tokens
    • System handles caching automatically
  3. Set Token Limits:
    • Limit max output tokens per request
    • Prevents runaway generation costs

Frequently asked questions

No. Credits are only used during AI generation or AI editing.
No. Manual edits are free.
No. Manual edits are free.
Yes. Unpublishing or deleting a website stops infrastructure usage.
Credits are shared across your account. Infrastructure usage is tracked per website.
Runable is designed so you can build confidently and only pay when users actually use your website.