Aize Platform LogoAize Platform Docs

API Keys Management

Create, manage, and monitor your API keys

API Keys Management

API keys are used to authenticate your applications when making requests to the Aize Platform.

Creating an API Key

Prerequisites

  • Minimum $5 wallet balance required
  • If balance is insufficient, you'll see a deposit prompt

Steps

  1. Click "Create API Key" button

  2. Fill in the required information:

    • Label: Human-readable name (e.g., "Production App", "Testing")
    • Monthly Limit (optional): Maximum spending per month in USD
    • Allowed Models (optional): Restrict key to specific models
    • Scope: Personal or Team (Team only available for Admins/Owners)
  3. Click "Create"

  4. ⚠️ IMPORTANT: Copy the API key immediately - it's shown only once!

Key Scopes

Personal Keys

  • Created by any member
  • Visible only to creator
  • Cannot be shared with team
  • Usage tracked individually
  • Perfect for personal projects

Team Keys (Admins/Owners only)

  • Visible to all admins/owners
  • Shared across organization
  • Usage appears in team analytics
  • Ideal for production services

API Key Details

Each API key card displays:

Basic Information

  • Masked Key: sk-****...last8chars
  • Copy Button: Click to copy full masked key
  • Label: Your custom name
  • Created: Date and time of creation
  • Created By: Member who created it (name + email)
  • Last Used: Most recent API call timestamp

Usage & Limits

Monthly Usage Progress Bar

  • Shows current month's spending
  • Format: $X.XX / $Y.YY (Z%)
  • Automatically resets on 1st of each month
  • Color codes:
    • Green: < 75% of limit
    • Yellow: 75-90% of limit
    • Red: > 90% of limit

When monthly limit is reached:

  • API returns 402 Payment Required
  • Key automatically works again next month
  • Or increase the limit anytime

Model Restrictions

If you've restricted the key to specific models:

  • Allowed Models badge appears
  • Hover to see list of permitted models
  • Requests to other models return 403 Forbidden

Managing API Keys

Block a Key

Temporarily disable a key without deleting it:

  1. Click "Block" button on key card
  2. Confirm action
  3. Key immediately stops working
  4. All requests return 401 Unauthorized

Use cases:

  • Suspicious activity detected
  • Key leaked or compromised
  • Temporarily pause a service

To unblock:

  1. Click "Unblock" button
  2. Key immediately works again

Revoke a Key

Permanently delete an API key:

  1. Click "Revoke" button
  2. Confirm deletion
  3. Key is permanently deleted
  4. Cannot be recovered

⚠️ Warning: This action cannot be undone!

Use when:

  • Key is no longer needed
  • Replacing with a new key
  • Confirmed security breach

Usage Tracking

Monitor how your keys are being used:

Per-Key Analytics

View in Request Logs page:

  1. Navigate to Request Logs
  2. Filter by API key
  3. See all requests made with that key:
    • Timestamp
    • Model used
    • Tokens consumed
    • Cost per request
    • Latency
    • Success/error status

Monthly Spending

Track spending per key:

  • Current month's total
  • Progress towards limit (if set)
  • Historical spend (view past months)

Security Best Practices

Key Storage

DO:

  • Store keys in environment variables
  • Use secret management services (AWS Secrets Manager, HashiCorp Vault)
  • Rotate keys regularly
  • Use different keys for dev/staging/production

DON'T:

  • Commit keys to version control
  • Share keys in Slack/email
  • Hardcode in application code
  • Use same key across all environments

Key Rotation

Recommended schedule:

  • Production keys: Every 90 days
  • Development keys: Every 180 days
  • Immediately: If key is compromised

Steps to rotate:

  1. Create new API key
  2. Update environment variables in your app
  3. Deploy updated configuration
  4. Verify new key works
  5. Revoke old key

Monitoring

Set up alerts for:

  • High usage: Approaching monthly limit
  • Unusual patterns: Spike in requests
  • Errors: Increased error rate
  • New locations: Requests from unexpected IPs (if tracking)

API Key Permissions by Role

ActionMemberAdminOwner
Create personal key
Create team key
View own keys
View all team keys
Block own keys
Block team keys
Revoke own keys
Revoke team keys

Common Issues

"Insufficient Balance" Error

Problem: Cannot create API key due to low wallet balance

Solution:

  1. Click "Deposit" in the error modal
  2. Add minimum $5 to wallet
  3. Try creating key again

"Monthly Limit Exceeded"

Problem: Key stops working mid-month

Solution:

  1. Go to API Keys page
  2. Find the affected key
  3. Click key card to expand
  4. Increase monthly limit
  5. Or wait until next month for automatic reset

"Invalid API Key"

Problem: API returns 401 Unauthorized

Possible causes:

  • Key was revoked
  • Key was blocked
  • Wrong key format
  • Organization is frozen

Solution:

  1. Check key status in dashboard
  2. Verify wallet balance > $0
  3. Ensure correct key is being used
  4. Create new key if needed

Using API Keys

See Quick Start Guide for code examples using your API keys.

Basic usage:

Authorization Header
Authorization: Bearer YOUR_API_KEY

Or:

X-API-Key Header
x-api-key: YOUR_API_KEY

Next Steps

On this page