> 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/supported-models/roboflow-instant.md).

# Roboflow Instant

Roboflow Instant एक few-shot object detection model है, जो कुछ labeled images के छोटे सेट से मिनटों में train होता है। इसका उद्देश्य तेज़ Proof of Concept काम के लिए है और यह केवल Object Detection projects को सपोर्ट करता है। इसे train करना कैसे है, यह जानें [Roboflow Instant](/roboflow/roboflow-hi/train/roboflow-instant.md).

एक बार train हो जाने पर, एक Instant model उपलब्ध होता है [Serverless Hosted API](/roboflow/roboflow-hi/deploy/serverless-hosted-api-v2.md) किसी भी अन्य Roboflow model की तरह ही उसी endpoint pattern का उपयोग करके।

## इसे कैसे उपयोग करें

आप अपने Roboflow Instant model को उसके model ID (`<project-id>/<version>`), के माध्यम से call करते हैं, ठीक उसी तरह जैसे आप एक Roboflow 3.0 model को call करेंगे। कोई preset/default Instant models नहीं हैं। आपको पहले अपने Workspace में एक train करना होगा।

{% hint style="info" %}
Instant models के लिए Confidence thresholds संवेदनशील हो सकते हैं। Optimal values आमतौर पर 0.85 से 0.99 के बीच होती हैं, जो आपके training set के आकार पर निर्भर करती हैं।
{% endhint %}

## कोड उदाहरण

इंस्टॉल करें [Inference SDK](https://inference.roboflow.com/inference_helpers/inference_sdk/) और [supervision](https://supervision.roboflow.com/):

```bash
pip install inference-sdk supervision
```

अपना [Roboflow API key](https://app.roboflow.com/settings/api) के माध्यम से `API_KEY` environment variable और replace करें `your-instant-model-id/1` को अपने trained Instant model ID से बदलें। नीचे दिया गया script inference चलाता है, response को एक `sv.Detections` object में convert करता है, bounding boxes और labels बनाता है, और annotated image को disk पर लिखता है।

```python
from inference_sdk import InferenceHTTPClient
import os
import cv2
import urllib.request
import supervision as sv

image_url = "https://storage.googleapis.com/com-roboflow-marketing/notebooks/examples/cars-highway.png"
image_path = "cars-highway.png"
urllib.request.urlretrieve(image_url, image_path)

image = cv2.imread(image_path)

client = InferenceHTTPClient(
    api_url="https://serverless.roboflow.com",
    api_key=os.getenv("API_KEY"),
)
results = client.infer(image, model_id="your-instant-model-id/1")

detections = sv.Detections.from_inference(results)

box_annotator = sv.BoxAnnotator()
label_annotator = sv.LabelAnnotator()

annotated_image = box_annotator.annotate(scene=image.copy(), detections=detections)
annotated_image = label_annotator.annotate(scene=annotated_image, detections=detections)

cv2.imwrite("annotated.png", annotated_image)
```

{% hint style="info" %}
सेट करें `api_url` को अपने deployment target से मिलाने के लिए:

* `https://serverless.roboflow.com` Serverless Hosted API के लिए।
* `http://localhost:9001` एक स्थानीय [Inference](https://inference.roboflow.com/) सर्वर।
* आपका [Dedicated Deployment](/roboflow/roboflow-hi/deploy/dedicated-deployments.md) एक private endpoint के लिए URL।
  {% endhint %}

अधिक deployment options और self-hosting के लिए, देखें [Inference documentation](https://inference.roboflow.com/).


---

# 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/supported-models/roboflow-instant.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.
