assets_put
Upload files or inline content to project storage with direct-to-S3. Supports public/private visibility, immutable content-addressed URLs, and automatic responsive image variants for JPEG, PNG, WebP, HEIC.
Instructions
Upload a blob (file or inline content) to project storage via direct-to-S3. Accepts local_path (any size up to 5 TiB) or content (≤ 1 MB inline). Public blobs get a CDN URL; private blobs require authenticated reads. Use immutable: true to produce a content-addressed URL that never needs cache invalidation. For image uploads (jpeg/png/webp/heic/heif), the gateway also returns width_px/height_px/blurhash/display_url and a variants map (thumb 320w, medium 800w, large 1920w WebP — plus display_jpeg for HEIC sources) so apps can render responsive thumbnails without re-encoding client-side. See the SDK docs for the full AssetRef shape.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID | |
| key | Yes | Destination key (path in the project's blob namespace). No leading slash. Example: 'images/logo.png' or 'circuits/v1.zkey'. | |
| local_path | No | Path to a local file to upload. Mutually exclusive with `content`. | |
| content | No | Inline content to upload (UTF-8 string). For small blobs ≤ 1 MB. Mutually exclusive with `local_path`. | |
| content_type | No | MIME type (auto-detected from file extension if omitted). | |
| visibility | No | Default: public. Public blobs get a CDN URL; private blobs require authenticated reads. | |
| immutable | No | When true, the returned URL includes a content-hash suffix so overwrites produce distinct URLs. CLI auto-computes sha256. | |
| metadata | No | v1.50: caller-provided flat metadata stored alongside the asset. Object with string / number / boolean / string[] leaves; ≤4 KB serialized. Nested objects rejected with INVALID_ASSET_METADATA (HTTP 400). | |
| exif_policy | No | v1.50: EXIF retention policy for image uploads. Default 'keep'. 'strip' discards EXIF from the stored bytes and the image_exif response field. |