> ## Documentation Index
> Fetch the complete documentation index at: https://www.krea.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Enterprise Open Source Model Usage

> Purchase a Krea open source model license, generate an API key, and report monthly usage for enterprise billing.

## Purchase a License

Refer to our [Open Source Pricing](https://www.krea.ai/open-source-pricing) for details on how to purchase an open source model license. Above 10,000 images generated per month, we require purchase of an Enterprise license. [Contact sales](https://www.krea.ai/enterprise#contact) to get access.

## Reporting Usage

When using a model, ensure you report your usage: we require reporting at least once a month. You will need to create a workspace with us and generate an API key. Inform us so we can onboard your workspace.

Reported usage is billed monthly to the workspace's selected billing account. See [Postpaid Invoicing](/docs/user-guide/help-and-support/postpaid-invoicing) for invoice delivery, payment terms, and where to review invoices in Krea. This example reports usage after every individual generation, sending Krea's total share as `amount_usd`, but it is also acceptable to aggregate generations and report at any frequency.

The optional `key` field is an idempotency key: retries carrying the same key will be billed at most once.

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch("https://api.krea.ai/oss/usage", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.KREA_API_TOKEN}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      amount_usd: 0.0045,     // Krea's total share for these generations
      model: "raw",
      generations: 1,
      key: "123456789ABCDEF"  // Optional idempotency key
    }),
  });
  ```

  ```bash cURL theme={null}
  # `amount_usd`: Krea's total share for these generations
  # `key`: Optional idempotency key
  curl -X POST https://api.krea.ai/oss/usage \
    -H "Authorization: Bearer $KREA_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "amount_usd": 0.0045,
      "model": "raw",
      "generations": 1,
      "key": "123456789ABCDEF"
    }'
  ```

  ```python Python theme={null}
  import os
  import requests

  API_TOKEN = os.environ["KREA_API_TOKEN"]

  response = requests.post(
      "https://api.krea.ai/oss/usage",
      headers={
          "Authorization": f"Bearer {API_TOKEN}",
          "Content-Type": "application/json",
      },
      json={
          "amount_usd": 0.0045,     # Krea's total share for these generations
          "model": "raw",
          "generations": 1,
          "key": "123456789ABCDEF"  # Optional idempotency key
      },
  )
  ```
</CodeGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.