Upload image
upload_imageUpload a local image and get a CDN URL for img2img or --sref.
Only available on local (stdio) connections. On hosted/remote
connections, place an existing image URL directly in the prompt.
Place the returned ``url`` in a ``generate`` prompt:
``generate("https://cdn.maginary.ai/…/photo.webp reimagine as oil painting")``
Args:
file_path: Path to an image file on disk (JPEG, PNG, WebP, HEIC).
filename: Original filename. Inferred from ``file_path`` if omitted.
Returns:
Dict with ``url`` (the public CDN URL), ``exists`` (deduplicated),
``credits_deducted``, and ``message``.
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": {
"file_path": "<file_path>"
},
"name": "upload_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | No | Override filename. Inferred from file_path if omitted. | |
| file_path | Yes | Path to a local image (JPEG, PNG, WebP, HEIC). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||