Create inference request
curl --request POST \
--url https://acusight.io/api/ml/projects/{id}/inference \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"image_ids": [
123
],
"model_version_id": 123,
"confidence_threshold": 0.5,
"iou_threshold": 0.5
}
'import requests
url = "https://acusight.io/api/ml/projects/{id}/inference"
payload = {
"image_ids": [123],
"model_version_id": 123,
"confidence_threshold": 0.5,
"iou_threshold": 0.5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
image_ids: [123],
model_version_id: 123,
confidence_threshold: 0.5,
iou_threshold: 0.5
})
};
fetch('https://acusight.io/api/ml/projects/{id}/inference', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://acusight.io/api/ml/projects/{id}/inference",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'image_ids' => [
123
],
'model_version_id' => 123,
'confidence_threshold' => 0.5,
'iou_threshold' => 0.5
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://acusight.io/api/ml/projects/{id}/inference"
payload := strings.NewReader("{\n \"image_ids\": [\n 123\n ],\n \"model_version_id\": 123,\n \"confidence_threshold\": 0.5,\n \"iou_threshold\": 0.5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://acusight.io/api/ml/projects/{id}/inference")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"image_ids\": [\n 123\n ],\n \"model_version_id\": 123,\n \"confidence_threshold\": 0.5,\n \"iou_threshold\": 0.5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://acusight.io/api/ml/projects/{id}/inference")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"image_ids\": [\n 123\n ],\n \"model_version_id\": 123,\n \"confidence_threshold\": 0.5,\n \"iou_threshold\": 0.5\n}"
response = http.request(request)
puts response.read_body{
"data": {
"applied_to_images": true,
"completed_at": "<string>",
"confidence_threshold": 123,
"created_at": "<string>",
"error_message": "<string>",
"id": 123,
"image_count": 123,
"image_ids": [
123
],
"iou_threshold": 123,
"model_version_id": 123,
"project_id": 123,
"request_type": "<string>",
"results": [
123
],
"status": "<string>",
"updated_at": "<string>"
},
"error": {
"code": "<string>",
"details": "<string>",
"message": "<string>"
},
"meta": {
"count": 123,
"limit": 123,
"offset": 123,
"total": 123
},
"success": true
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<string>",
"message": "<string>"
},
"meta": {
"count": 123,
"limit": 123,
"offset": 123,
"total": 123
},
"success": true
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<string>",
"message": "<string>"
},
"meta": {
"count": 123,
"limit": 123,
"offset": 123,
"total": 123
},
"success": true
}Models & training
Create inference request
Creates an inference request for the given project and queues it for asynchronous processing.
POST
/
ml
/
projects
/
{id}
/
inference
Create inference request
curl --request POST \
--url https://acusight.io/api/ml/projects/{id}/inference \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"image_ids": [
123
],
"model_version_id": 123,
"confidence_threshold": 0.5,
"iou_threshold": 0.5
}
'import requests
url = "https://acusight.io/api/ml/projects/{id}/inference"
payload = {
"image_ids": [123],
"model_version_id": 123,
"confidence_threshold": 0.5,
"iou_threshold": 0.5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
image_ids: [123],
model_version_id: 123,
confidence_threshold: 0.5,
iou_threshold: 0.5
})
};
fetch('https://acusight.io/api/ml/projects/{id}/inference', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://acusight.io/api/ml/projects/{id}/inference",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'image_ids' => [
123
],
'model_version_id' => 123,
'confidence_threshold' => 0.5,
'iou_threshold' => 0.5
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://acusight.io/api/ml/projects/{id}/inference"
payload := strings.NewReader("{\n \"image_ids\": [\n 123\n ],\n \"model_version_id\": 123,\n \"confidence_threshold\": 0.5,\n \"iou_threshold\": 0.5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://acusight.io/api/ml/projects/{id}/inference")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"image_ids\": [\n 123\n ],\n \"model_version_id\": 123,\n \"confidence_threshold\": 0.5,\n \"iou_threshold\": 0.5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://acusight.io/api/ml/projects/{id}/inference")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"image_ids\": [\n 123\n ],\n \"model_version_id\": 123,\n \"confidence_threshold\": 0.5,\n \"iou_threshold\": 0.5\n}"
response = http.request(request)
puts response.read_body{
"data": {
"applied_to_images": true,
"completed_at": "<string>",
"confidence_threshold": 123,
"created_at": "<string>",
"error_message": "<string>",
"id": 123,
"image_count": 123,
"image_ids": [
123
],
"iou_threshold": 123,
"model_version_id": 123,
"project_id": 123,
"request_type": "<string>",
"results": [
123
],
"status": "<string>",
"updated_at": "<string>"
},
"error": {
"code": "<string>",
"details": "<string>",
"message": "<string>"
},
"meta": {
"count": 123,
"limit": 123,
"offset": 123,
"total": 123
},
"success": true
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<string>",
"message": "<string>"
},
"meta": {
"count": 123,
"limit": 123,
"offset": 123,
"total": 123
},
"success": true
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<string>",
"message": "<string>"
},
"meta": {
"count": 123,
"limit": 123,
"offset": 123,
"total": 123
},
"success": true
}Authorizations
JWT access token. Paste the token only; the Bearer prefix is added automatically.
Path Parameters
Project ID
Body
application/json
Inference request payload
Was this page helpful?