Geliştir · No-code otomasyon
Kod yazmadan bir kataloğu otomatikleştirin
Tek cümlede
Kodsuz bir çalıştırma, bir HTTP node'u ile bir ürün fotoğrafı batch'i gönderir, 3 saniye bekler, batch durumunu okur ve URL'leri tablonuza geri yazmadan önce tamamlanana kadar tekrarlar.
- Credits: 2K'da 4 credits · 4K'da 5 credits
- Tipik süre: 1.5–4 min per image
- İşleme: asenkron, polling
Bu sayfadaki her veri şuradan alınmıştır: Photta API dokümantasyonu · kontrol edildi
Bir HTTP node'u, bir bekleme node'u ve bir koşul. n8n, Make veya HTTP konuşabilen herhangi bir araç, tüm bir kataloğu batch endpoint üzerinden işleyebilir.
RESPONSE=$(curl -s -X POST https://api.photta.app/api/v1/ghost-mannequin/batch \
-H "Authorization: Bearer $PHOTTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"product_images": [
{
"image": "https://cdn.yourstore.com/products/jacket-front.jpg",
"back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/shirt-front.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/trousers-front.jpg",
"image_side": "front"
}
],
"style": "3d",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"user_instruction": "closed front, buttoned up",
"brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
}')
ID=$(echo "$RESPONSE" | jq -r '.data.id')const res = await fetch("https://api.photta.app/api/v1/ghost-mannequin/batch", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PHOTTA_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"product_images": [
{
"image": "https://cdn.yourstore.com/products/jacket-front.jpg",
"back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/shirt-front.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/trousers-front.jpg",
"image_side": "front"
}
],
"style": "3d",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"user_instruction": "closed front, buttoned up",
"brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
}),
});
const { data } = await res.json(); // data.id, data.statusimport os, requests
res = requests.post(
"https://api.photta.app/api/v1/ghost-mannequin/batch",
headers={"Authorization": f"Bearer {os.environ['PHOTTA_API_KEY']}"},
json={
"product_images": [
{
"image": "https://cdn.yourstore.com/products/jacket-front.jpg",
"back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/shirt-front.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/trousers-front.jpg",
"image_side": "front"
}
],
"style": "3d",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"user_instruction": "closed front, buttoned up",
"brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
},
)
data = res.json()["data"] # data["id"], data["status"]Nasıl çalışır
Bir e-tablo girer, bir görsel klasörü çıkar
Kataloğu dışa aktarın, bir HTTP node'u yapılandırın, beklemelerle döngüye alın, URL'leri geri yazın.
Adım 1
Kataloğu dışa aktarın
Herkese açık bir görsel URL'sine sahip kıyafet başına bir satır. Bu sütun, batch endpoint'inin ihtiyaç duyduğu tek girdidir.
Adım 2
Bir Photta API anahtarı edinin
Dışa aktarılan iş akışlarının hiçbir sır taşımaması için bunu node gövdesinde değil, otomasyon aracınızın kimlik bilgisi kasasında (credential vault) saklayın.
Adım 3
HTTP node'unu yapılandırın
POST, bearer başlığı ve burada gösterilen JSON body. Dizideki her bir öğe bir kıyafettir; stil alanları hepsine uygulanır.
Adım 4
Beklemelerle döngüye alın
3 saniye bekleyin, batch'i okuyun, durumun tamamlanıp tamamlanmadığını kontrol edin ve tekrar dönün. Bu aralık, dokümantasyonun yayımladığı aralıktır.
Adım 5
Limitlere uyun
Batch boyutu sınırı ve eşzamanlı batch sınırı planınızı takip eder. Bir batch gönderin, bitirin, ardından bir sonrakini gönderin.
Adım 6
URL'leri geri yazın
Batch tamamlandığında, her öğe kendi çıktı URL'sini taşır. Bunları tabloya yazın ve dosyaları aynı çalıştırmada indirin.
Node'lar ve içlerine ne girdiği
Request body, API dokümantasyonunun yayımladığı örnektir; döngü ise dokümante edilmiş polling aralığıdır.
{
"product_images": [
{
"image": "https://cdn.yourstore.com/products/jacket-front.jpg",
"back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/shirt-front.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/trousers-front.jpg",
"image_side": "front"
}
],
"style": "3d",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"user_instruction": "closed front, buttoned up",
"brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
}RESPONSE=$(curl -s -X POST https://api.photta.app/api/v1/ghost-mannequin/batch \
-H "Authorization: Bearer $PHOTTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"product_images": [
{
"image": "https://cdn.yourstore.com/products/jacket-front.jpg",
"back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/shirt-front.jpg",
"image_side": "front"
},
{
"image": "https://cdn.yourstore.com/products/trousers-front.jpg",
"image_side": "front"
}
],
"style": "3d",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"user_instruction": "closed front, buttoned up",
"brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
}')
ID=$(echo "$RESPONSE" | jq -r '.data.id'){
"nodes": [
{
"name": "Wait",
"type": "n8n-nodes-base.wait",
"parameters": {
"amount": 3,
"unit": "seconds"
}
},
{
"name": "Read batch",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://api.photta.app/api/v1/ghost-mannequin/batch/{{ $json.data.batch_id }}"
}
},
{
"name": "Done?",
"type": "n8n-nodes-base.if",
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json.data.status }}",
"value2": "completed"
}
]
}
}
}
]
}# 600 requests per minute per key, fixed window.
# One batch submission plus one poll every 3 seconds is ~21 requests per minute
# per batch in flight, so the concurrency cap binds long before the rate limit.
# On a 429, wait the Retry-After seconds (30 by default) before the next node runs.Geliştiricilerin sıkça sorduğu sorular
Kodsuz çalıştırmalar hakkında sorular
Kod yazmam gerekiyor mu?
Hayır. Buradaki her şey, her otomasyon aracının gönderebileceği bir JSON body içeren bir HTTP isteğidir. Yazacağınız tek metin bu sayfada gösterilen body'dir.
Bir çalıştırmaya kaç görsel sığar?
API batch sınırı Free ve Hobby'de 5, Seller'da 10, Brand'de 25 ve Studio'da 50 görseldir. Daha uzun kataloglar birbiri ardına birkaç batch halinde çalıştırılır.
Bir görsel başarısız olursa ne olur?
Batch'in geri kalanı devam eder. Batch body kaç tanesinin tamamlandığını ve kaç tanesinin başarısız olduğunu bildirir; başarısız öğeler için credits iade edilir.
Bu bir zamanlamaya göre çalışabilir mi?
Evet. İş akışını her gece tetikleyin ve henüz görseli olmayan satırları almasını sağlayın. Polling döngüsü, ister bir kişi ister bir zamanlayıcı başlatsın aynıdır.
Bu Make veya Zapier'de çalışır mı?
Bir başlık ve bir JSON body ile bir HTTP isteği gönderebildiğiniz ve adımlar arasında bekleyebildiğiniz her yerde çalışır. Node adları değişir; üç adım değişmez.
İlgili sayfalar
İlgili okumalar
Yetenekler
Toplu hayalet manken API'si tüm kataloglar için
Tek bir hayalet manken isteğinde çok sayıda kıyafet fotoğrafı gönderin. Öğe başına id'ler, toplu sorgulama ve önceden kredi rezervasyonu. 2K çözünürlükte görsel başına 4 credits.
OkuHızlı başlangıç
Beş dakikadan kısa sürede ilk Photta görseli.
Kayıt olun, bir API anahtarı oluşturun, ilk cURL çağrınızı çalıştırın, tamamlanana kadar yoklayın, sonucu kalıcı hale getirin. Beş adım, uçtan uca belgelenmiş.
OkuRate limits
OkuPricing
Oku
Bu sayfadaki her veri şuradan alınmıştır: Photta API dokümantasyonu · kontrol edildi
Bir geliştirici olmadan bir katalog
Bir HTTP node'u ve bir bekleme. Bu sayfadaki body, dokümantasyonun yayımladığıdır.