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 file, content_base64 or source_url.
For a file attached to or generated in the conversation use file, never
a file path in content_base64. 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).
Plans differ in how many images can be uploaded each month and whether
videos can be uploaded. Past a limit it fails with image_upload_limit,
and an upload the plan does not include fails with feature_unavailable.
Either way, a public image_url still works for create_pin. Also fails
with 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).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filename": "<filename>"
},
"name": "upload_asset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | An image or video attached to or generated in the conversation, handed over by the client as a download link. | |
| 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). |