Upload image or video
upload_assetUpload an image or video to PinBridge and get an asset_id for create_pin.
Use when the media was generated in this session or Pinterest cannot
fetch it from a public URL; otherwise pass image_url to create_pin
directly. Provide exactly one of content_base64 or source_url. Videos
must be uploaded assets.
Returns id (use as asset_id), public_url, asset_type, content_type,
size_bytes, created_at. Files are capped at 200 MB (plans cap lower).
Fails with payment_required on plans without uploaded_media_assets
(see get_billing_status), validation_error for unsupported media, and
invalid_image when the file is truncated or corrupted (re-encode the
exact original bytes; never retype base64 by hand).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | File name with extension, e.g. "hero.png". | |
| asset_type | No | Kind of media being uploaded. | image |
| source_url | No | Public http(s) URL the server downloads instead of content_base64; no redirects, private hosts are refused. | |
| content_type | No | MIME type, e.g. "image/png"; inferred when omitted. | |
| content_base64 | No | Base64-encoded file bytes (data: prefix allowed). |