Yetenek · Giyim
Sanal try-on API'si giyim için
Tek cümlede
Photta'nın sanal try-on API'si düz zemin giysi görseli, bir manken ID'si ve bir poz ID'si alır ve 2K veya 4K model üzerinde çekim döndürür. İşi POST edin, her 3–5 saniyede bir sorgulayın (poll), durum completed olduğunda indirin.
- Tipik süre: 1.5–4 min
- Credits: 2K'da 5 credits · 4K'da 6 credits
- İşleme: asenkron, polling
- Sınırlar: 600 istek/dk
- Kimlik doğrulama: Bearer anahtarı
Bu sayfadaki her veri şuradan alınmıştır: Photta API dokümantasyonu · kontrol edildi
RESPONSE=$(curl -s -X POST https://api.photta.app/api/v1/tryon/apparel \
-H "Authorization: Bearer $PHOTTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"product_type": "top",
"product_images": [
"https://cdn.yourstore.com/products/shirt-front.jpg"
],
"product_back_image": "https://cdn.yourstore.com/products/shirt-back.jpg",
"product_category": "t_shirt",
"mannequin_id": "mnk_f3a9b1",
"pose_id": "pose_c2d4e5",
"background": "https://cdn.yourstore.com/backgrounds/studio-loft.jpg",
"lock_background": true,
"resolution": "2K",
"aspect_ratio": "3:4",
"body_size": "M",
"expression": "neutral",
"user_instruction": "Keep the collar pattern crisp and centered."
}')
ID=$(echo "$RESPONSE" | jq -r '.data.id')const res = await fetch("https://api.photta.app/api/v1/tryon/apparel", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PHOTTA_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"product_type": "top",
"product_images": [
"https://cdn.yourstore.com/products/shirt-front.jpg"
],
"product_back_image": "https://cdn.yourstore.com/products/shirt-back.jpg",
"product_category": "t_shirt",
"mannequin_id": "mnk_f3a9b1",
"pose_id": "pose_c2d4e5",
"background": "https://cdn.yourstore.com/backgrounds/studio-loft.jpg",
"lock_background": true,
"resolution": "2K",
"aspect_ratio": "3:4",
"body_size": "M",
"expression": "neutral",
"user_instruction": "Keep the collar pattern crisp and centered."
}),
});
const { data } = await res.json(); // data.id, data.statusimport os, requests
res = requests.post(
"https://api.photta.app/api/v1/tryon/apparel",
headers={"Authorization": f"Bearer {os.environ['PHOTTA_API_KEY']}"},
json={
"product_type": "top",
"product_images": [
"https://cdn.yourstore.com/products/shirt-front.jpg"
],
"product_back_image": "https://cdn.yourstore.com/products/shirt-back.jpg",
"product_category": "t_shirt",
"mannequin_id": "mnk_f3a9b1",
"pose_id": "pose_c2d4e5",
"background": "https://cdn.yourstore.com/backgrounds/studio-loft.jpg",
"lock_background": True,
"resolution": "2K",
"aspect_ratio": "3:4",
"body_size": "M",
"expression": "neutral",
"user_instruction": "Keep the collar pattern crisp and centered."
},
)
data = res.json()["data"] # data["id"], data["status"]
Genel bakış
Genel bakış
- Endpoint
- POST /api/v1/tryon/apparel
- Kimlik doğrulama
- Bearer API anahtarı
- İşleme
- Asenkron — durum endpoint'ini sorgulayın (poll)
- Tipik süre
- 1.5–4 min
- Credits
- 2K'da 5 credits · 4K'da 6 credits
- En-boy oranları
- 3:4 · 1:1 · 4:3 · 9:16 · 16:9
- Girdi sınırları
- Görsel başına en fazla 10 MB; JPEG, PNG, WebP
- Idempotent
- Hayır
İstek ve yanıt
İstek
RESPONSE=$(curl -s -X POST https://api.photta.app/api/v1/tryon/apparel \
-H "Authorization: Bearer $PHOTTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"product_type": "top",
"product_images": [
"https://cdn.yourstore.com/products/shirt-front.jpg"
],
"product_back_image": "https://cdn.yourstore.com/products/shirt-back.jpg",
"product_category": "t_shirt",
"mannequin_id": "mnk_f3a9b1",
"pose_id": "pose_c2d4e5",
"background": "https://cdn.yourstore.com/backgrounds/studio-loft.jpg",
"lock_background": true,
"resolution": "2K",
"aspect_ratio": "3:4",
"body_size": "M",
"expression": "neutral",
"user_instruction": "Keep the collar pattern crisp and centered."
}')
ID=$(echo "$RESPONSE" | jq -r '.data.id')const res = await fetch("https://api.photta.app/api/v1/tryon/apparel", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PHOTTA_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"product_type": "top",
"product_images": [
"https://cdn.yourstore.com/products/shirt-front.jpg"
],
"product_back_image": "https://cdn.yourstore.com/products/shirt-back.jpg",
"product_category": "t_shirt",
"mannequin_id": "mnk_f3a9b1",
"pose_id": "pose_c2d4e5",
"background": "https://cdn.yourstore.com/backgrounds/studio-loft.jpg",
"lock_background": true,
"resolution": "2K",
"aspect_ratio": "3:4",
"body_size": "M",
"expression": "neutral",
"user_instruction": "Keep the collar pattern crisp and centered."
}),
});
const { data } = await res.json(); // data.id, data.statusimport os, requests
res = requests.post(
"https://api.photta.app/api/v1/tryon/apparel",
headers={"Authorization": f"Bearer {os.environ['PHOTTA_API_KEY']}"},
json={
"product_type": "top",
"product_images": [
"https://cdn.yourstore.com/products/shirt-front.jpg"
],
"product_back_image": "https://cdn.yourstore.com/products/shirt-back.jpg",
"product_category": "t_shirt",
"mannequin_id": "mnk_f3a9b1",
"pose_id": "pose_c2d4e5",
"background": "https://cdn.yourstore.com/backgrounds/studio-loft.jpg",
"lock_background": True,
"resolution": "2K",
"aspect_ratio": "3:4",
"body_size": "M",
"expression": "neutral",
"user_instruction": "Keep the collar pattern crisp and centered."
},
)
data = res.json()["data"] # data["id"], data["status"]202 Accepted / Completed
{
"data": {
"id": "try_abc123",
"status": "processing",
"product_type": "top",
"mannequin_id": "mnk_f3a9b1",
"pose_id": "pose_c2d4e5",
"lock_background": true,
"resolution": "2K",
"aspect_ratio": "3:4",
"credits_used": 5,
"created_at": "2026-04-10T12:00:00Z"
},
"request_id": "req_xyz789"
}{
"data": {
"id": "try_abc123",
"status": "completed",
"product_type": "top",
"mannequin_id": "mnk_f3a9b1",
"pose_id": "pose_c2d4e5",
"resolution": "2K",
"aspect_ratio": "3:4",
"output_url": "https://cdn.photta.app/generated/try_abc123.jpg",
"thumbnail_url": "https://cdn.photta.app/generated/try_abc123-thumb.jpg",
"credits_used": 5,
"created_at": "2026-04-10T12:00:00Z",
"completed_at": "2026-04-10T12:01:15Z",
"duration_ms": 75000
},
"request_id": "req_abc001"
}İstek parametreleri
product_typeTür: stringZorunlu
Type of garment.
Değerler:topbottomtop_and_bottomone_pieceproduct_imagesTür: array[string]Zorunlu
Array of image URLs or base64 data URIs. The first entry is the FRONT image and is required. Not used when product_type is "top_and_bottom".
product_back_imageTür: string
Optional URL or base64 data URI for the BACK of the garment. When supplied, the pipeline auto-switches to the back image whenever the selected pose is back-facing (Back / BackCloseUp). Not used when product_type is "top_and_bottom".
top_imageTür: string
Front image of the top garment. Required when product_type is "top_and_bottom".
top_back_imageTür: string
Optional back image of the top garment. Auto-selected on back-facing poses when present.
bottom_imageTür: string
Front image of the bottom garment. Required when product_type is "top_and_bottom".
bottom_back_imageTür: string
Optional back image of the bottom garment. Auto-selected on back-facing poses when present.
mannequin_idTür: stringZorunlu
ID of the mannequin to wear the garment. Use GET /api/v1/mannequins to list available options.
pose_idTür: stringZorunlu
ID of the pose. Use GET /api/v1/poses to list available options. The pose dictates the framing of the output — what's in frame, whether the face/feet are visible, full body vs half body, etc.
backgroundTür: string
Optional URL or base64 data URI to a background photo. Anything that is not a URL or data: URI is rejected with HTTP 400. When omitted, an editorial neutral backdrop is used.
lock_backgroundTür: boolean
When true, the supplied background image is reproduced faithfully (locked) instead of being treated as loose inspiration. Requires the background field — returns 400 if set without a background. Echoed back in the response object.
= false
resolutionTür: string
Output resolution. 4K cannot be combined with aspect_ratio 1:1 — that combination returns 400.
= 2K
Değerler:2K4Kaspect_ratioTür: string
Output aspect ratio. 1:1 cannot be combined with resolution 4K — that combination returns 400.
= 3:4
Değerler:3:41:14:39:1616:9body_sizeTür: string
Body size of the mannequin.
= M
Değerler:XSSMLXLXXLexpressionTür: string
Facial expression.
= neutral
Değerler:neutralhappyserioussmilingfootwear_urlTür: string
URL or base64 of a custom footwear image. The pipeline always stages the footwear when supplied; the prompt's pose-authority block decides whether to render it (poses that don't show feet drop it cleanly).
user_instructionTür: string
Free-form refinement, e.g. "preserve the seam pattern across the shoulder", "keep the collar contrast strong". Capped at 500 characters server-side; longer strings are silently truncated. Useful for brand-specific details that need an extra nudge.
product_categoryTür: string
Optional silhouette anchor for the garment (e.g. "t_shirt", "jeans", "blazer", "midi_dress"). Helps disambiguate the structure of the garment when the silhouette is ambiguous from the photo alone. Used for product_type "top", "bottom", and "one_piece".
top_categoryTür: string
Silhouette anchor for the top half. Only valid when product_type is "top_and_bottom".
bottom_categoryTür: string
Silhouette anchor for the bottom half. Only valid when product_type is "top_and_bottom".
lengthTür: string
Garment length key for product_type "top", "bottom", or "one_piece". List available values with GET /api/v1/garment-attributes?type=length&garment_type={product_type}.
fitTür: string
Garment fit key for product_type "top", "bottom", or "one_piece". List available values with GET /api/v1/garment-attributes?type=fit&garment_type={product_type}.
top_lengthTür: string
Top length key. Only valid when product_type is "top_and_bottom". List with GET /api/v1/garment-attributes?type=length&garment_type=top.
top_fitTür: string
Top fit key. Only valid when product_type is "top_and_bottom". List with GET /api/v1/garment-attributes?type=fit&garment_type=top.
bottom_lengthTür: string
Bottom length key. Only valid when product_type is "top_and_bottom". List with GET /api/v1/garment-attributes?type=length&garment_type=bottom.
bottom_fitTür: string
Bottom fit key. Only valid when product_type is "top_and_bottom". List with GET /api/v1/garment-attributes?type=fit&garment_type=bottom.
Hatalar
- 400
invalid_request_error - The request is malformed or contains invalid parameters.
- 401
authentication_error - The API key is missing, invalid, or expired.
- 402
insufficient_credits_error - Your account does not have enough credits.
- 404
not_found_error - The requested resource does not exist.
- 409
conflict_error - The request conflicts with current state — e.g. your concurrent-batch cap is reached.
- 429
rate_limit_error - Too many requests. Slow down and retry.Retry-After: 30
- 500
api_error - An internal server error occurred. Retry later.
Sınırlar
- API anahtarı başına dakikada 600 istek (Sabit pencere; limit her planda aynıdır)
- 429 yanıtı Retry-After: 30 saniye içerir
- Görsel başına en fazla 10 MB
- Formatlar: JPEG, PNG, WebP
- Plan başına eşzamanlı toplu işlem: Free 1 · Hobby 2 · Seller 3 · Brand 4 · Studio 6
- Yalnızca polling — API webhook göndermez.
Beş adım, tek bir ürün fotoğrafı
Bir manken seçin, işi gönderin, tamamlanana kadar polling yapın, sonucu indirin.
Adım 1
Bir API anahtarı oluşturun
ai.photta.app adresinden kaydolun, Developers sekmesini açın, Generate API key butonuna tıklayın. Canlı anahtarlar `photta_live_` ile başlar. Anahtarı `PHOTTA_API_KEY` içine koyun — asla commit etmeyin.
Adım 2
Bir manken ve poz seçin
Kullanılabilir seçenekleri listelemek için GET `/api/v1/mannequins` yapın. Kadraj için GET `/api/v1/poses` kullanın. Her iki ID de try-on isteğine eklenir.
Adım 3
Try-on işini POST edin
`/api/v1/tryon/apparel` adresine `product_type`, `product_images`, `mannequin_id`, `pose_id` ve isteğe bağlı `resolution` ile `aspect_ratio` içeren bir POST gönderin. API, bir üretim ID'si ile birlikte 202 Accepted döner.
Adım 4
İş tamamlanana kadar polling yapın
Her 3 saniyede bir GET `/api/v1/tryon/apparel/:id` yapın. `data.status` değeri `completed` olduğunda payload `output_url` ve `thumbnail_url` içerir. Takılan bir işin isteğinizi askıda bırakmaması için bir üst sınır koyun.
Adım 5
İndirin ve kalıcı hale getirin
Baytları `output_url` üzerinden çekin ve kendi nesne depolamanızda saklayın. CDN URL'i kararlıdır ancak ürününüz render için buna bağımlı olmamalıdır.
Node.js, Python ve cURL içinde aynı endpoint
Node.js
Node.js'te Sanal try-on API'si
Yerel fetch ile bir Node.js backend'inden Photta'nın sanal try-on API'si özelliğini çağırın. SDK gerekmez: anahtarınızı saklayın, işi gönderin, sonuç için poll edin.
OkuPython
Python'da Sanal try-on API'si
Photta'nın sanal try-on API'si özelliğini requests kütüphanesiyle Python'da çağırın. Otuz satırlık sarmalayıcı, httpx ile asenkron uyumlu, Django, FastAPI ve Celery içinde çalışır.
OkucURL
cURL ile Sanal try-on API'si
Photta'nın sanal try-on API'si özelliğini cURL ile doğrudan kabuktan çağırın. Gönderin, yoklayın, indirin — her kod parçacığı betik tabanlı işlem hatları için jq ile uyumludur.
Oku
Geliştiricilerin giyim try-on özelliğini yayına almadan önce sorduğu sorular
Photta'nın sanal try-on API'si nedir?
Düz zemin (flat-lay) ürün görseli ve manken ID'si alıp model üzerinde fotogerçekçi bir görsel döndüren bir REST endpoint. Photta'nın tüketici uygulamasıyla aynı işlem hattı. Dört ürün türü desteklenir: top, bottom, top+bottom, one-piece.
Çağrı başına maliyeti ne kadar?
2K sonuç için 5 credits, 4K için 6 credits. Krediler aboneliğinizle birlikte gelir ve bakiye yüklenebilir. Başarısız üretimler kredi harcamaz — iade edilir.
Bir üretim ne kadar sürer?
Uçtan uca ölçüldüğünde tipik tamamlanma süresi 1.5 ila 4 dakikadır. POST işlemi bir saniyeden kısa sürede bir üretim ID'si döndürür; siz polling yaparken GPU işi arka planda gerçekleşir.
Hangi ürün türleri destekleniyor?
Dört adet: `top`, `bottom`, `top_and_bottom`, `one_piece`. Her biri farklı bir `product_images` yapısı bekler — örneğin `top_and_bottom`, hem `top_image` hem de `bottom_image` URL'lerini ister.
Kendi mankenimi kullanabilir miyim?
Evet. `POST /api/v1/mannequins` ile bir manken fotoğrafı yükleyin veya `POST /api/v1/mannequins/generate` ile yeni bir yapay zeka mankeni oluşturun. Dönen ID doğrudan try-on isteğine bağlanır.
Sonuç için nasıl polling yaparım?
`data.status` değeri `completed` veya `failed` olana kadar her 3 ila 5 saniyede bir GET `/api/v1/tryon/apparel/:id` yapın. Deneme sayısına bir üst sınır koyun — 120 × 3s, belgelenen zaman aralığını fazlasıyla karşılar.
İlgili yetenekler
Yetenekler
Takı try-on API'si kolyeler, yüzükler, bilezikler ve küpeler için
REST aracılığıyla kolyeleri, yüzükleri, bilezikleri ve küpeleri yapay zeka modellerine yerleştirin. 2K'da 5 credits, dahili yakın çekim mankenler, Photta dokümantasyonundan yansıma duyarlı render.
Endpoint'i görüntüleyinYetenekler
Hayalet manken API'si içi boş manken ürün fotoğrafları için
Yapay zeka hayalet manken endpoint'i. Giysi fotoğrafından mankeni kaldırın ve iç detayları koruyun. 3D veya flat-lay, toplu işleme, 2K'da 4 kredi.
Endpoint'i görüntüleyinGeliştir
Uygulamanız için sanal bir try-on özelliği geliştirin
Photta API ile bir sanal try-on özelliği sunmak için uçtan uca reçete: yükleme, gönderme, bir worker üzerinden polling yapma, sonucu render etme. TypeScript + sadece sunucu tarafı desenleri.
Endpoint'i görüntüleyinGeliştir
Bir iOS veya Android uygulamasına sanal try-on ekleyin
Photta API kullanarak yerel bir iOS veya Android uygulamasına yapay zekalı sanal try-on nasıl eklenir: anahtarı asla cihaza koymayın, backend'iniz üzerinden proxy yapın, iş durumunu yansıtın.
Endpoint'i görüntüleyinKarşılaştır
Photta vs FASHN — AI moda API'si, yan yana
Photta ve FASHN karşılaştırması: endpoint'ler, kredi fiyatlandırması, plan katmanları, eşzamanlılık limitleri. Her iki şirketin de 2026-04-19 tarihindeki kendi fiyatlandırma sayfalarından derlenmiştir. Uydurma rakamlar yoktur.
Endpoint'i görüntüleyinKarşılaştır
Photta vs Fitroom — moda API'leri için doğru seçimi yapın
Photta ve Fitroom; endpoint'ler, çağrı başına kredi maliyeti, fiyatlandırma modeli ve entegrasyon yüzeyi açısından karşılaştırıldı. Veriler 2026-04-19 tarihinde ilgili sitelerden çekilmiştir. Uydurma sayılar içermez.
Endpoint'i görüntüleyinHı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ş.
Endpoint'i görüntüleyinReferans
Photta API hataları
Durum kodlarıyla birlikte Photta API hata tiplerinin tam listesi, bir hata gövdesinin yapısı ve hangi hataların yeniden denenmeye değer olduğu.
Endpoint'i görüntüleyinReferans
Photta API rate limit'leri
Tümü API dokümantasyonundan alınan Photta API rate limit'i, penceresi, Retry-After başlığı, polling aralığı ve plan başına eşzamanlılık sınırları.
Endpoint'i görüntüleyin
Bu sayfadaki her veri şuradan alınmıştır: Photta API dokümantasyonu · kontrol edildi
API'yi beş dakikada deneyin
Bir Photta API key oluşturun, yukarıdaki cURL kod parçacığını yapıştırın; kahveniz demlenmeden önce model üzerindeki ilk görselinizi alın.
- 1.5–4 min
- 2K'da 5 credits · 4K'da 6 credits
- asenkron, polling
- 600 istek/dk
- Bearer anahtarı