Create a product-photography shoot
curl --request POST \
--url https://ybhqmgyprapjxomdxifs.supabase.co/functions/v1/api/v1/shoots \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"product_image_urls": [
"<string>"
],
"mode": "product_only",
"model_url": "<string>",
"shots": 4,
"aspect_ratio": "1:1",
"quality": "standard",
"background_color": "<string>",
"callback_url": "<string>"
}
'import requests
url = "https://ybhqmgyprapjxomdxifs.supabase.co/functions/v1/api/v1/shoots"
payload = {
"product_image_urls": ["<string>"],
"mode": "product_only",
"model_url": "<string>",
"shots": 4,
"aspect_ratio": "1:1",
"quality": "standard",
"background_color": "<string>",
"callback_url": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
product_image_urls: ['<string>'],
mode: 'product_only',
model_url: '<string>',
shots: 4,
aspect_ratio: '1:1',
quality: 'standard',
background_color: '<string>',
callback_url: '<string>'
})
};
fetch('https://ybhqmgyprapjxomdxifs.supabase.co/functions/v1/api/v1/shoots', 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://ybhqmgyprapjxomdxifs.supabase.co/functions/v1/api/v1/shoots",
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([
'product_image_urls' => [
'<string>'
],
'mode' => 'product_only',
'model_url' => '<string>',
'shots' => 4,
'aspect_ratio' => '1:1',
'quality' => 'standard',
'background_color' => '<string>',
'callback_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://ybhqmgyprapjxomdxifs.supabase.co/functions/v1/api/v1/shoots"
payload := strings.NewReader("{\n \"product_image_urls\": [\n \"<string>\"\n ],\n \"mode\": \"product_only\",\n \"model_url\": \"<string>\",\n \"shots\": 4,\n \"aspect_ratio\": \"1:1\",\n \"quality\": \"standard\",\n \"background_color\": \"<string>\",\n \"callback_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://ybhqmgyprapjxomdxifs.supabase.co/functions/v1/api/v1/shoots")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"product_image_urls\": [\n \"<string>\"\n ],\n \"mode\": \"product_only\",\n \"model_url\": \"<string>\",\n \"shots\": 4,\n \"aspect_ratio\": \"1:1\",\n \"quality\": \"standard\",\n \"background_color\": \"<string>\",\n \"callback_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ybhqmgyprapjxomdxifs.supabase.co/functions/v1/api/v1/shoots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_image_urls\": [\n \"<string>\"\n ],\n \"mode\": \"product_only\",\n \"model_url\": \"<string>\",\n \"shots\": 4,\n \"aspect_ratio\": \"1:1\",\n \"quality\": \"standard\",\n \"background_color\": \"<string>\",\n \"callback_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "shoot",
"shots": 123,
"shots_adjusted": true,
"credits_used": 123,
"credits_remaining": 123,
"images": [
{
"url": "<string>",
"thumbnail_url": "<string>",
"status": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}API Reference
Create a product-photography shoot
POST
/
v1
/
shoots
Create a product-photography shoot
curl --request POST \
--url https://ybhqmgyprapjxomdxifs.supabase.co/functions/v1/api/v1/shoots \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"product_image_urls": [
"<string>"
],
"mode": "product_only",
"model_url": "<string>",
"shots": 4,
"aspect_ratio": "1:1",
"quality": "standard",
"background_color": "<string>",
"callback_url": "<string>"
}
'import requests
url = "https://ybhqmgyprapjxomdxifs.supabase.co/functions/v1/api/v1/shoots"
payload = {
"product_image_urls": ["<string>"],
"mode": "product_only",
"model_url": "<string>",
"shots": 4,
"aspect_ratio": "1:1",
"quality": "standard",
"background_color": "<string>",
"callback_url": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
product_image_urls: ['<string>'],
mode: 'product_only',
model_url: '<string>',
shots: 4,
aspect_ratio: '1:1',
quality: 'standard',
background_color: '<string>',
callback_url: '<string>'
})
};
fetch('https://ybhqmgyprapjxomdxifs.supabase.co/functions/v1/api/v1/shoots', 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://ybhqmgyprapjxomdxifs.supabase.co/functions/v1/api/v1/shoots",
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([
'product_image_urls' => [
'<string>'
],
'mode' => 'product_only',
'model_url' => '<string>',
'shots' => 4,
'aspect_ratio' => '1:1',
'quality' => 'standard',
'background_color' => '<string>',
'callback_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://ybhqmgyprapjxomdxifs.supabase.co/functions/v1/api/v1/shoots"
payload := strings.NewReader("{\n \"product_image_urls\": [\n \"<string>\"\n ],\n \"mode\": \"product_only\",\n \"model_url\": \"<string>\",\n \"shots\": 4,\n \"aspect_ratio\": \"1:1\",\n \"quality\": \"standard\",\n \"background_color\": \"<string>\",\n \"callback_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://ybhqmgyprapjxomdxifs.supabase.co/functions/v1/api/v1/shoots")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"product_image_urls\": [\n \"<string>\"\n ],\n \"mode\": \"product_only\",\n \"model_url\": \"<string>\",\n \"shots\": 4,\n \"aspect_ratio\": \"1:1\",\n \"quality\": \"standard\",\n \"background_color\": \"<string>\",\n \"callback_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ybhqmgyprapjxomdxifs.supabase.co/functions/v1/api/v1/shoots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_image_urls\": [\n \"<string>\"\n ],\n \"mode\": \"product_only\",\n \"model_url\": \"<string>\",\n \"shots\": 4,\n \"aspect_ratio\": \"1:1\",\n \"quality\": \"standard\",\n \"background_color\": \"<string>\",\n \"callback_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "shoot",
"shots": 123,
"shots_adjusted": true,
"credits_used": 123,
"credits_remaining": 123,
"images": [
{
"url": "<string>",
"thumbnail_url": "<string>",
"status": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
ApiKeyAuthBearerAuth
Body
application/json
Public http(s) URLs of your product image(s).
Available options:
classic, minimal, luxury, loud_luxury, magazine, editorial, avant_garde, element, influencer, lifestyle Available options:
product_only, with_model Required when mode is with_model. A public image URL of the model.
6 is honored only for classic/minimal; otherwise clamped to 4.
Available options:
1, 4, 6 standard = 1 credit/image, pro = 2, 4k = 4.
Available options:
standard, pro, 4k Optional; reserved for push delivery (poll in the meantime).
Response
Shoot created
Example:
"shoot"
Available options:
pending, analyzing, analyzed, generating, completed, failed Present and true when a requested 6 was clamped to 4 (non classic/minimal style).
Show child attributes
Show child attributes
⌘I