> ## Documentation Index
> Fetch the complete documentation index at: https://edenai-docs-github-copilot-integration.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Buying Credits & Auto-Refill

> Eden AI uses a pay-per-use credit system. Every API response includes a cost field showing the charge in USD for that request, so you always know exactly what you are spending.

export const TechArticleSchema = ({title, description, path, articleSection, about, proficiencyLevel = "Beginner", dependencies, keywords = [], datePublished, dateModified, image, inLanguage = "en"}) => {
  const baseUrl = "https://www.edenai.co/docs";
  const canonicalUrl = `${baseUrl}/${path}`.replace(/\/+$/, "");
  const ogParams = new URLSearchParams({
    division: articleSection || "",
    title: title || "",
    description: description || ""
  });
  const resolvedImage = image || `https://edenai.mintlify.app/_mintlify/api/og?${ogParams.toString()}`;
  const data = {
    "@context": "https://schema.org",
    "@type": "TechArticle",
    "@id": `${canonicalUrl}#techarticle`,
    mainEntityOfPage: {
      "@type": "WebPage",
      "@id": canonicalUrl
    },
    headline: title,
    name: title,
    description: description,
    url: canonicalUrl,
    inLanguage: inLanguage,
    isPartOf: {
      "@type": "WebSite",
      name: "Eden AI Documentation",
      url: baseUrl
    },
    author: [{
      "@type": "Organization",
      name: "Eden AI",
      url: "https://www.edenai.co/"
    }],
    publisher: {
      "@type": "Organization",
      name: "Eden AI",
      url: "https://www.edenai.co/",
      logo: {
        "@type": "ImageObject",
        url: "https://www.edenai.co/assets/logo.png"
      }
    }
  };
  if (articleSection) data.articleSection = articleSection;
  if (about) data.about = {
    "@type": "Thing",
    name: about
  };
  if (proficiencyLevel) data.proficiencyLevel = proficiencyLevel;
  if (dependencies) data.dependencies = dependencies;
  if (keywords && keywords.length) data.keywords = keywords;
  if (datePublished) data.datePublished = datePublished;
  if (dateModified) data.dateModified = dateModified;
  data.image = Array.isArray(resolvedImage) ? resolvedImage : [resolvedImage];
  const json = JSON.stringify(data);
  const schemaId = `techarticle-${canonicalUrl}`;
  React.useEffect(() => {
    if (typeof document === "undefined") return;
    document.querySelectorAll(`script[data-schema-id="${schemaId}"]`).forEach(n => n.remove());
    const script = document.createElement("script");
    script.type = "application/ld+json";
    script.dataset.schemaId = schemaId;
    script.textContent = json;
    document.head.appendChild(script);
    return () => script.remove();
  }, [json, schemaId]);
  return null;
};

<TechArticleSchema title={"Buying Credits & Auto-Refill"} description={"Eden AI uses a pay-per-use credit system. Every API response includes a cost field showing the charge in USD for that request, so you always know exactly what you are spending."} path="v3/general/buying-credits" articleSection="General" about={"API Configuration"} proficiencyLevel="Intermediate" keywords={["Eden AI", "AI API", "rate limits", "billing", "monitoring"]} datePublished="2026-05-06T00:00:00Z" dateModified="2026-06-11T00:00:00Z" />

Eden AI uses a **pay-per-use credit system**. Every API response includes a `cost` field showing the charge in USD for that request, so you always know exactly what you are spending.

## Purchasing Credits

1. Log in to the [Eden AI dashboard](https://app.edenai.run/).
2. Navigate to the billing section.
3. Choose the amount of credits to purchase.
4. Complete the payment.

Credits are added to your account immediately and are shared across all your API tokens.

## Payment Methods

You can add a card or PayPal to your account, or pay by bank transfer:

| Method                   | Details                                              |
| ------------------------ | ---------------------------------------------------- |
| **Credit or debit card** | Visa, Mastercard, Amex · Apple Pay & Google Pay      |
| **PayPal**               | Pay with your PayPal account                         |
| **Bank transfer**        | Wire transfer, no card required (pay at checkout)    |
| **AWS Marketplace**      | Buy credits through your AWS account *(coming soon)* |

## Auto-Refill

To avoid service interruptions, you can enable **auto-refill**:

1. Go to the billing section in the dashboard.
2. Enable auto-refill.
3. Set a **threshold** — the minimum balance that triggers a top-up.
4. Set a **refill amount** — how many credits to add when the threshold is reached.

When your balance drops below the threshold, credits are purchased automatically using your payment method on file.

<Tip>
  Auto-refill is strongly recommended for production applications. A depleted balance causes API requests to fail with a `402 Payment Required` error.
</Tip>

## Postpaid Billing (Monthly Invoice)

By default, accounts are **prepaid**: you top up credits and usage draws them down. Larger teams can instead switch to **postpaid** billing, where usage accrues over the month and is settled by invoice (default payment terms: 30 days) rather than paid up front.

Postpaid accounts can set an optional **monthly spend limit** to cap usage and avoid surprises. Once the limit is reached, further requests are blocked until the next billing period.

<Note>
  Postpaid billing is arranged with the Eden AI team as part of an Advanced AI Platform / Enterprise plan. [Contact us](https://www.edenai.co/pricing) to enable it for your organisation.
</Note>

## Checking Your Balance

You can check your current credit balance in the [Eden AI dashboard](https://app.edenai.run/) or programmatically via the [monitoring endpoint](/v3/general/monitoring).

## Understanding Costs

Every API response includes a `cost` field:

```json theme={null}
{
  "results": { "..." : "..." },
  "cost": 0.002
}
```

This is the amount in USD deducted from your balance for that request.

## Insufficient Credits

If your balance reaches zero, API requests return a `402 Payment Required` error:

```json theme={null}
{
  "error": "Insufficient credits"
}
```

To resolve this, purchase more credits or enable auto-refill.
