> 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.md).

# (Legacy) Serverless Hosted API

{% hint style="info" %}
हम **सिफारिश करते हैं** हमारे Serverless Hosted API के V2 का उपयोग करने की। V2 API तेज़ है।\
\
[नए API के साथ शुरुआत करने के लिए Serverless Hosted API V2 के दस्तावेज़ देखें।](/roboflow/roboflow-hi/deploy/serverless-hosted-api-v2.md)
{% endhint %}

## Model Support

{% hint style="warning" %}
नए मॉडल आर्किटेक्चर (जैसे Florence-2, SAM 3, और अन्य) केवल Serverless Hosted API V2 पर उपलब्ध हैं। credit-based plan पर माइग्रेट न किए गए पुराने workspaces को एक `402` त्रुटि मिलेगी जब इन मॉडलों का उपयोग करने का प्रयास किया जाएगा। [अपना plan अपग्रेड करें](/roboflow/roboflow-hi/billing/plans/purchase-a-plan.md) के माध्यम से समर्थित मॉडलों के पूरे सेट तक पहुँचने के लिए [Serverless Hosted API V2](/roboflow/roboflow-hi/deploy/serverless-hosted-api-v2.md).
{% endhint %}

Serverless Hosted API (v1) द्वारा निम्नलिखित model types समर्थित हैं:

| Task Type                                                                                                       | Hosted API (v1) द्वारा समर्थित |
| --------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| [Object Detection](/roboflow/roboflow-hi/deploy/serverless/object-detection.md)                                 | ✅                              |
| [Classification](/roboflow/roboflow-hi/deploy/serverless/classification.md)                                     | ✅                              |
| [Instance Segmentation](/roboflow/roboflow-hi/deploy/serverless/instance-segmentation.md)                       | ✅                              |
| [Semantic Segmentation](/roboflow/roboflow-hi/deploy/serverless/instance-segmentation/semantic-segmentation.md) | ✅                              |
| [Keypoint Detection](/roboflow/roboflow-hi/deploy/serverless/keypoint-detection.md)                             | ✅                              |

## Latency तुलना (v1 बनाम v2)

Serverless Hosted API पर भेजे गए requests की end-to-end latency कई कारकों पर निर्भर करती है:

1. Model architecture, जिसका execution time पर प्रभाव पड़ता है
2. Images का आकार और resolution, जो execution के दौरान upload time और model inference time को प्रभावित करते हैं
3. Network latency और bandwidth, जो request upload time और response download time को प्रभावित करते हैं।
4. किसी भी विशिष्ट समय पर अन्य users द्वारा service subscription और usage, जिसके परिणामस्वरूप queueing latency हो सकती है

<figure><img src="/files/9ecda490ba5d9f82b4de821c04b5f68183cd0ab1" alt=""><figcaption></figcaption></figure>

नीचे दी गई तालिका में हम v1 और v2 Serverless Hosted API के कुछ प्रतिनिधि benchmarks दिखाते हैं। यह end-to-end latency (E2E) के साथ-साथ execution time (Exec) भी दिखाती है। ये आँकड़े केवल जानकारी के लिए हैं, हम users को [हमारे inference benchmark tools](https://inference.roboflow.com/inference_helpers/cli_commands/benchmark/) या अपने स्वयं के custom benchmarks का उपयोग करके अपने स्वयं के benchmarks करने के लिए प्रोत्साहित करते हैं।

<table><thead><tr><th width="176.14410400390625">Model</th><th>V2 (E2E)</th><th>V2 (Exec)</th><th>V1 (E2E)</th><th>V1 (Exec)</th></tr></thead><tbody><tr><td>yolov8x-640</td><td>401 ms</td><td>29 ms</td><td>4084 ms</td><td>821 ms</td></tr><tr><td>yolov8m-640</td><td>757 ms</td><td>21 ms</td><td>572 ms</td><td>265 ms</td></tr><tr><td>yolov8n-640</td><td>384 ms</td><td>17 ms</td><td>312 ms</td><td>63 ms</td></tr><tr><td>yolov8x-1280</td><td>483 ms</td><td>97 ms</td><td>6431 ms</td><td>3032 ms</td></tr><tr><td>yolov8m-1280</td><td>416 ms</td><td>52 ms</td><td>1841 ms</td><td>1006 ms</td></tr><tr><td>yolov8n-1280</td><td>428 ms</td><td>35 ms</td><td>464 ms</td><td>157 ms</td></tr></tbody></table>

हम users को प्रोत्साहित करते हैं कि वे अपने model inferences और workflows के लिए अपने स्वयं के benchmarks चलाएँ ताकि अपने विशिष्ट usecases पर वास्तविक metrics प्राप्त कर सकें।

## सीमाएँ

Serverless Hosted API (v1), विशिष्ट task type की परवाह किए बिना, 5MB तक की files स्वीकार करता है। इस सीमा में, लेकिन केवल इसी तक सीमित नहीं, image file size के साथ संलग्न कोई भी request information शामिल है।

{% hint style="info" %}
उन मामलों में जहाँ requests बहुत बड़ी हों, हम किसी भी संलग्न images का आकार कम करने की सिफारिश करते हैं। आमतौर पर इससे performance खराब नहीं होगी, क्योंकि images प्राप्त होने के बाद भी हमारे servers पर उन्हें model architecture द्वारा स्वीकार किए जाने वाले input size तक अपने-आप छोटा किया जाता है।\
\
हमारे कुछ SDKs, जैसे Python SDK, API पर भेजे जाने से पहले images को model architecture के input size तक अपने-आप छोटा कर देते हैं।
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.roboflow.com/roboflow/roboflow-hi/deploy/serverless.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
