Create Twin
Beta. Twins are enabled per account (403 twins_not_enabled otherwise). Their API is stable: it changes only under a new Kite-Version.
Build a twin from one episode of a Hugging Face LeRobot dataset and the robot in it (source, robot).
A twin costs 25,000 tokens, charged here (402 insufficient_tokens when the balance is short) and refunded in
full if the build ends, failed or canceled, before authoring began (in ingest, environment, decompose or label). The dataset is checked first (the same
checks as /v1/twins/validate), so a twin that cannot work is refused here, for free. Returns 202 with a
queued twin; a twin takes a few hours. Poll GET /v1/twins/, or subscribe to twin.completed /
twin.failed / twin.canceled. Send an Idempotency-Key to make retries safe: a retry with the same key and body
returns the same twin, even while the first request is still in flight.
curl --request POST \
--url https://api.kiteml.com/v1/twins \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"robot": "so101",
"source": {
"repo_id": "lerobot/svla_so101_pickplace",
"type": "huggingface"
}
}
'import requests
url = "https://api.kiteml.com/v1/twins"
payload = {
"robot": "so101",
"source": {
"repo_id": "lerobot/svla_so101_pickplace",
"type": "huggingface"
}
}
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({
robot: 'so101',
source: {repo_id: 'lerobot/svla_so101_pickplace', type: 'huggingface'}
})
};
fetch('https://api.kiteml.com/v1/twins', 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.kiteml.com/v1/twins",
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([
'robot' => 'so101',
'source' => [
'repo_id' => 'lerobot/svla_so101_pickplace',
'type' => 'huggingface'
]
]),
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://api.kiteml.com/v1/twins"
payload := strings.NewReader("{\n \"robot\": \"so101\",\n \"source\": {\n \"repo_id\": \"lerobot/svla_so101_pickplace\",\n \"type\": \"huggingface\"\n }\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://api.kiteml.com/v1/twins")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"robot\": \"so101\",\n \"source\": {\n \"repo_id\": \"lerobot/svla_so101_pickplace\",\n \"type\": \"huggingface\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kiteml.com/v1/twins")
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 \"robot\": \"so101\",\n \"source\": {\n \"repo_id\": \"lerobot/svla_so101_pickplace\",\n \"type\": \"huggingface\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "queued",
"progress": 0.5,
"source": {
"repo_id": "<string>",
"type": "huggingface"
},
"tokens": {
"charged": 123,
"refunded": 123
},
"object": "twin",
"stage": "<string>",
"status_message": "<string>",
"eta_seconds": 123,
"error": {
"code": "<string>",
"message": "<string>",
"resumable": true,
"stage": "<string>"
},
"camera": {
"scene": "<string>",
"wrist": "<string>",
"available": [
"<string>"
]
},
"config": {},
"stages": [
{
"stage": "<string>",
"ok": true,
"attempts": 123,
"seconds": 123,
"measurement": "<string>"
}
],
"download": {
"url": "<string>",
"requires_auth": true,
"filename": "<string>",
"bytes": 123,
"sha256": "<string>",
"scene": "<string>",
"expires_at": "<string>"
},
"webhook_metadata": {},
"created_at": "<string>"
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"details": {}
}
}Authorizations
Headers
Body
Build a digital twin from one episode of a Hugging Face LeRobot dataset. source and robot are required.
The robot in the episode: so100, so101, koch, aloha, wx250s, wxai_biarm, piper, xarm7, panda, panda_ee_state, g1_dex3 or vega_1p. Its recorded joints drive the twin's robot, so it must take as many values per frame as the dataset records (checked free, at create and at /v1/twins/validate)
40Response
The twin, queued
One digital twin.
curl --request POST \
--url https://api.kiteml.com/v1/twins \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"robot": "so101",
"source": {
"repo_id": "lerobot/svla_so101_pickplace",
"type": "huggingface"
}
}
'import requests
url = "https://api.kiteml.com/v1/twins"
payload = {
"robot": "so101",
"source": {
"repo_id": "lerobot/svla_so101_pickplace",
"type": "huggingface"
}
}
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({
robot: 'so101',
source: {repo_id: 'lerobot/svla_so101_pickplace', type: 'huggingface'}
})
};
fetch('https://api.kiteml.com/v1/twins', 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.kiteml.com/v1/twins",
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([
'robot' => 'so101',
'source' => [
'repo_id' => 'lerobot/svla_so101_pickplace',
'type' => 'huggingface'
]
]),
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://api.kiteml.com/v1/twins"
payload := strings.NewReader("{\n \"robot\": \"so101\",\n \"source\": {\n \"repo_id\": \"lerobot/svla_so101_pickplace\",\n \"type\": \"huggingface\"\n }\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://api.kiteml.com/v1/twins")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"robot\": \"so101\",\n \"source\": {\n \"repo_id\": \"lerobot/svla_so101_pickplace\",\n \"type\": \"huggingface\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kiteml.com/v1/twins")
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 \"robot\": \"so101\",\n \"source\": {\n \"repo_id\": \"lerobot/svla_so101_pickplace\",\n \"type\": \"huggingface\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "queued",
"progress": 0.5,
"source": {
"repo_id": "<string>",
"type": "huggingface"
},
"tokens": {
"charged": 123,
"refunded": 123
},
"object": "twin",
"stage": "<string>",
"status_message": "<string>",
"eta_seconds": 123,
"error": {
"code": "<string>",
"message": "<string>",
"resumable": true,
"stage": "<string>"
},
"camera": {
"scene": "<string>",
"wrist": "<string>",
"available": [
"<string>"
]
},
"config": {},
"stages": [
{
"stage": "<string>",
"ok": true,
"attempts": 123,
"seconds": 123,
"measurement": "<string>"
}
],
"download": {
"url": "<string>",
"requires_auth": true,
"filename": "<string>",
"bytes": 123,
"sha256": "<string>",
"scene": "<string>",
"expires_at": "<string>"
},
"webhook_metadata": {},
"created_at": "<string>"
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"details": {}
}
}