Run an Instant Model
You can run Roboflow Instant models using the Python SDK and the Serverless Hosted API V2.
To run an Instant model, use the following code:
from inference_sdk import InferenceHTTPClient, InferenceConfiguration
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("image.jpeg", model_id="model-id/1")
print(result)
Above, specify your model ID and API key.
This code will run your model and return the results.
Last updated
Was this helpful?