> ## 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 to api.krea.ai/oss/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. In that workspace you will receive an invoice from us each month. This example reports usage after every individual generation, sending Krea's share as `amount_usd`, but it is also acceptable to aggregate the cost and send it monthly.

The optional `key` field is an idempotency key: retries carrying the same key map to the same `job_id` and bill 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 share for these generations
      model: "raw",
      generations: 1,
      key: "123456789ABCDEF"  // optional idempotency key
    }),
  });
  ```

  ```bash cURL theme={null}
  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 share for these generations
          "model": "raw",
          "generations": 1,
          "key": "123456789ABCDEF"  # optional idempotency key
      },
  )
  ```
</CodeGroup>
