Request presigned upload URLs for a new model's images
Model Training
Prepare a model upload
Request presigned PUT URLs for a new model’s reference images (two-step upload).
POST
Request presigned upload URLs for a new model's images
Step one of the presigned upload flow for large files. Send the model
name,
category, and metadata for the 1–10 files you will upload (the first file is
the cover). The response returns a model id and one presigned PUT upload_url per
file. PUT each file to its URL, then call
POST /models/{id}/complete with the
uploaded keys to start processing. Requires the models.write scope.
Use this two-step flow when images are too large to send inline. For small images
or remote URLs,
POST /models is simpler.
Each file’s content_type is one of image/jpeg, image/png, image/webp;
provide size (≤ 10 MB) when you know it.Authorizations
Organization API key as a bearer token: Authorization: Bearer samsa_sk_....
Headers
Body
application/json
POST /models/prepare body — request presigned PUT URLs for large files.
Required string length:
1 - 100Example:
"Acme Brand Style"
Model category — one of style, object, person, setting.
Available options:
style, object, person, setting Example:
"style"
Metadata for the 1-10 files you will upload (first = cover).
Required array length:
1 - 10 elementsOptional free-text guidance for how to use the model.
Maximum string length:
8000
