curl --request POST \
--url https://api.photalabs.com/v2/phota/profiles/add \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"image_urls": [
"https://example.com/photo1.jpg",
"https://storage.googleapis.com/bucket/photo2.jpg?X-Goog-Signature=..."
],
"tag": "user_abc123"
}
'import requests
url = "https://api.photalabs.com/v2/phota/profiles/add"
payload = {
"image_urls": ["https://example.com/photo1.jpg", "https://storage.googleapis.com/bucket/photo2.jpg?X-Goog-Signature=..."],
"tag": "user_abc123"
}
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({
image_urls: [
'https://example.com/photo1.jpg',
'https://storage.googleapis.com/bucket/photo2.jpg?X-Goog-Signature=...'
],
tag: 'user_abc123'
})
};
fetch('https://api.photalabs.com/v2/phota/profiles/add', 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.photalabs.com/v2/phota/profiles/add",
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([
'image_urls' => [
'https://example.com/photo1.jpg',
'https://storage.googleapis.com/bucket/photo2.jpg?X-Goog-Signature=...'
],
'tag' => 'user_abc123'
]),
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://api.photalabs.com/v2/phota/profiles/add"
payload := strings.NewReader("{\n \"image_urls\": [\n \"https://example.com/photo1.jpg\",\n \"https://storage.googleapis.com/bucket/photo2.jpg?X-Goog-Signature=...\"\n ],\n \"tag\": \"user_abc123\"\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://api.photalabs.com/v2/phota/profiles/add")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"image_urls\": [\n \"https://example.com/photo1.jpg\",\n \"https://storage.googleapis.com/bucket/photo2.jpg?X-Goog-Signature=...\"\n ],\n \"tag\": \"user_abc123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.photalabs.com/v2/phota/profiles/add")
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 \"image_urls\": [\n \"https://example.com/photo1.jpg\",\n \"https://storage.googleapis.com/bucket/photo2.jpg?X-Goog-Signature=...\"\n ],\n \"tag\": \"user_abc123\"\n}"
response = http.request(request)
puts response.read_body{
"profile_id": "<string>"
}{
"detail": "<string>",
"code": "NOT_FOUND",
"request_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>",
"code": "INTERNAL_ERROR",
"request_id": "<string>"
}Add Profile
Create a new profile from signed image URLs.
Starts training asynchronously and returns a profile ID immediately.
Poll GET /profiles/{profile_id}/status to check when training completes.
curl --request POST \
--url https://api.photalabs.com/v2/phota/profiles/add \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"image_urls": [
"https://example.com/photo1.jpg",
"https://storage.googleapis.com/bucket/photo2.jpg?X-Goog-Signature=..."
],
"tag": "user_abc123"
}
'import requests
url = "https://api.photalabs.com/v2/phota/profiles/add"
payload = {
"image_urls": ["https://example.com/photo1.jpg", "https://storage.googleapis.com/bucket/photo2.jpg?X-Goog-Signature=..."],
"tag": "user_abc123"
}
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({
image_urls: [
'https://example.com/photo1.jpg',
'https://storage.googleapis.com/bucket/photo2.jpg?X-Goog-Signature=...'
],
tag: 'user_abc123'
})
};
fetch('https://api.photalabs.com/v2/phota/profiles/add', 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.photalabs.com/v2/phota/profiles/add",
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([
'image_urls' => [
'https://example.com/photo1.jpg',
'https://storage.googleapis.com/bucket/photo2.jpg?X-Goog-Signature=...'
],
'tag' => 'user_abc123'
]),
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://api.photalabs.com/v2/phota/profiles/add"
payload := strings.NewReader("{\n \"image_urls\": [\n \"https://example.com/photo1.jpg\",\n \"https://storage.googleapis.com/bucket/photo2.jpg?X-Goog-Signature=...\"\n ],\n \"tag\": \"user_abc123\"\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://api.photalabs.com/v2/phota/profiles/add")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"image_urls\": [\n \"https://example.com/photo1.jpg\",\n \"https://storage.googleapis.com/bucket/photo2.jpg?X-Goog-Signature=...\"\n ],\n \"tag\": \"user_abc123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.photalabs.com/v2/phota/profiles/add")
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 \"image_urls\": [\n \"https://example.com/photo1.jpg\",\n \"https://storage.googleapis.com/bucket/photo2.jpg?X-Goog-Signature=...\"\n ],\n \"tag\": \"user_abc123\"\n}"
response = http.request(request)
puts response.read_body{
"profile_id": "<string>"
}{
"detail": "<string>",
"code": "NOT_FOUND",
"request_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>",
"code": "INTERNAL_ERROR",
"request_id": "<string>"
}Authorizations
Body
Request body for creating a new profile.
Publicly accessible URLs pointing to the training images. Supported formats: JPEG, PNG, WebP, and HEIC/HEIF. Images larger than 4K (4096px) are automatically resized; for best results, provide images at 4K or below. PNG images are transcoded to JPEG (quality 95) for storage efficiency. Image-count range depends on training_tier: "standard" requires 10–50, "fast" requires 5–10.
5 - 50 elementsTraining tier for the profile. "standard" trains on 10–50 images for highest quality; "fast" trains on 5–10 images for quicker turnaround at lower cost.
standard, fast Optional immutable tag to group or namespace this profile (e.g., your end-user's identifier).
1 - 128Personalization model version to train this profile on: "v1" (original) or "v2" (current). Omit to use your account's default (v2 for new accounts). Profiles of different model versions cannot be combined in one /edit, /generate, /enhance, or /remix request.
v1, v2 Response
Successful Response
Response returned after a profile is created.
Unique identifier for the new profile. Use this to poll training status.
