Funktion · Brillen-Studio
API für virtuelles Brillen-Try-on für Brillen und Sonnenbrillen
In aller Kürze
Phottas Brillen-Studio-API verwandelt ein einzelnes Foto einer Brille oder Sonnenbrille in eine fertige Aufnahme. Wählen Sie reines Produkt oder On-Model, führen Sie einen POST aus, pollen Sie alle 3 Sekunden und laden Sie das Ergebnis herunter, sobald der Status completed ist. 5 credits bei 2K.
- Typische Dauer: 20–60 sec
- Credits: 5 Credits bei 2K · 6 Credits bei 4K
- Verarbeitung: asynchron, Polling
- Limits: 600 Anfragen/Min.
- Authentifizierung: Bearer-Key
Jeder Zahlenwert auf dieser Seite stammt aus der Photta-API-Dokumentation · geprüft
RESPONSE=$(curl -s -X POST https://api.photta.app/api/v1/eyewear-studio \
-H "Authorization: Bearer $PHOTTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"eyewear_image": "https://cdn.yourstore.com/products/aviator-sunglasses.jpg",
"mode": "product-only",
"sub_tool": "studio-shot",
"backdrop": "gradient",
"lighting": "soft",
"aspect_ratio": "3:4",
"resolution": "2K"
}')
ID=$(echo "$RESPONSE" | jq -r '.data.id')const res = await fetch("https://api.photta.app/api/v1/eyewear-studio", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PHOTTA_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"eyewear_image": "https://cdn.yourstore.com/products/aviator-sunglasses.jpg",
"mode": "product-only",
"sub_tool": "studio-shot",
"backdrop": "gradient",
"lighting": "soft",
"aspect_ratio": "3:4",
"resolution": "2K"
}),
});
const { data } = await res.json(); // data.id, data.statusimport os, requests
res = requests.post(
"https://api.photta.app/api/v1/eyewear-studio",
headers={"Authorization": f"Bearer {os.environ['PHOTTA_API_KEY']}"},
json={
"eyewear_image": "https://cdn.yourstore.com/products/aviator-sunglasses.jpg",
"mode": "product-only",
"sub_tool": "studio-shot",
"backdrop": "gradient",
"lighting": "soft",
"aspect_ratio": "3:4",
"resolution": "2K"
},
)
data = res.json()["data"] # data["id"], data["status"]
Auf einen Blick
Auf einen Blick
- Endpoint
- POST /api/v1/eyewear-studio
- Authentifizierung
- Bearer-API-Schlüssel
- Verarbeitung
- Asynchron — Polling über den Status-Endpoint
- Typische Dauer
- 20–60 sec
- Credits
- 5 Credits bei 2K · 6 Credits bei 4K
- Seitenverhältnisse
- 3:4 · 1:1 · 4:3 · 9:16 · 16:9
- Eingabelimits
- Bis zu 10 MB pro Bild; JPEG, PNG, WebP
- Idempotent
- Nein
Request und Response
Request
RESPONSE=$(curl -s -X POST https://api.photta.app/api/v1/eyewear-studio \
-H "Authorization: Bearer $PHOTTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"eyewear_image": "https://cdn.yourstore.com/products/aviator-sunglasses.jpg",
"mode": "product-only",
"sub_tool": "studio-shot",
"backdrop": "gradient",
"lighting": "soft",
"aspect_ratio": "3:4",
"resolution": "2K"
}')
ID=$(echo "$RESPONSE" | jq -r '.data.id')const res = await fetch("https://api.photta.app/api/v1/eyewear-studio", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PHOTTA_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"eyewear_image": "https://cdn.yourstore.com/products/aviator-sunglasses.jpg",
"mode": "product-only",
"sub_tool": "studio-shot",
"backdrop": "gradient",
"lighting": "soft",
"aspect_ratio": "3:4",
"resolution": "2K"
}),
});
const { data } = await res.json(); // data.id, data.statusimport os, requests
res = requests.post(
"https://api.photta.app/api/v1/eyewear-studio",
headers={"Authorization": f"Bearer {os.environ['PHOTTA_API_KEY']}"},
json={
"eyewear_image": "https://cdn.yourstore.com/products/aviator-sunglasses.jpg",
"mode": "product-only",
"sub_tool": "studio-shot",
"backdrop": "gradient",
"lighting": "soft",
"aspect_ratio": "3:4",
"resolution": "2K"
},
)
data = res.json()["data"] # data["id"], data["status"]202 Accepted / Abgeschlossen
{
"data": {
"id": "eyw_7a1c9e42f05b3d688c2e4f01a9d6b357",
"status": "processing",
"mode": "product-only",
"sub_tool": "studio-shot",
"resolution": "2K",
"aspect_ratio": "3:4",
"credits_used": 5,
"created_at": "2026-08-01T09:15:00Z"
},
"request_id": "req_eyw001"
}{
"data": {
"id": "eyw_7a1c9e42f05b3d688c2e4f01a9d6b357",
"status": "completed",
"mode": "product-only",
"sub_tool": "studio-shot",
"output_url": "https://cdn.photta.app/generated/eyw_7a1c9e42f05b3d688c2e4f01a9d6b357.jpg",
"thumbnail_url": "https://cdn.photta.app/generated/eyw_7a1c9e42f05b3d688c2e4f01a9d6b357-thumb.jpg",
"resolution": "2K",
"aspect_ratio": "3:4",
"credits_used": 5,
"created_at": "2026-08-01T09:15:00Z",
"completed_at": "2026-08-01T09:15:38Z"
},
"request_id": "req_eyw002"
}Request-Parameter
eyewear_imageTyp: stringErforderlich
The eyewear product image — glasses or sunglasses. https URL or base64 data URI. JPEG, PNG, WebP; max 10 MB.
modeTyp: string
Generation mode: "product-only" — the eyewear alone, styled by sub_tool; "on-model" — the eyewear worn on an AI model's face (requires mannequin_id).
= product-only
Werte:product-onlyon-modelsub_toolTyp: string
Product-only styling: "studio-shot" — clean studio product shot; "flat-lay" — top-down arrangement on a surface; "lifestyle" — the eyewear placed in a real-world scene; "floating" — the frames suspended mid-air. Sending sub_tool with mode "on-model" returns 400.
= studio-shot
Werte:studio-shotflat-laylifestylefloatingmannequin_idTyp: string
Required when mode is "on-model": the AI model whose face wears the eyewear — an id ("mnk_...") from GET /api/v1/eyewear-studio/mannequins. Sending it in product-only mode returns 400.
face_angleTyp: string
On-model only: the angle of the model's face.
= front
Werte:frontthree-quarterside-profileexpressionTyp: string
On-model only: the model's facial expression.
= neutral
Werte:neutralsoft-smileseriousconfidentlighting_styleTyp: string
On-model only: how the portrait is lit.
= soft-diffused
Werte:soft-diffusedstudionaturaldramaticframe_fit_styleTyp: string
On-model only: the overall styling of how the frames are worn.
= casual
Werte:casualprofessionalfashion-editorialsportybackdropTyp: string
Studio-shot only: the backdrop behind the eyewear.
= white
Werte:whitegrayblackgradientlightingTyp: string
Studio-shot only: the lighting setup.
= soft
Werte:softharddramaticnaturalsurfaceTyp: string
Flat-lay only: the surface the eyewear lies on.
= marble
Werte:marblewoodfabricconcretemetalarrangement_styleTyp: string
Flat-lay only: how the composition is arranged.
= minimal
Werte:minimalsymmetricscatteredlayeredpropsTyp: string
Flat-lay only: complementary props placed around the eyewear.
= none
Werte:noneplantsaccessoriestechsceneTyp: string
Lifestyle only: the real-world setting.
= coffee-shop
Werte:coffee-shopbeachurban-streetofficeparkmoodTyp: string
Lifestyle only: the color mood of the scene.
= warm
Werte:warmcoolvibrantmoodyangleTyp: string
Floating only: the camera angle on the suspended frames.
= front
Werte:frontthree-quartersidetop-downshadow_styleTyp: string
Floating only: the shadow cast beneath the frames.
= soft-drop
Werte:soft-dropnonehard-dropreflectionbackground_colorTyp: string
Solid background color. Applies in both modes. Overridden by background_prompt when both are sent.
= white
Werte:whitegrayblackbeigebackground_promptTyp: string
Free-text background description. Max 400 characters — excess is silently truncated. Overrides background_color.
aspect_ratioTyp: string
Output aspect ratio.
= 3:4
Werte:3:41:14:39:1616:9resolutionTyp: string
Output resolution. 4K cannot be combined with the 1:1 aspect ratio — that request returns 400.
= 2K
Werte:2K4K
Fehler
- 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.
Limits
- 600 Anfragen pro Minute pro API-Schlüssel (Festes Zeitfenster; das Limit ist in jedem Tarif identisch)
- Ein 429 enthält Retry-After: 30 Sekunden
- Bis zu 10 MB pro Bild
- Formate: JPEG, PNG, WebP
- Gleichzeitige Batches pro Tarif: Free 1 · Hobby 2 · Seller 3 · Brand 4 · Studio 6
- Nur Polling — die API sendet keine Webhooks.
Ein Fassungsfoto rein, eine gestylte Brillenaufnahme raus
Modus wählen, das vom Modus bereitgestellte Styling konfigurieren, absenden, pollen, herunterladen.
Schritt 1
API-Key generieren
Das Brillen-Studio nutzt dieselben Anmeldedaten und dasselbe Guthaben an credits wie jede andere Photta-Funktion.
Schritt 2
Modus und Styling wählen
`mode` ist `product-only` oder `on-model`. Product-only erfordert ein `sub_tool` — `studio-shot`, `flat-lay`, `lifestyle` oder `floating` — und jedes schaltet eigene Steuerungsparameter frei. On-model erfordert eine `mannequin_id` sowie `face_angle`, `expression`, `lighting_style` und `frame_fit_style`.
Schritt 3
Brillen-Job per POST senden
Senden Sie einen POST an `/api/v1/eyewear-studio` mit `eyewear_image` und Ihren Styling-Feldern. `background_prompt` akzeptiert bis zu 400 Zeichen und überschreibt `background_color`. Polling ist das einzige Fertigstellungssignal — die API sendet keine Webhooks.
Schritt 4
Pollen, bis der Job abgeschlossen ist
Führen Sie alle 3 Sekunden einen GET auf `/api/v1/eyewear-studio/:id` aus, bis `data.status` `completed` oder `failed` ist; typische Ausführungszeiten liegen zwischen 20 und 60 Sekunden.
Schritt 5
Herunterladen und dauerhaft speichern
Der Body bei Fertigstellung enthält `output_url` und ein Thumbnail. Speichern Sie die Datei selbst — betrachten Sie die URL als Auslieferung eines einzelnen Jobs, nicht als permanentes Hosting.
Derselbe Endpoint in Node.js, Python und cURL
Node.js
API für virtuelles Brillen-Try-on in Node.js
Rufen Sie Phottas aPI für virtuelles Brillen-Try-on von einem Node.js-Backend mit nativem fetch auf. Kein SDK erforderlich: Key speichern, Job absenden, Ergebnis pollen.
LesenPython
API für virtuelles Brillen-Try-on in Python
Rufen Sie Phottas aPI für virtuelles Brillen-Try-on in Python mit der requests-Bibliothek auf. Dreißigzeiliger Wrapper, async-kompatibel über httpx, funktioniert in Django, FastAPI und Celery.
LesencURL
API für virtuelles Brillen-Try-on mit cURL
Rufen Sie Phottas aPI für virtuelles Brillen-Try-on direkt über die Shell mit cURL auf. Übermitteln, pollen, herunterladen — jedes Snippet lässt sich für skriptbasierte Pipelines mit jq kombinieren.
Lesen
Fragen, die Entwickler vor dem Produktivgang von Brillenaufnahmen stellen
Was macht die Brillen-Studio-API?
Sie nimmt ein einzelnes Produktfoto einer Brille oder Sonnenbrille entgegen und liefert ein gestyltes Foto davon zurück — entweder die Fassung allein im Studio-, Flat-Lay-, Lifestyle- oder Schwebestil oder getragen im Gesicht eines von Ihnen gewählten KI-Models.
Wie viel kostet eine Brillenaufnahme?
5 credits bei 2K und 6 credits bei 4K, genau wie beim Bekleidungs- und Schmuck-Try-on. Fehlgeschlagene Jobs werden automatisch erstattet.
Was ist der Unterschied zwischen product-only und on-model?
`product-only` fotografiert die Fassungen allein und wird über `sub_tool` gesteuert. `on-model` platziert sie im Gesicht eines KI-Models und wird über `mannequin_id`, `face_angle`, `expression`, `lighting_style` und `frame_fit_style` gesteuert. Felder des jeweils anderen Modus werden ignoriert.
Welche Styling-Optionen bietet jedes Sub-Tool?
`studio-shot` akzeptiert `backdrop` und `lighting`. `flat-lay` akzeptiert `surface`, `arrangement_style` und `props`. `lifestyle` akzeptiert `scene` und `mood`. `floating` akzeptiert `angle` und `shadow_style`. Jedes dieser Felder ist ein Enum; unerwartete Werte werden daher abgewiesen statt geraten.
Kann ich mein eigenes KI-Modell verwenden?
Ja. `mannequin_id` akzeptiert jede Mannequin-ID von GET `/api/v1/eyewear-studio/mannequins`, und Mannequins, die Sie mit der Mannequin-Generierungs-API erstellen, können auf die gleiche Weise verwendet werden.
Wie frage ich das Ergebnis per Polling ab?
GET `/api/v1/eyewear-studio/:id` alle 3 Sekunden aufrufen, bis `data.status` auf `completed` oder `failed` steht. Es gibt keine Webhooks; Polling ist das dokumentierte Signal für den Abschluss.
Verwandte Funktionen
Funktionen
Virtuelle Try-on-API für Apparel
REST-API zur Platzierung von Bekleidung auf KI-Mannequins. Asynchron, 1.5–4 Minuten Generierungsdauer, 5 credits bei 2K, 6 bei 4K. Beispiele für cURL, Node.js und Python.
Zum EndpointFunktionen
Jewelry-Try-on-API für Halsketten, Ringe, Armbänder und Ohrringe
Halsketten, Ringe, Armbänder und Ohrringe via REST auf KI-Modellen platzieren. 5 credits bei 2K, integrierte Nahaufnahme-Mannequins, reflexionsbewusstes Rendering aus der Photta-Dokumentation.
Zum EndpointBuild
Einen Service für KI-Produktfotografie aufbauen
Das Gründer-Playbook für den Weiterverkauf der Virtual-Try-on-API von Photta als White-Label-SaaS: Mandanten-Keys, Batch-Fanout, Abrechnung nach Credits, SLA-Realität.
Zum EndpointVergleich
Photta vs FASHN — Fashion-KI-APIs im direkten Vergleich
Photta und FASHN im Vergleich: Endpoints, Credit-Preise, Tarifstufen, Concurrency-Limits. Direkt bezogen von den Preisseiten beider Unternehmen am 2026-04-19. Keine erfundenen Zahlen.
Zum EndpointSchnellstart
Erstes Photta-Bild in unter 5 Minuten.
Registrieren, API-Key generieren, ersten cURL-Aufruf ausführen, pollen bis zum Abschluss, Ergebnis persistieren. 5 Schritte, durchgängig dokumentiert.
Zum EndpointReferenz
Photta API-Fehler
Die vollständige Liste der Photta API-Fehlertypen samt Statuscodes, das Format des Error-Bodys und welche Fehler sich für einen Retry eignen.
Zum EndpointReferenz
Photta API Rate Limits
Das Photta API Rate Limit, sein Zeitfenster, der Retry-After-Header, das Polling-Intervall und die tarifbasierten Concurrency-Limits, alles direkt aus der API-Dokumentation.
Zum Endpoint
Jeder Zahlenwert auf dieser Seite stammt aus der Photta-API-Dokumentation · geprüft
Testen Sie die API in fünf Minuten
Generieren Sie einen Photta-API-Schlüssel, fügen Sie das obige cURL-Snippet ein, und Sie erhalten Ihr erstes Bild am Model, noch bevor der Kaffee fertig gebrüht ist.
- 20–60 sec
- 5 Credits bei 2K · 6 Credits bei 4K
- asynchron, Polling
- 600 Anfragen/Min.
- Bearer-Key