# 가격

The [roboflow.com/credits](https://roboflow.com/credits) 페이지에는 1 credit이 500초의 추론 시간에 해당한다고 적혀 있습니다. 더 정확한 공식은 다음과 같습니다:

```matlab
x-remote-processing-time 헤더가 설정된 경우:
   credits = (100ms + x-remote-processing-time) / 500,000ms
그 외:
   credits = max(x-processing-time, 100ms) / 500,000ms
```

여기서 `x-processing-time` 및 `x-remote-processing-time` 은(는) float 형식(초)의 HTTP Response 헤더입니다. 자세한 내용은 [roboflow.com/pricing](https://roboflow.com/pricing) 에서 credit 가격을 확인하세요.

### <sub>Model Inference</sub>

아래 예시에서는 [coco/39 model](https://universe.roboflow.com/microsoft/coco/model/39) (RF-DETR Small, 560x560)에서 inference를 실행합니다. 응답 헤더에서 `x-processing-time` 를 찾을 수 있으며, 이는 81ms입니다. 이 경우 `credits = max(81, 100) / 500,000 = 0.0002 credits` 가 되며, 또는 이미지 1000장당 0.2 credits입니다.

```shellscript
curl -X POST "https://serverless.roboflow.com/coco/39?api_key=API_KEY&image=https://media.roboflow.com/notebooks/examples/dog.jpeg" -I
HTTP/2 200 
content-type: application/json
content-length: 995
x-model-cold-start: false
x-model-id: coco/39
x-processing-time: 0.08100700378417969
x-workspace-id: my-workspace-id
```

#### Cold start

같은 요청을 10분 뒤에 다시 실행하면, model이 언로드되어 GPU에 다시 로드해야 할 수 있습니다. 이를 cold start라고 합니다. Model 로딩에는 최대 몇 초가 걸릴 수 있으며, 추론 간의 지연 시간과 매우 높은 상관관계가 있습니다.

```bash
curl -X POST "https://serverless.roboflow.com/coco/39?api_key=API_KEY&image=https://media.roboflow.com/notebooks/examples/dog.jpeg" -I
HTTP/2 200 
content-type: application/json
content-length: 995
x-model-cold-start: true
x-model-id: coco/39
x-model-load-details: [{"m": "coco/39", "t": 0.7791134570725262}]
x-model-load-time: 0.5791134570725262
x-processing-time: 1.1060344696044922
x-workspace-id: my-workspace-id
```

**Formula**: `credits = max(1106, 100)/500,000 = 0.0022` , 또는 **이미지 1000장당 2.2 credits** (cold start) 이미지.

### Workflow run

Workflows의 경우, model inference와 일반 Workflow 처리를 분리합니다. 즉, Workflow 자체는 (더 저렴한) CPU 전용 머신에서 실행되고, model inference에만 GPU 머신을 사용하므로, 더 비용 효율적인 처리가 가능합니다.&#x20;

<figure><img src="https://3958014485-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M6S9nPJhEX9FYH6clfW%2Fuploads%2FXQbvps5GpzFdJBX665lz%2Fworkflow.png?alt=media&#x26;token=47ae4df5-e35b-4470-a383-bffa6f8627d9" alt=""><figcaption><p>2개의 object detection model, dynamic cropping, 여러 visualizations, 그리고 OCR용 Gemini가 포함된 번호판 인식 Workflow</p></figcaption></figure>

```bash
curl --location 'https://serverless.roboflow.com/my-workspace-id/workflows/lpr-workflow' -i \
--header 'Content-Type: application/json' \
--data '{
    "api_key": "API_KEY",
    "inputs": {
        "image": {"type": "url", "value": "https://storage.googleapis.com/com-roboflow-marketing/docs/cars-highway.png"}
    }
}'

HTTP/2 200 
content-type: application/json
content-length: 2277416
x-model-cold-start: false
x-processing-time: 6.334797143936157
x-remote-processing-time: 1.0542614459991455
x-remote-processing-times: [{"m": "vehicle-detection-bz0yu/4", "t": 1.0091230869293213}, {"m": "license-plate-w8chc/1", "t": 0.017786026000976562}, {"m": "license-plate-w8chc/1", "t": 0.01506495475769043}, {"m": "license-plate-w8chc/1", "t": 0.012287378311157227}]
x-workspace-id: my-workspace-id
```

**Formula**: `credits = (100ms + 1054ms)/500,000` , 따라서 **0.0023 credits** 는 처리에 대한 비용이며, Gemini API 호출에 대한 아주 적은 추가 비용이 있습니다(토큰 수에 따라 다름, 자세한 내용은 [roboflow.com/credits](https://roboflow.com/credits)).
