Create bulk annotations from inference
curl --request POST \
--url https://acusight.io/api/data/projects/{id}/inference-annotations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inference_request_id": 123,
"model_version_id": 123,
"predictions": [
{
"detections": [
{
"class_name": "<string>",
"confidence": 0.5,
"geometry": [
[
123
]
],
"class_index": 123
}
],
"image_id": 123
}
],
"overwrite": true
}
'import requests
url = "https://acusight.io/api/data/projects/{id}/inference-annotations"
payload = {
"inference_request_id": 123,
"model_version_id": 123,
"predictions": [
{
"detections": [
{
"class_name": "<string>",
"confidence": 0.5,
"geometry": [[123]],
"class_index": 123
}
],
"image_id": 123
}
],
"overwrite": True
}
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({
inference_request_id: 123,
model_version_id: 123,
predictions: [
{
detections: [{class_name: '<string>', confidence: 0.5, geometry: [[123]], class_index: 123}],
image_id: 123
}
],
overwrite: true
})
};
fetch('https://acusight.io/api/data/projects/{id}/inference-annotations', 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/data/projects/{id}/inference-annotations",
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([
'inference_request_id' => 123,
'model_version_id' => 123,
'predictions' => [
[
'detections' => [
[
'class_name' => '<string>',
'confidence' => 0.5,
'geometry' => [
[
123
]
],
'class_index' => 123
]
],
'image_id' => 123
]
],
'overwrite' => true
]),
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/data/projects/{id}/inference-annotations"
payload := strings.NewReader("{\n \"inference_request_id\": 123,\n \"model_version_id\": 123,\n \"predictions\": [\n {\n \"detections\": [\n {\n \"class_name\": \"<string>\",\n \"confidence\": 0.5,\n \"geometry\": [\n [\n 123\n ]\n ],\n \"class_index\": 123\n }\n ],\n \"image_id\": 123\n }\n ],\n \"overwrite\": true\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/data/projects/{id}/inference-annotations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inference_request_id\": 123,\n \"model_version_id\": 123,\n \"predictions\": [\n {\n \"detections\": [\n {\n \"class_name\": \"<string>\",\n \"confidence\": 0.5,\n \"geometry\": [\n [\n 123\n ]\n ],\n \"class_index\": 123\n }\n ],\n \"image_id\": 123\n }\n ],\n \"overwrite\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://acusight.io/api/data/projects/{id}/inference-annotations")
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 \"inference_request_id\": 123,\n \"model_version_id\": 123,\n \"predictions\": [\n {\n \"detections\": [\n {\n \"class_name\": \"<string>\",\n \"confidence\": 0.5,\n \"geometry\": [\n [\n 123\n ]\n ],\n \"class_index\": 123\n }\n ],\n \"image_id\": 123\n }\n ],\n \"overwrite\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"annotations_created": 123,
"classes_created": 123,
"new_classes": [
"<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
}Datasets & data
Create bulk annotations from inference
Creates annotations from model predictions with auto-class creation
POST
/
data
/
projects
/
{id}
/
inference-annotations
Create bulk annotations from inference
curl --request POST \
--url https://acusight.io/api/data/projects/{id}/inference-annotations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inference_request_id": 123,
"model_version_id": 123,
"predictions": [
{
"detections": [
{
"class_name": "<string>",
"confidence": 0.5,
"geometry": [
[
123
]
],
"class_index": 123
}
],
"image_id": 123
}
],
"overwrite": true
}
'import requests
url = "https://acusight.io/api/data/projects/{id}/inference-annotations"
payload = {
"inference_request_id": 123,
"model_version_id": 123,
"predictions": [
{
"detections": [
{
"class_name": "<string>",
"confidence": 0.5,
"geometry": [[123]],
"class_index": 123
}
],
"image_id": 123
}
],
"overwrite": True
}
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({
inference_request_id: 123,
model_version_id: 123,
predictions: [
{
detections: [{class_name: '<string>', confidence: 0.5, geometry: [[123]], class_index: 123}],
image_id: 123
}
],
overwrite: true
})
};
fetch('https://acusight.io/api/data/projects/{id}/inference-annotations', 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/data/projects/{id}/inference-annotations",
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([
'inference_request_id' => 123,
'model_version_id' => 123,
'predictions' => [
[
'detections' => [
[
'class_name' => '<string>',
'confidence' => 0.5,
'geometry' => [
[
123
]
],
'class_index' => 123
]
],
'image_id' => 123
]
],
'overwrite' => true
]),
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/data/projects/{id}/inference-annotations"
payload := strings.NewReader("{\n \"inference_request_id\": 123,\n \"model_version_id\": 123,\n \"predictions\": [\n {\n \"detections\": [\n {\n \"class_name\": \"<string>\",\n \"confidence\": 0.5,\n \"geometry\": [\n [\n 123\n ]\n ],\n \"class_index\": 123\n }\n ],\n \"image_id\": 123\n }\n ],\n \"overwrite\": true\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/data/projects/{id}/inference-annotations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inference_request_id\": 123,\n \"model_version_id\": 123,\n \"predictions\": [\n {\n \"detections\": [\n {\n \"class_name\": \"<string>\",\n \"confidence\": 0.5,\n \"geometry\": [\n [\n 123\n ]\n ],\n \"class_index\": 123\n }\n ],\n \"image_id\": 123\n }\n ],\n \"overwrite\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://acusight.io/api/data/projects/{id}/inference-annotations")
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 \"inference_request_id\": 123,\n \"model_version_id\": 123,\n \"predictions\": [\n {\n \"detections\": [\n {\n \"class_name\": \"<string>\",\n \"confidence\": 0.5,\n \"geometry\": [\n [\n 123\n ]\n ],\n \"class_index\": 123\n }\n ],\n \"image_id\": 123\n }\n ],\n \"overwrite\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"annotations_created": 123,
"classes_created": 123,
"new_classes": [
"<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 annotations payload
Was this page helpful?
⌘I