Ein Modell erstellen
Erstelle ein Modell aus 1–10 Referenzbildern, die als URLs oder inline als base64 übergeben werden.
202 Accepted mit einer Modell-id zurück; frage
GET /models/{id}/status ab, bis completed.
Jedes der 1–10 images ist entweder eine https url (serverseitig heruntergeladen
unter SSRF-Schutz) oder inline base64 + mime_type (image/jpeg, image/png
oder image/webp, je ≤ 10 MB). Die optionale instruction ist die stets angewandte Guidance des
Modells — als verbindliche (“MUST FOLLOW”) Vorgabe in jede Generierung eingespeist, die das Modell
komponiert, kein passiver Nutzungshinweis (ändere sie später mit
PATCH /models/{id}). Erfordert den models.write Scope.
Beispiel: ein Style-Modell aus URLs erstellen
url oder base64 + mime_type, nicht beides. Für große
Dateien nutze stattdessen den Presigned-Upload-Flow.
category ist eine von style, object, person, setting.Autorisierungen
Organization API key as a bearer token: Authorization: Bearer samsa_sk_....
Body
POST /models body — inline base64 and/or https-URL reference images.
1 - 100"Acme Brand Style"
Model category — one of style, object, person, setting.
style, object, person, setting "style"
1-10 reference images, each a url or inline base64+mime_type.
1 - 10 elementsOptional free-text guidance for how to use the model.
8000"Use for hero banners and social posts."
Optional https webhook notified once on terminal status (signed per the webhook signature scheme; see the webhooks docs).
"https://example.com/webhooks/samsa"
Antwort
Successful Response
202 body for POST /models and POST /models/{id}/complete (ADR §7.1).
The created model's id — poll GET /models/{id}/status.
Initial status: pending (create) or processing (complete).
pending, processing, completed, failed "pending"
Credits the finished job will cost (model creation is free = 0).
0

