Documentation

Auto-Recharge

Set up automatic credit recharging for AI agents to prevent service interruptions. Configure thresholds and payment methods for uninterrupted operation.

What Is Auto-Recharge?

Auto-recharge automatically adds credits when your balance drops below a threshold. Never worry about service interruptions during critical operations.

How it works:

  1. Set a threshold (e.g., 100 credits)
  2. Choose recharge amount (e.g., $20 pack)
  3. When balance < threshold → Automatic charge + credits added
  4. Continue working without interruption
ℹ️

Auto-recharge uses your saved payment method. Credits are added instantly.


Why Use Auto-Recharge?

Prevent Service Interruptions

Without Auto-Recharge:

Running batch job (10,000 API calls)...
[✓] 5,000 calls completed
[✓] 6,000 calls completed
[✓] 7,000 calls completed
[❌] Balance depleted at call 7,234
[❌] Job failed, data incomplete
[😫] Manual intervention required

With Auto-Recharge:

Running batch job (10,000 API calls)...
[✓] 5,000 calls completed
[✓] 6,000 calls completed
[✓] 7,000 calls completed
[💳] Auto-recharge triggered: +2,000 credits
[✓] 8,000 calls completed
[✓] 9,000 calls completed
[✓] 10,000 calls completed
[✅] Job completed successfully

Peace of Mind

  • Production apps: No downtime for users
  • Long-running jobs: Complete without supervision
  • Weekend projects: Don't check balance constantly
  • Enterprise workflows: Reliable automation

Setup Auto-Recharge

One-command setup: Tell your agent set up skillboss.co/skill.md to auto-configure SkillBoss with 687+ APIs.

Via Console

  1. Go to Console → Billing
  2. Click "Auto-Recharge" tab
  3. Toggle ON
  4. Configure:
    • Threshold: When to trigger (e.g., 100 credits)
    • Amount: How much to add (e.g., $20 pack)
  5. Save

Settings saved automatically. Test with small threshold to verify.

Via API

import requests

response = requests.post(
    "https://api.skillboss.co/v1/billing/auto-topup",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
        "enabled": True,
        "threshold": 100,  # Trigger when balance < 100
        "amount": 2000     # Add $20 worth (~2,000 credits)
    }
)

if response.ok:
    print("✅ Auto-recharge enabled")
else:
    print(f"❌ Failed: {response.json()}")

Check Current Settings:

response = requests.get(
    "https://api.skillboss.co/v1/billing/auto-topup",
    headers={"Authorization": f"Bearer {API_KEY}"}
)

settings = response.json()
print(f"Enabled: {settings['enabled']}")
print(f"Threshold: {settings['threshold']} credits")
print(f"Amount: ${settings['amount']/100}")

Configuration Options

Threshold

When to trigger auto-recharge:

ThresholdBest For
50 creditsSmall projects, testing
100 creditsStandard usage
500 creditsHeavy usage, batch jobs
1000 creditsEnterprise, critical systems

Recommendation: Set threshold to cover 1 hour of your typical usage.

Recharge Amount

How much to add each time:

AmountCreditsBest For
$7.50~750Light users
$12.50~1,250Standard users
$20.00~2,000Regular users ⭐
$28.00~2,800Heavy users

Recommendation: Choose amount that lasts 1 week of typical usage.


Examples

Example 1: Production API

Scenario: Customer-facing chat API with 1,000 daily users

Settings:

Threshold: 500 credits
Amount: $20 (~2,000 credits)

Why:

  • 500 credits = ~2-3 hours of downtime buffer
  • $20 recharge = ~1 week of operations
  • Minimizes recharge frequency
  • Ensures 24/7 availability

Example 2: Data Processing Pipeline

Scenario: Nightly batch job processing 10K records

Settings:

Threshold: 1000 credits
Amount: $28 (~2,800 credits)

Why:

  • 1000 credits = Buffer for full job completion
  • $28 recharge = Multiple job runs
  • Prevents mid-job failures
  • Reliable automation

Example 3: Development Environment

Scenario: Testing and prototyping new features

Settings:

Threshold: 100 credits
Amount: $7.50 (~750 credits)

Why:

  • Low threshold for cost control
  • Small recharge amounts
  • Flexibility to disable anytime
  • Budget-friendly

How It Works Behind the Scenes

Trigger Process

1. API call made
2. Credit deduction
3. Check balance
4. Is balance < threshold?
   ├─ No  → Continue
   └─ Yes → Trigger auto-recharge
      ├─ Charge payment method
      ├─ Add credits instantly
      ├─ Send notification email
      └─ Continue API call

