Completa l'upload di un modello
Finalizza un modello preparato dopo aver caricato le sue immagini sui presigned URL.
PUT di ogni file agli URL forniti da
POST /models/prepare, chiama questo endpoint
con gli uploaded_keys (le chiavi R2 che hai caricato, in ordine — la prima = copertina). Samsa
convalida le chiavi e avvia l’elaborazione, restituendo 202 Accepted. Interroga
GET /models/{id}/status finché non è completed.
Richiede lo scope models.write.
webhook_url per essere notificato quando il modello raggiunge uno stato terminale
invece di interrogarlo. Vedi Webhook.Autorizzazioni
Organization API key as a bearer token: Authorization: Bearer samsa_sk_....
Parametri del percorso
Corpo
POST /models/{id}/complete body — finalize after uploading to presigned URLs.
The R2 keys you uploaded, in order (first = cover).
1 - 10 elementsOptional https webhook notified once on terminal status (signed per the webhook signature scheme; see the webhooks docs).
"https://example.com/webhooks/samsa"
Risposta
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

