> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/roboflow/roboflow-ko/deploy/serverless-hosted-api-v2/pricing.md).

# 요금

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

```matlab
if x-remote-processing-time 헤더가 설정되어 있으면:
   credits = (100ms + x-remote-processing-time) / 500,000ms
else:
   credits = max(x-processing-time, 100ms) / 500,000ms
```

여기서 `x-processing-time` 및 `x-remote-processing-time` 는 float 형식(초)의 HTTP 응답 헤더입니다. 참조 [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). 응답 헤더에서 `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
```

#### 콜드 스타트

10분 후에 같은 요청을 실행하면 모델이 언로드되었다가 GPU에 다시 로드되어야 할 수 있습니다. 이를 콜드 스타트라고 합니다. 모델 로딩에는 최대 몇 초가 걸릴 수 있으며, 추론 간 지연 시간과 매우 높은 상관관계가 있습니다.

```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
```

**공식**: `credits = max(1106, 100)/500,000 = 0.0022` 또는 **1000장당 2.2 credits** (콜드 스타트) 이미지.

### Workflow 실행

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

<figure><img src="/files/272d3a0963f414fcde5721c66bd9f84ad8edb166" alt=""><figcaption><p>2x object detection model, dynamic cropping, multiple 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://media.roboflow.com/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
```

**공식**: `credits = (100ms + 1054ms)/500,000` , 따라서 **0.0023 credits** 의 처리 비용과, Gemini API 호출에 대한 아주 작은 비용이 추가됩니다(토큰 수에 따라 다름, 참조 [roboflow.com/credits](https://roboflow.com/credits)).
