🧪 Skills
Crop Image
Use this skill when an AI agent needs to crop images through the deployed Crop Image service. Trigger this for URL-based cropping (`POST /crop`) and file-upl...
v0.1.0
Description
name: crop-image
description: >
Use this skill when an AI agent needs to crop images through the deployed Crop
Image service. Trigger this for URL-based cropping (POST /crop) and
file-upload cropping (POST /crop/upload), especially when returning
production URLs and handling API-level errors.
version: "0.1.0"
tags:
- image-processing
- crop
- fastapi
- api license: MIT compatibility: claude_code: ">=1.0.0" claude_desktop: ">=1.0.0" metadata: version: "0.1.0" homepage: "https://imageclaw.net" docs: "https://api.imageclaw.net/docs" api_base_url: "https://api.imageclaw.net" maintainer: "imageclaw"
Crop Image Skill
Service Endpoints
- API Base URL:
https://api.imageclaw.net - Health:
https://api.imageclaw.net/health - Crop by URL:
https://api.imageclaw.net/crop - Crop by Upload:
https://api.imageclaw.net/crop/upload - Docs:
https://api.imageclaw.net/docs
Execute Crop by URL
- Validate input fields:
urlmust be a reachable image URL.widthandheightmust be integers in[1, 4096].
- Call endpoint:
curl -sS -X POST "https://api.imageclaw.net/crop" \
-H "content-type: application/json" \
-d '{
"url": "https://picsum.photos/800/600",
"width": 256,
"height": 256
}'
- Return response fields:
cropped_urloriginal_sizeface_detected
Execute Crop by Upload
-
Prefer upload mode for user-provided local files.
-
Call endpoint:
curl -sS -X POST "https://api.imageclaw.net/crop/upload" \
-F "file=@/absolute/path/to/photo.jpg" \
-F "width=256" \
-F "height=256"
- Return response fields:
cropped_urloriginal_sizeface_detected
Error Handling
- HTTP
400: invalid image source or decode failure - HTTP
422: validation failure (invalid URL, invalid width/height) - HTTP
500: service or configuration failure
When failure occurs:
- Return the original status code and
detail. - Ask caller to change input for
400/422. - Retry only for transient
500or network timeout.
Success Example
{
"cropped_url": "https://crop.imagebee.net/crops/1772761350_b8050bd6ec26.jpg",
"original_size": [800, 600],
"face_detected": false
}
Failure Example
{
"detail": "Not an image: content-type is application/json"
}
Reviews (0)
Sign in to write a review.
No reviews yet. Be the first to review!
Comments (0)
No comments yet. Be the first to share your thoughts!