# What is the param for setting threshold and iou for v2 endpoint?

**URL:** <https://discuss.roboflow.com/t/what-is-the-param-for-setting-threshold-and-iou-for-v2-endpoint/9993>\
**Category:** 🤝  Community Help\
**Created:** [May 24, 2025, 9:27pm UTC](https://discuss.roboflow.com/t/what-is-the-param-for-setting-threshold-and-iou-for-v2-endpoint/9993 "2025-05-24T21:27:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asriel\_Han](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/asriel_han/32/7479_2.png) [@Asriel\_Han](https://discuss.roboflow.com/u/Asriel_Han)\
**Post date:** [May 24, 2025, 9:27pm UTC](https://discuss.roboflow.com/t/what-is-the-param-for-setting-threshold-and-iou-for-v2-endpoint/9993/1 "2025-05-24T21:27:39Z")

</div>

I am following the tutorial here but it’s very vague: [Run an Instant Model | Roboflow Docs](https://docs.roboflow.com/deploy/serverless-hosted-api-v2/run-an-instant-model)

I use the exactly same function header the tutorial suggest to set up confidence threshold but it gives me this error:

InferenceHTTPClient.infer() got an unexpected keyword argument ‘confidence’

Can someone from roboflow tell me where to find it?

---

<div class="post-metadata">

**Author:** ![balthasar](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/balthasar/32/9692_2.png) [@balthasar](https://discuss.roboflow.com/u/balthasar)\
**Post date:** [May 24, 2025, 9:39pm UTC](https://discuss.roboflow.com/t/what-is-the-param-for-setting-threshold-and-iou-for-v2-endpoint/9993/2 "2025-05-24T21:39:47Z")

</div>

Hi Asriel,

Sorry for the troubles. There’s an error in the documentation and you can configure the confidence threshold like this:

```auto
# import the inference-sdk
import time
from inference_sdk import InferenceHTTPClient, InferenceConfiguration

# initialize the client
CLIENT = InferenceHTTPClient(
    api_url="https://serverless.roboflow.com",
    api_key="<Your API Key>",
    
)

configuration = InferenceConfiguration(
    confidence_threshold=0.95
)
CLIENT.configure(configuration)

result = CLIENT.infer("https://media.roboflow.com/inference/people-walking.jpg", model_id="balthasars-workspace/people-instant-8")

print(result)

```

See [here](https://inference.roboflow.com/inference_helpers/inference_sdk/#setting-the-configuration-once-and-using-till-next-change) for more information.

We’ll fix the docs asap. Please let me know if you got it working on your end 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/1X/bb6edbfa56d0cf2ee603f061e9e09103502cc8cc.png) [@system](https://discuss.roboflow.com/u/system)\
**Post date:** [May 31, 2025, 9:40pm UTC](https://discuss.roboflow.com/t/what-is-the-param-for-setting-threshold-and-iou-for-v2-endpoint/9993/3 "2025-05-31T21:40:19Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
