Validate Image URL
validate_image_urlChecks if an image URL is reachable and returns an image before using it as a render input, preventing failed requests that would waste API credits.
Instructions
HEAD-check that a URL is reachable and returns an image, before using it as a render input (which would otherwise spend money on a request guaranteed to fail). Does not charge the API account.
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": {
"url": "<url>"
},
"name": "validate_image_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL to check (via HEAD) for reachability and image content-type before using it as input. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the URL responded successfully. | |
| bytes | Yes | Reported content length in bytes, if any. | |
| status | Yes | HTTP status code (0 if unreachable). | |
| isImage | Yes | Whether the content type is an image. | |
| contentType | Yes | Reported content type, if any. |