Start Recording Episode
curl --request POST \
--url https://api.example.com/recording/start \
--header 'Content-Type: application/json' \
--data '
{
"add_metadata": {
"bbox_position": [
0.5,
1,
0,
0.5
]
},
"branch_path": "<string>",
"cameras_ids_to_record": [
0,
1
],
"dataset_name": "example_dataset",
"enable_rerun_visualization": false,
"episode_format": "lerobot_v2.1",
"freq": 30,
"instruction": "Pick up the orange brick and put it in the black box.",
"leader_arm_ids": [
"/dev/ttyUSB0"
],
"robot_serials_to_ignore": [
"/dev/ttyUSB0"
],
"save_cartesian": false,
"target_video_size": [
320,
240
],
"video_codec": "avc1"
}
'import requests
url = "https://api.example.com/recording/start"
payload = {
"add_metadata": { "bbox_position": [0.5, 1, 0, 0.5] },
"branch_path": "<string>",
"cameras_ids_to_record": [0, 1],
"dataset_name": "example_dataset",
"enable_rerun_visualization": False,
"episode_format": "lerobot_v2.1",
"freq": 30,
"instruction": "Pick up the orange brick and put it in the black box.",
"leader_arm_ids": ["/dev/ttyUSB0"],
"robot_serials_to_ignore": ["/dev/ttyUSB0"],
"save_cartesian": False,
"target_video_size": [320, 240],
"video_codec": "avc1"
}
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({
add_metadata: {bbox_position: [0.5, 1, 0, 0.5]},
branch_path: '<string>',
cameras_ids_to_record: [0, 1],
dataset_name: 'example_dataset',
enable_rerun_visualization: false,
episode_format: 'lerobot_v2.1',
freq: 30,
instruction: 'Pick up the orange brick and put it in the black box.',
leader_arm_ids: ['/dev/ttyUSB0'],
robot_serials_to_ignore: ['/dev/ttyUSB0'],
save_cartesian: false,
target_video_size: [320, 240],
video_codec: 'avc1'
})
};
fetch('https://api.example.com/recording/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/recording/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([
'add_metadata' => [
'bbox_position' => [
0.5,
1,
0,
0.5
]
],
'branch_path' => '<string>',
'cameras_ids_to_record' => [
0,
1
],
'dataset_name' => 'example_dataset',
'enable_rerun_visualization' => false,
'episode_format' => 'lerobot_v2.1',
'freq' => 30,
'instruction' => 'Pick up the orange brick and put it in the black box.',
'leader_arm_ids' => [
'/dev/ttyUSB0'
],
'robot_serials_to_ignore' => [
'/dev/ttyUSB0'
],
'save_cartesian' => false,
'target_video_size' => [
320,
240
],
'video_codec' => 'avc1'
]),
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/recording/start"
payload := strings.NewReader("{\n \"add_metadata\": {\n \"bbox_position\": [\n 0.5,\n 1,\n 0,\n 0.5\n ]\n },\n \"branch_path\": \"<string>\",\n \"cameras_ids_to_record\": [\n 0,\n 1\n ],\n \"dataset_name\": \"example_dataset\",\n \"enable_rerun_visualization\": false,\n \"episode_format\": \"lerobot_v2.1\",\n \"freq\": 30,\n \"instruction\": \"Pick up the orange brick and put it in the black box.\",\n \"leader_arm_ids\": [\n \"/dev/ttyUSB0\"\n ],\n \"robot_serials_to_ignore\": [\n \"/dev/ttyUSB0\"\n ],\n \"save_cartesian\": false,\n \"target_video_size\": [\n 320,\n 240\n ],\n \"video_codec\": \"avc1\"\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/recording/start")
.header("Content-Type", "application/json")
.body("{\n \"add_metadata\": {\n \"bbox_position\": [\n 0.5,\n 1,\n 0,\n 0.5\n ]\n },\n \"branch_path\": \"<string>\",\n \"cameras_ids_to_record\": [\n 0,\n 1\n ],\n \"dataset_name\": \"example_dataset\",\n \"enable_rerun_visualization\": false,\n \"episode_format\": \"lerobot_v2.1\",\n \"freq\": 30,\n \"instruction\": \"Pick up the orange brick and put it in the black box.\",\n \"leader_arm_ids\": [\n \"/dev/ttyUSB0\"\n ],\n \"robot_serials_to_ignore\": [\n \"/dev/ttyUSB0\"\n ],\n \"save_cartesian\": false,\n \"target_video_size\": [\n 320,\n 240\n ],\n \"video_codec\": \"avc1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/recording/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 \"add_metadata\": {\n \"bbox_position\": [\n 0.5,\n 1,\n 0,\n 0.5\n ]\n },\n \"branch_path\": \"<string>\",\n \"cameras_ids_to_record\": [\n 0,\n 1\n ],\n \"dataset_name\": \"example_dataset\",\n \"enable_rerun_visualization\": false,\n \"episode_format\": \"lerobot_v2.1\",\n \"freq\": 30,\n \"instruction\": \"Pick up the orange brick and put it in the black box.\",\n \"leader_arm_ids\": [\n \"/dev/ttyUSB0\"\n ],\n \"robot_serials_to_ignore\": [\n \"/dev/ttyUSB0\"\n ],\n \"save_cartesian\": false,\n \"target_video_size\": [\n 320,\n 240\n ],\n \"video_codec\": \"avc1\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"status": "ok"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Recording
Start Recording Episode
Asynchronously start recording an episode in the background. Output format is chosen when stopping the recording.
POST
/
recording
/
start
Start Recording Episode
curl --request POST \
--url https://api.example.com/recording/start \
--header 'Content-Type: application/json' \
--data '
{
"add_metadata": {
"bbox_position": [
0.5,
1,
0,
0.5
]
},
"branch_path": "<string>",
"cameras_ids_to_record": [
0,
1
],
"dataset_name": "example_dataset",
"enable_rerun_visualization": false,
"episode_format": "lerobot_v2.1",
"freq": 30,
"instruction": "Pick up the orange brick and put it in the black box.",
"leader_arm_ids": [
"/dev/ttyUSB0"
],
"robot_serials_to_ignore": [
"/dev/ttyUSB0"
],
"save_cartesian": false,
"target_video_size": [
320,
240
],
"video_codec": "avc1"
}
'import requests
url = "https://api.example.com/recording/start"
payload = {
"add_metadata": { "bbox_position": [0.5, 1, 0, 0.5] },
"branch_path": "<string>",
"cameras_ids_to_record": [0, 1],
"dataset_name": "example_dataset",
"enable_rerun_visualization": False,
"episode_format": "lerobot_v2.1",
"freq": 30,
"instruction": "Pick up the orange brick and put it in the black box.",
"leader_arm_ids": ["/dev/ttyUSB0"],
"robot_serials_to_ignore": ["/dev/ttyUSB0"],
"save_cartesian": False,
"target_video_size": [320, 240],
"video_codec": "avc1"
}
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({
add_metadata: {bbox_position: [0.5, 1, 0, 0.5]},
branch_path: '<string>',
cameras_ids_to_record: [0, 1],
dataset_name: 'example_dataset',
enable_rerun_visualization: false,
episode_format: 'lerobot_v2.1',
freq: 30,
instruction: 'Pick up the orange brick and put it in the black box.',
leader_arm_ids: ['/dev/ttyUSB0'],
robot_serials_to_ignore: ['/dev/ttyUSB0'],
save_cartesian: false,
target_video_size: [320, 240],
video_codec: 'avc1'
})
};
fetch('https://api.example.com/recording/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/recording/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([
'add_metadata' => [
'bbox_position' => [
0.5,
1,
0,
0.5
]
],
'branch_path' => '<string>',
'cameras_ids_to_record' => [
0,
1
],
'dataset_name' => 'example_dataset',
'enable_rerun_visualization' => false,
'episode_format' => 'lerobot_v2.1',
'freq' => 30,
'instruction' => 'Pick up the orange brick and put it in the black box.',
'leader_arm_ids' => [
'/dev/ttyUSB0'
],
'robot_serials_to_ignore' => [
'/dev/ttyUSB0'
],
'save_cartesian' => false,
'target_video_size' => [
320,
240
],
'video_codec' => 'avc1'
]),
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/recording/start"
payload := strings.NewReader("{\n \"add_metadata\": {\n \"bbox_position\": [\n 0.5,\n 1,\n 0,\n 0.5\n ]\n },\n \"branch_path\": \"<string>\",\n \"cameras_ids_to_record\": [\n 0,\n 1\n ],\n \"dataset_name\": \"example_dataset\",\n \"enable_rerun_visualization\": false,\n \"episode_format\": \"lerobot_v2.1\",\n \"freq\": 30,\n \"instruction\": \"Pick up the orange brick and put it in the black box.\",\n \"leader_arm_ids\": [\n \"/dev/ttyUSB0\"\n ],\n \"robot_serials_to_ignore\": [\n \"/dev/ttyUSB0\"\n ],\n \"save_cartesian\": false,\n \"target_video_size\": [\n 320,\n 240\n ],\n \"video_codec\": \"avc1\"\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/recording/start")
.header("Content-Type", "application/json")
.body("{\n \"add_metadata\": {\n \"bbox_position\": [\n 0.5,\n 1,\n 0,\n 0.5\n ]\n },\n \"branch_path\": \"<string>\",\n \"cameras_ids_to_record\": [\n 0,\n 1\n ],\n \"dataset_name\": \"example_dataset\",\n \"enable_rerun_visualization\": false,\n \"episode_format\": \"lerobot_v2.1\",\n \"freq\": 30,\n \"instruction\": \"Pick up the orange brick and put it in the black box.\",\n \"leader_arm_ids\": [\n \"/dev/ttyUSB0\"\n ],\n \"robot_serials_to_ignore\": [\n \"/dev/ttyUSB0\"\n ],\n \"save_cartesian\": false,\n \"target_video_size\": [\n 320,\n 240\n ],\n \"video_codec\": \"avc1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/recording/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 \"add_metadata\": {\n \"bbox_position\": [\n 0.5,\n 1,\n 0,\n 0.5\n ]\n },\n \"branch_path\": \"<string>\",\n \"cameras_ids_to_record\": [\n 0,\n 1\n ],\n \"dataset_name\": \"example_dataset\",\n \"enable_rerun_visualization\": false,\n \"episode_format\": \"lerobot_v2.1\",\n \"freq\": 30,\n \"instruction\": \"Pick up the orange brick and put it in the black box.\",\n \"leader_arm_ids\": [\n \"/dev/ttyUSB0\"\n ],\n \"robot_serials_to_ignore\": [\n \"/dev/ttyUSB0\"\n ],\n \"save_cartesian\": false,\n \"target_video_size\": [\n 320,\n 240\n ],\n \"video_codec\": \"avc1\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"status": "ok"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Body
application/json
Request to start the recording of an episode.
Format to save the episode.
json is compatible with OpenVLA and stores videos as a series of npy.
lerobot_v2 is compatible with lerobot training..If None, defaults to the value set in Admin Configuration.
Available options:
json, lerobot_v2, lerobot_v2.1 Example:
"lerobot_v2.1"
Was this page helpful?