Start the auto control by AI
curl --request POST \
--url https://api.example.com/ai-control/start \
--header 'Content-Type: application/json' \
--data '
{
"model_id": "<string>",
"angle_format": "rad",
"cameras_keys_mapping": {
"context_camera": 1,
"wrist_camera": 0
},
"checkpoint": 500,
"max_angle": 123,
"min_angle": 123,
"prompt": "<string>",
"robot_serials_to_ignore": [
"/dev/ttyUSB0"
],
"selected_camera_id": 123,
"speed": 1,
"verify_cameras": true
}
'import requests
url = "https://api.example.com/ai-control/start"
payload = {
"model_id": "<string>",
"angle_format": "rad",
"cameras_keys_mapping": {
"context_camera": 1,
"wrist_camera": 0
},
"checkpoint": 500,
"max_angle": 123,
"min_angle": 123,
"prompt": "<string>",
"robot_serials_to_ignore": ["/dev/ttyUSB0"],
"selected_camera_id": 123,
"speed": 1,
"verify_cameras": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model_id: '<string>',
angle_format: 'rad',
cameras_keys_mapping: {context_camera: 1, wrist_camera: 0},
checkpoint: 500,
max_angle: 123,
min_angle: 123,
prompt: '<string>',
robot_serials_to_ignore: ['/dev/ttyUSB0'],
selected_camera_id: 123,
speed: 1,
verify_cameras: true
})
};
fetch('https://api.example.com/ai-control/start', 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://api.example.com/ai-control/start",
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([
'model_id' => '<string>',
'angle_format' => 'rad',
'cameras_keys_mapping' => [
'context_camera' => 1,
'wrist_camera' => 0
],
'checkpoint' => 500,
'max_angle' => 123,
'min_angle' => 123,
'prompt' => '<string>',
'robot_serials_to_ignore' => [
'/dev/ttyUSB0'
],
'selected_camera_id' => 123,
'speed' => 1,
'verify_cameras' => true
]),
CURLOPT_HTTPHEADER => [
"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://api.example.com/ai-control/start"
payload := strings.NewReader("{\n \"model_id\": \"<string>\",\n \"angle_format\": \"rad\",\n \"cameras_keys_mapping\": {\n \"context_camera\": 1,\n \"wrist_camera\": 0\n },\n \"checkpoint\": 500,\n \"max_angle\": 123,\n \"min_angle\": 123,\n \"prompt\": \"<string>\",\n \"robot_serials_to_ignore\": [\n \"/dev/ttyUSB0\"\n ],\n \"selected_camera_id\": 123,\n \"speed\": 1,\n \"verify_cameras\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.example.com/ai-control/start")
.header("Content-Type", "application/json")
.body("{\n \"model_id\": \"<string>\",\n \"angle_format\": \"rad\",\n \"cameras_keys_mapping\": {\n \"context_camera\": 1,\n \"wrist_camera\": 0\n },\n \"checkpoint\": 500,\n \"max_angle\": 123,\n \"min_angle\": 123,\n \"prompt\": \"<string>\",\n \"robot_serials_to_ignore\": [\n \"/dev/ttyUSB0\"\n ],\n \"selected_camera_id\": 123,\n \"speed\": 1,\n \"verify_cameras\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/ai-control/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_id\": \"<string>\",\n \"angle_format\": \"rad\",\n \"cameras_keys_mapping\": {\n \"context_camera\": 1,\n \"wrist_camera\": 0\n },\n \"checkpoint\": 500,\n \"max_angle\": 123,\n \"min_angle\": 123,\n \"prompt\": \"<string>\",\n \"robot_serials_to_ignore\": [\n \"/dev/ttyUSB0\"\n ],\n \"selected_camera_id\": 123,\n \"speed\": 1,\n \"verify_cameras\": true\n}"
response = http.request(request)
puts response.read_body{
"ai_control_signal_id": "<string>",
"ai_control_signal_status": "stopped",
"message": "<string>",
"server_info": {
"model_id": "<string>",
"port": 123,
"server_id": 123,
"tcp_socket": [
"<string>",
123
],
"timeout": 123,
"url": "<string>"
},
"status": "ok"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}AI model
Start the auto control by AI
Start the auto control by AI.
POST
/
ai-control
/
start
Start the auto control by AI
curl --request POST \
--url https://api.example.com/ai-control/start \
--header 'Content-Type: application/json' \
--data '
{
"model_id": "<string>",
"angle_format": "rad",
"cameras_keys_mapping": {
"context_camera": 1,
"wrist_camera": 0
},
"checkpoint": 500,
"max_angle": 123,
"min_angle": 123,
"prompt": "<string>",
"robot_serials_to_ignore": [
"/dev/ttyUSB0"
],
"selected_camera_id": 123,
"speed": 1,
"verify_cameras": true
}
'import requests
url = "https://api.example.com/ai-control/start"
payload = {
"model_id": "<string>",
"angle_format": "rad",
"cameras_keys_mapping": {
"context_camera": 1,
"wrist_camera": 0
},
"checkpoint": 500,
"max_angle": 123,
"min_angle": 123,
"prompt": "<string>",
"robot_serials_to_ignore": ["/dev/ttyUSB0"],
"selected_camera_id": 123,
"speed": 1,
"verify_cameras": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model_id: '<string>',
angle_format: 'rad',
cameras_keys_mapping: {context_camera: 1, wrist_camera: 0},
checkpoint: 500,
max_angle: 123,
min_angle: 123,
prompt: '<string>',
robot_serials_to_ignore: ['/dev/ttyUSB0'],
selected_camera_id: 123,
speed: 1,
verify_cameras: true
})
};
fetch('https://api.example.com/ai-control/start', 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://api.example.com/ai-control/start",
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([
'model_id' => '<string>',
'angle_format' => 'rad',
'cameras_keys_mapping' => [
'context_camera' => 1,
'wrist_camera' => 0
],
'checkpoint' => 500,
'max_angle' => 123,
'min_angle' => 123,
'prompt' => '<string>',
'robot_serials_to_ignore' => [
'/dev/ttyUSB0'
],
'selected_camera_id' => 123,
'speed' => 1,
'verify_cameras' => true
]),
CURLOPT_HTTPHEADER => [
"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://api.example.com/ai-control/start"
payload := strings.NewReader("{\n \"model_id\": \"<string>\",\n \"angle_format\": \"rad\",\n \"cameras_keys_mapping\": {\n \"context_camera\": 1,\n \"wrist_camera\": 0\n },\n \"checkpoint\": 500,\n \"max_angle\": 123,\n \"min_angle\": 123,\n \"prompt\": \"<string>\",\n \"robot_serials_to_ignore\": [\n \"/dev/ttyUSB0\"\n ],\n \"selected_camera_id\": 123,\n \"speed\": 1,\n \"verify_cameras\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.example.com/ai-control/start")
.header("Content-Type", "application/json")
.body("{\n \"model_id\": \"<string>\",\n \"angle_format\": \"rad\",\n \"cameras_keys_mapping\": {\n \"context_camera\": 1,\n \"wrist_camera\": 0\n },\n \"checkpoint\": 500,\n \"max_angle\": 123,\n \"min_angle\": 123,\n \"prompt\": \"<string>\",\n \"robot_serials_to_ignore\": [\n \"/dev/ttyUSB0\"\n ],\n \"selected_camera_id\": 123,\n \"speed\": 1,\n \"verify_cameras\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/ai-control/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_id\": \"<string>\",\n \"angle_format\": \"rad\",\n \"cameras_keys_mapping\": {\n \"context_camera\": 1,\n \"wrist_camera\": 0\n },\n \"checkpoint\": 500,\n \"max_angle\": 123,\n \"min_angle\": 123,\n \"prompt\": \"<string>\",\n \"robot_serials_to_ignore\": [\n \"/dev/ttyUSB0\"\n ],\n \"selected_camera_id\": 123,\n \"speed\": 1,\n \"verify_cameras\": true\n}"
response = http.request(request)
puts response.read_body{
"ai_control_signal_id": "<string>",
"ai_control_signal_status": "stopped",
"message": "<string>",
"server_info": {
"model_id": "<string>",
"port": 123,
"server_id": 123,
"tcp_socket": [
"<string>",
123
],
"timeout": 123,
"url": "<string>"
},
"status": "ok"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Body
application/json
Request to start the AI control of the robot.
Response
Successful Response
Response when starting the AI control.
Was this page helpful?