> 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-hi/deploy/serverless-hosted-api-v2/pricing.md).

# मूल्य निर्धारण

यह [roboflow.com/credits](https://roboflow.com/credits) पेज में बताया गया है कि 1 credit 500 सेकंड के inference time के बराबर होता है। एक अधिक सटीक formula निम्नलिखित है:

```matlab
यदि x-remote-processing-time header सेट है:
   credits = (100ms + x-remote-processing-time) / 500,000ms
else:
   credits = max(x-processing-time, 100ms) / 500,000ms
```

जहाँ `x-processing-time` और `x-remote-processing-time` HTTP Response headers हैं, float format (seconds) में। देखें [roboflow.com/pricing](https://roboflow.com/pricing) क्रेडिट मूल्य निर्धारण के लिए।

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

नीचे दिए गए example में, हम पर inference चलाते हैं [coco/39 model](https://universe.roboflow.com/microsoft/coco/model/39) (RF-DETR Small, 560x560). Response headers में हम पा सकते हैं `x-processing-time` , जो 81ms है। इस case में, हमारे पास होगा `credits = max(81, 100) / 500,000 = 0.0002 credits` , या 1000 images पर 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

यदि आप वही request 10 मिनट बाद चलाते हैं, तो यह हो सकता है कि model unload हो गया हो और उसे फिर से GPU पर load करने की जरूरत पड़े - एक cold start। Model loading में कुछ सेकंड तक लग सकते हैं, और यह inferences के बीच की देरी के साथ अत्यधिक संबंधित होता है।

```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 images पर 2.2 credits** (cold start) images.

### Workflow run

Workflows के लिए, हम model inference को सामान्य Workflow processing से अलग करते हैं। इसका मतलब है कि Workflow स्वयं (सस्ते) केवल-CPU machines पर execute होगा, और model inference के लिए केवल GPU machines का उपयोग करेगा, जिसके परिणामस्वरूप अधिक लागत-प्रभावी processing होगी।

<figure><img src="/files/d908fe13377d6925807b32540b7cda2c0dfa2154" alt=""><figcaption><p>2x object detection model, dynamic cropping, multiple visualizations, और OCR के लिए Gemini के साथ license plate recognition 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
```

**Formula**: `credits = (100ms + 1054ms)/500,000` , इसलिए **0.0023 credits** processing के लिए, और Gemini API call के लिए कुछ बहुत छोटी amount (token count पर निर्भर करती है, देखें [roboflow.com/credits](https://roboflow.com/credits)).
