Image uploads

Upload Image Bytes

The one-time PUT from createImageUpload. The token in the path is the credential (this user, this upload, this byte size); send no bearer token. The body is the raw file and must be exactly byte_size bytes, at most 20 MB, and its magic bytes must match the declared content type. A second PUT, or a PUT after expires_at, is refused. Not an MCP tool: the agent runs curl_example from the shell.

put/image-uploads/{token}

Request

  • Base URL: https://api.purplegrain.com/api/v1
  • URL: https://api.purplegrain.com/api/v1/image-uploads/{token}
  • Auth: none required

Path parameters

tokenstring required

The credential from upload_url. Not the upload_id.

Response

The file is stored. content_type is the stored type (HEIC and HEIF become image/jpeg).

upload_idstring required

The same signed id to pass as image_upload_ids.

status'uploaded' required
content_typestring required

The stored type. HEIC and HEIF are stored as image/jpeg.

byte_sizeinteger required

Size of the stored image, after conversion, orientation and resizing.

Changes

No recorded changes to this operation across all 2 revisions of this API.