> 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 work के लिए है और यह केवल Object Detection projects को support करता है। इसे 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) उसी endpoint pattern का उपयोग करके, जैसे किसी अन्य Roboflow model के लिए किया जाता है।

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

आप अपने Roboflow Instant model को उसके per-model `{workspace}/{model-slug}` ID (देखें [Versions, Trainings, and Models](/roboflow/roboflow-hi/train/versions-trainings-and-models.md)), उसी तरह जैसे आप Roboflow 3.0 model को call करते हैं।

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

## कोड नमूना

{% stepper %}
{% step %}

### अपनी API Key प्राप्त करें

एक Roboflow खाता बनाएं, अपनी key यहाँ पर ढूँढें [Roboflow API settings page](https://app.roboflow.com/settings/api) और इसे अपने shell में उपलब्ध कराएँ:

```bash
export ROBOFLOW_API_KEY="your-key-here"
```

{% endstep %}

{% step %}

### निर्भरताएँ इंस्टॉल करें

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

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

{% endstep %}

{% step %}

### मॉडल चलाएँ

यह उदाहरण सार्वजनिक [rf-bolts](https://universe.roboflow.com/erik-pe6au/rf-bolts) Roboflow Instant model (screw, flat-washer, hex-nut), छोटे labeled set से few-shot तरीके से train किया गया। अपना खुद का `{workspace}/{model-slug}` अपने train किए गए Instant model के लिए।

```python
import os
import cv2
import numpy as np
import requests
import supervision as sv
from inference_sdk import InferenceHTTPClient

content = requests.get("https://media.roboflow.com/docs/bolts.jpg").content
image = cv2.imdecode(np.frombuffer(content, np.uint8), cv2.IMREAD_COLOR)

client = InferenceHTTPClient(
    api_url="https://serverless.roboflow.com",
    api_key=os.environ["ROBOFLOW_API_KEY"],
)
results = client.infer(image, model_id="erik-pe6au/bolts-uzqzc-instant-1")

detections = sv.Detections.from_inference(results)

annotated_image = sv.BoxAnnotator().annotate(image.copy(), detections)

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

<figure><img src="/files/ab0e921ce6cdfcc0b29407269e0650a803ed5d3d" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

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

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

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