{
"data": "ea6abee1-ed4b-4ca8-0000-2c215150bf9e"
}
curl --location 'https://api.spacely.ai/api/v1/generate/standard' \
--header 'X-API-KEY: YOUR_X_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "spacely-v1",
"imageUrl": IMAGE_URL,
"spaceType": "bedroom",
"spaceStyle": "modern",
"spaceColor": "",
"renovateType": "residential",
"styleUrl": "",
"materialsIds": [
"paper_wallpaper",
"particle_board",
"porceline_tile"
]
}'
var myHeaders = new Headers();
myHeaders.append("X-API-KEY", YOUR_X_API_KEY);
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"model": "spacely-v1",
"imageUrl": IMAGE_URL,
"spaceType": "bedroom",
"spaceStyle": "modern",
"spaceColor": "",
"renovateType": "residential",
"styleUrl": "",
"materialsIds": [
"paper_wallpaper",
"particle_board",
"porceline_tile"
]
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.spacely.ai/api/v1/generate/standard", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
let data = JSON.stringify({
"model": "spacely-v1",
"imageUrl": IMAGE_URL,
"spaceType": "bedroom",
"spaceStyle": "modern",
"spaceColor": "",
"renovateType": "residential",
"styleUrl": "",
"materialsIds": [
"paper_wallpaper",
"particle_board",
"porceline_tile"
]
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api.spacely.ai/api/v1/generate/standard',
headers: {
'X-API-KEY': YOUR_X_API_KEY,
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.spacely.ai/api/v1/generate/standard"
method := "POST"
payload := strings.NewReader(`{
"model": "spacely-v1",
"imageUrl": IMAGE_URL
"spaceType": "bedroom",
"spaceStyle": "modern",
"spaceColor": "",
"renovateType": "residential",
"styleUrl": "",
"materialsIds": [
"paper_wallpaper",
"particle_board",
"porceline_tile"
]
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("X-API-KEY", YOUR_API_KEY)
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
import requests
import json
url = "https://api.spacely.ai/api/v1/generate/standard"
payload = json.dumps({
"model": "spacely-v1",
"imageUrl": IMAGE_URL
"spaceType": "bedroom",
"spaceStyle": "modern",
"spaceColor": "",
"renovateType": "residential",
"styleUrl": "",
"materialsIds": [
"paper_wallpaper",
"particle_board",
"porceline_tile"
]
})
headers = {
'X-API-KEY': YOUR_API_KEY,
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)