# Serverless Hosted API

Roboflow पर डिप्लॉय किए गए मॉडल्स के लिए एक REST API उपलब्ध है, जिसके माध्यम से आप images पर inference चला सकते हैं। यह deployment method उन environments के लिए आदर्श है जहाँ आपके deployment device पर एक persistent internet connection उपलब्ध हो।

आप Serverless Hosted API का उपयोग कर सकते हैं:

* [Workflows में](/roboflow/roboflow-hi/deploy/serverless-hosted-api-v2/use-in-a-workflow.md)
* [REST API के साथ](/roboflow/roboflow-hi/deploy/serverless-hosted-api-v2/use-with-the-rest-api.md)
* के साथ [Inference Python SDK](/roboflow/roboflow-hi/deploy/serverless-hosted-api-v2/use-with-python-sdk.md)

### Inference server

हमारी Serverless Hosted API को [Inference Server](https://inference.roboflow.com/api/) द्वारा power किया गया है। इसका मतलब है कि आप नीचे दिखाए अनुसार आसानी से हमारी Serverless Hosted API और self-hosting option के बीच और vice versa स्विच कर सकते हैं:

```python
from inference_sdk import InferenceHTTPClient

CLIENT = InferenceHTTPClient(
    # api_url="http://localhost:9001" # Self-hosted Inference server
    api_url="https://serverless.roboflow.com", # हमारी Serverless hosted API
    api_key="API_KEY" # अपने private models और data तक पहुँचने के लिए वैकल्पिक
)

result = CLIENT.infer("image.jpg", model_id="model-id/1")
print(result)
```

### सीमाएँ

हमारी Serverless Hosted API 20MB तक के file uploads का समर्थन करती है। आपको higher resolution images के साथ सीमाओं का सामना करना पड़ सकता है। यदि आपको कोई समस्या आती है, तो कृपया अपने enterprise support contact से संपर्क करें या [forum](https://discuss.roboflow.com).

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

***

यह हमारी Serverless Hosted API का V2 है। देखें [Serverless Hosted API v1](/roboflow/roboflow-hi/deploy/serverless.md) v1 (legacy) API documentation के लिए।


---

# Agent Instructions: 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:

```
GET https://docs.roboflow.com/roboflow/roboflow-hi/deploy/serverless-hosted-api-v2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
