Upload asset
upload_assetUpload an image (PNG, JPEG, GIF, WebP, AVIF, SVG) or a font (TTF, OTF, WOFF, WOFF2) to a workspace (max 10 MB), from a public https URL, a file attached in the chat or base64: fileId's workspace when given, else workspace, else the default workspace. Returns its URL (images: ) or its font class. Fonts: family, weight and style are read from the file (a variable font gets its weight range); fontFamily, fontWeight, fontStyle override them. Uploading bytes already in the workspace returns the existing asset (same id and URL) without reading the file again; fontFamily/fontWeight/fontStyle given then are applied to it (a workspace admin or its uploader only). A font can also be changed without uploading it again.
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": {
"name": "<name>"
},
"name": "upload_asset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public https URL of the file to fetch. | |
| data | No | Or the file content, base64. | |
| file | No | Or a file the user attached in the chat (ChatGPT fills it in). | |
| name | Yes | File name with extension, e.g. logo.png | |
| fileId | No | The file the assets are for: its workspace's (a file shows the fonts and images of its own workspace). | |
| fontStyle | No | Fonts: normal or italic instead of the file's. | |
| workspace | No | The workspace whose assets to use: its id or name (whoami lists them). Default: fileId's workspace, else the default workspace. | |
| fontFamily | No | Fonts: family name to use instead of the file's | |
| fontWeight | No | Fonts: CSS weight instead of the file's, "700", or a range for a variable font, "100 900". |