Skip to main content

API Usage Billing

The API usage section at the Billing page helps you monitor your API credit balance, view detailed usage logs, and manage your billing preferences for API requests.

How to Access

  1. Go to Settings in the left sidebar.
  2. Under Organization, select Billing.
  3. Click the API usage tab.

API Credit Usage

API Usage

  • Credit Balance: Shows your current available API credits. API credits are required for making API requests.
  • Purchase API Credits: Click this button to buy more credits as needed.
  • Auto Recharge: You can enable or disable auto recharge. If auto recharge is off and your balance reaches $0, API requests will not be processed.

Tip: Click Auto recharge settings to configure automatic top-ups for your API credits.

Auto Recharge

Auto Recharge

Auto recharge helps ensure your API requests are never interrupted due to a low credit balance. When enabled, your account will automatically purchase additional API credits when your balance drops below a specified threshold.

To configure auto recharge:

  1. Click Auto recharge settings on the API usage page.
  2. Toggle Enable auto recharge on or off.
  3. Set the threshold for When credit balance goes below (e.g., $5). The minimum allowed is $5.
  4. Set the Recharge amount (e.g., $15). The minimum allowed is $15.
  5. Click Save to apply your settings.

When your credit balance falls below the threshold you set, the specified recharge amount will be automatically purchased and added to your balance.

Note: If auto recharge is off and your balance reaches $0, your API requests will not be processed.

Usage Logs

The usage logs table provides a detailed record of your API activity of your organization, including:

  • Timestamp: When the API request was made.
  • API Type: The endpoint called (e.g., generate_sql).
  • Question / SQL: The natural language question or SQL query sent.
  • Project ID: The project associated with the request.
  • Thread ID: The thread context for the request.
  • Cost: The number of credits consumed by the request.

For more information on API credits and billing, visit the Wren AI Pricing page for the latest pricing details. You can also contact support if you have billing questions.