Skip to main content
POST
Finish an image upload (verify the file, get a usable image_id)
Step three of the image upload, after the PUT to the upload_url from POST /images/uploads/prepare. Call it within the hour. Samsa verifies the file — present, exactly size_bytes, at most 10 MB, a readable image of the prepared content_type, at most 32 megapixels — and returns 200 OK with the image_id, status: "completed", and the measured width and height. From then on, use the image_id as the source of an edit, an image operation, or an image-to-video generation.
Complete is idempotent: calling it again returns the same result. A file that fails a check returns 422 and is discarded — PUT a valid file to the same upload_url while it is still valid and call complete again. 409 upload_in_progress means another complete call is running: retry in a few seconds. Requires any one of the images.edit, images.transform, or videos.generate scopes. Free.

Authorizations

Authorization
string
header
required

Organization API key (Authorization: Bearer samsa_sk_...) or OAuth 2.1 access token (Authorization: Bearer samsa_at_...).

Path Parameters

image_id
string<uuid>
required

Response

Successful Response

200 body for POST /images/uploads/{image_id}/complete — the usable image.

image_id
string<uuid>
required

Use as the source image_id in edits, img2img, variations, resizes, upscales, background removals, vectorizations and image-to-video generations.

status
string
required

Always completed: the file is verified and the image can be used now. Thumbnails are built in the background.

Allowed value: "completed"
filename
string
required

The filename given at prepare.

content_type
string
required

The verified MIME type of the bytes.

size_bytes
integer
required

Size of the uploaded file in bytes.

width
integer
required

Width in pixels, measured from the bytes.

height
integer
required

Height in pixels, measured from the bytes.