Augmentation environments
Create Environment
Beta. Usable today, but this endpoint can change before it is stable, without a new Kite-Version. Changes are announced before they ship.
POST
/
v1
/
augmentations
/
environments
Create Environment
curl --request POST \
--url https://api.kiteml.com/v1/augmentations/environments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"library_id": "aircraft_workshop_01"
}
'import requests
url = "https://api.kiteml.com/v1/augmentations/environments"
payload = { "library_id": "aircraft_workshop_01" }
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({library_id: 'aircraft_workshop_01'})
};
fetch('https://api.kiteml.com/v1/augmentations/environments', 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/augmentations/environments",
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([
'library_id' => 'aircraft_workshop_01'
]),
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/augmentations/environments"
payload := strings.NewReader("{\n \"library_id\": \"aircraft_workshop_01\"\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/augmentations/environments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"library_id\": \"aircraft_workshop_01\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kiteml.com/v1/augmentations/environments")
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 \"library_id\": \"aircraft_workshop_01\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"kind": "panorama",
"source": "library",
"owner": "kite",
"status": "processing",
"tags": {
"category": "<string>",
"lighting": "daylight",
"blue_red": 123,
"brightness": 123,
"daylight_yaw_deg": 123,
"scenery_depth_m": 123,
"width": 123,
"height": 123
},
"object": "environment",
"library_id": "<string>",
"panorama_url": "<string>",
"world": {
"collider": true,
"metric_scale": 123
},
"license": "<string>",
"attribution": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"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": {}
}
}Authorizations
Headers
Body
application/json
Add an environment from exactly one of: a library panorama (library_id), a photo of your site (photo, with
an optional prompt to guide the completion), a description (prompt alone), or an equirectangular panorama you
already have (panorama). Library and panorama environments are ready at once; photos and prompts take minutes
(status is processing until then).
Response
The environment: ready for a library entry or a panorama, processing for a photo or a prompt
⌘I
Create Environment
curl --request POST \
--url https://api.kiteml.com/v1/augmentations/environments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"library_id": "aircraft_workshop_01"
}
'import requests
url = "https://api.kiteml.com/v1/augmentations/environments"
payload = { "library_id": "aircraft_workshop_01" }
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({library_id: 'aircraft_workshop_01'})
};
fetch('https://api.kiteml.com/v1/augmentations/environments', 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/augmentations/environments",
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([
'library_id' => 'aircraft_workshop_01'
]),
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/augmentations/environments"
payload := strings.NewReader("{\n \"library_id\": \"aircraft_workshop_01\"\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/augmentations/environments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"library_id\": \"aircraft_workshop_01\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kiteml.com/v1/augmentations/environments")
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 \"library_id\": \"aircraft_workshop_01\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"kind": "panorama",
"source": "library",
"owner": "kite",
"status": "processing",
"tags": {
"category": "<string>",
"lighting": "daylight",
"blue_red": 123,
"brightness": 123,
"daylight_yaw_deg": 123,
"scenery_depth_m": 123,
"width": 123,
"height": 123
},
"object": "environment",
"library_id": "<string>",
"panorama_url": "<string>",
"world": {
"collider": true,
"metric_scale": 123
},
"license": "<string>",
"attribution": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"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": {}
}
}