> ## 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.

# 엔터프라이즈 오픈 소스 모델 사용

> 엔터프라이즈 등급에서 Krea 오픈 소스 모델을 사용하고 사용량을 보고하는 방법입니다.

## 라이선스 구매

오픈 소스 모델 라이선스 구매 방법에 대한 자세한 내용은 [오픈 소스 요금제](https://www.krea.ai/open-source-pricing)를 참고하세요. 월 10,000장을 초과하는 이미지 생성의 경우 엔터프라이즈 라이선스 구매가 필요합니다. 이용하시려면 [영업팀에 문의](https://www.krea.ai/enterprise#contact)해 주세요.

## 사용량 보고

모델을 사용할 때는 반드시 사용량을 보고해야 하며, 최소 월 1회 보고가 필요합니다. Krea에 워크스페이스를 생성하고 API 키를 발급받아야 합니다. 해당 워크스페이스에서 매달 청구서를 받게 됩니다. 아래 예시는 개별 생성마다 Krea의 몫을 `amount_usd`로 보내 사용량을 보고하지만, 비용을 집계하여 월 단위로 전송하는 것도 가능합니다.

선택 사항인 `key` 필드는 멱등성 키입니다. 동일한 키로 재시도하면 같은 `job_id`에 매핑되어 최대 한 번만 청구됩니다.

<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의 몫
      model: "raw",
      generations: 1,
      key: "123456789ABCDEF"  // 선택 사항인 멱등성 키
    }),
  });
  ```

  ```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의 몫
          "model": "raw",
          "generations": 1,
          "key": "123456789ABCDEF"  # 선택 사항인 멱등성 키
      },
  )
  ```
</CodeGroup>
