Aggiorna un modello
Aggiorna i campi modificabili (nome, prompt predefinito, istruzione) di uno dei tuoi modelli.
name, default_prompt e instruction sono modificabili; i campi di proprietà e privacy
non possono essere modificati. instruction è la guida sempre applicata del modello (max. 8000 caratteri),
iniettata come direttiva obbligatoria (“MUST FOLLOW”) in ogni generazione di immagini e video che compone il
modello — corrisponde allo user_instruction restituito in lettura del modello.
Ometti un campo per lasciarlo invariato — non inviarlo come null esplicito (invia una stringa vuota per
cancellare instruction). Gli id sconosciuti o di un’altra organizzazione restituiscono
404 not_found. Richiede lo scope models.write.Autorizzazioni
Organization API key as a bearer token: Authorization: Bearer samsa_sk_....
Parametri del percorso
Corpo
PATCH /models/{id} body — the publicly editable fields only (ADR §10, ticket §3).
Ownership / privacy fields (owner_id, private, organization_id) are
intentionally NOT accepted. A field may be omitted (left unchanged) but must not
be sent as an explicit null — the runtime rejection lives in
_reject_explicit_null (mirroring ApiKeyUpdate), and
_string_only_patch_schema keeps the EXPORTED OpenAPI honest by advertising
each field as a plain string (no null branch) so generated clients and
the API playground cannot offer null as a value (SAM-639).
New model name.
1 - 100"Renamed Model"
New default prompt / capability description.
2000"A refined flat-design illustration in the Acme brand palette."
New always-applied model instruction (max 8000 chars) — injected into every generation that composes the model. Accepted on write under the name instruction (mirroring model creation); it maps to the user_instruction field returned on read (PublicModelDetail).
8000"Always render on a clean, seamless white background."
Risposta
Successful Response
A single model with full detail — the GET /models/{id} body (ADR §10).
"Acme Brand Style"
Creation status: pending, processing, completed, or failed.
pending, processing, completed, failed "completed"
True when the model is completed AND active — usable for generation.
true
Model category — one of style, object, person, setting.
style, object, person, setting "style"
Presigned, time-limited HTTPS thumbnail URL (null when the model has none).
"https://cdn.samsa.ai/models/…/thumbnail.webp?X-Amz-Signature=…"
Presigned, time-limited HTTPS URLs of the reference images used to create the model.
Free-text guidance for how to use the model.
"Use for hero banners and social posts."
The model's default prompt / capability description.
"A bold flat-design illustration in the Acme brand palette."
Trigger words associated with the model.