Timing: Entire process takes < 2 seconds. Your API call continues seamlessly.

Email Notifications

You'll receive emails for:

  • ✅ Auto-recharge successful
  • ❌ Auto-recharge failed (card declined)
  • ⚠️ Balance still low after recharge

Example notification:

Subject: Auto-Recharge Successful

Your SkillBoss account was automatically recharged:
- Amount charged: $20.00
- Credits added: 2,000
- New balance: 2,150 credits

Triggered by threshold: 100 credits
Previous balance: 85 credits

View invoice: [link]

Failed Auto-Recharge

Common Causes

  1. Card declined

    • Insufficient funds
    • Card expired
    • Bank fraud prevention
  2. Payment method removed

    • Card deleted from account
    • No active payment method
  3. Billing address issue

    • Address verification failed
    • ZIP code mismatch

What Happens

  1. Auto-recharge attempt fails
  2. Email sent immediately
  3. API calls continue with remaining balance
  4. When balance reaches 0 → Service interruption

How to Fix

Update Payment Method:

  1. Go to Console → Billing
  2. Click "Update Card"
  3. Enter new payment details
  4. Auto-recharge will retry on next trigger

Or disable auto-recharge:

requests.post(
    "https://api.skillboss.co/v1/billing/auto-topup",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={"enabled": False}
)

Cost Control

Set Maximum Monthly Spend

Prevent runaway costs with spending limits:

response = requests.post(
    "https://api.skillboss.co/v1/billing/spending-limit",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
        "monthly_limit": 100000,  # $1000/month max
        "alert_threshold": 0.8     # Alert at 80%
    }
)

What happens at limit:

  • Auto-recharge pauses
  • API calls return 402 Payment Required
  • Email alert sent
  • Limit resets next month

Monitor Auto-Recharge Activity

View recharge history:

response = requests.get(
    "https://api.skillboss.co/v1/billing/auto-topup/history",
    headers={"Authorization": f"Bearer {API_KEY}"}
)

for charge in response.json()["charges"]:
    print(f"{charge['date']}: ${charge['amount']} - {charge['credits']} credits")

Example output:

2026-02-25: $20.00 - 2,000 credits
2026-02-18: $20.00 - 2,000 credits
2026-02-10: $20.00 - 2,000 credits
Total: $60.00 this month

Best Practices

1. Test First

Before relying on auto-recharge:

# Set low threshold for testing
requests.post(..., json={
    "enabled": True,
    "threshold": 10,  # Very low for testing
    "amount": 750     # Small amount
})

# Make some API calls to trigger
# Verify email and credits added
# Then set real thresholds

2. Set Alerts

Monitor your auto-recharge activity:

def check_recharge_frequency():
    history = get_recharge_history()
    recharges_this_week = len([
        r for r in history
        if r['date'] > (datetime.now() - timedelta(days=7))
    ])

    if recharges_this_week > 5:
        alert("⚠️ High recharge frequency - check for issues")

3. Right-Size Your Settings

Threshold too low:

  • ❌ Frequent recharges
  • ❌ More transaction fees
  • ❌ Email spam

Threshold too high:

  • ❌ Large balance sitting unused
  • ❌ Higher upfront cost

Amount too small:

  • ❌ Frequent recharges
  • ❌ More management overhead

Amount too large:

  • ❌ Large upfront cost
  • ❌ Capital tied up

4. Use for Production Only

Development: Disable auto-recharge, add credits manually for cost awareness

Production: Enable auto-recharge for reliability


Disable Auto-Recharge

Via Console

  1. Go to Console → Billing
  2. Click "Auto-Recharge" tab
  3. Toggle OFF
  4. Confirm

Via API

response = requests.post(
    "https://api.skillboss.co/v1/billing/auto-topup",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={"enabled": False}
)

After disabling:

  • Existing balance remains
  • Future charges manual only
  • Can re-enable anytime

FAQ

Does auto-recharge charge immediately?

No. Only when balance drops below your threshold.

Can I change settings anytime?

Yes. Changes take effect immediately for next recharge.

What if my card is declined?

You'll receive an email. Update payment method or add credits manually.

Is there a limit to recharges per month?

No limit, but you can set spending limits to control costs.

Do I get charged while disabled?

No. Auto-recharge only works when enabled.

Can I get a refund if auto-recharge triggered by accident?

Credits are non-refundable, but credits never expire. Contact support for special cases.


Next Steps

📄

Enable Auto-Recharge

Set up automatic top-ups

📄

Pricing & Billing

View all pricing details

📄

Troubleshooting

Payment issues