Estimate Credits
estimate_creditsEstimate credit cost and check account balance before removing backgrounds. Required to verify sufficient credits for processing.
Instructions
Estimate credit cost and check balance. Fast mode (default): 1 credit/image — input resized to 2500px, output up to 2500px. Works with any input size. HD mode: 2 credits/image — input preserved up to 4096px, output up to 4096px. REQUIRED: Call this before EVERY remove_background or batch_remove_background call. After calling, present the result to the user and ask: "This will use X credit(s) (you have Y). Proceed?" Only call the processing tool AFTER the user confirms. If canAfford is false, tell the user they need more credits before proceeding.
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": {
"imageCount": "<imageCount>"
},
"name": "estimate_credits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hdMode | No | Fast mode (default, 1 credit/image): input is resized to 2500px max before processing — OUTPUT is up to 2500px. Fast mode works with ANY input size (even 4000px images), but output resolution is capped at 2500px. HD mode (2 credits/image): input preserved up to 4096px — OUTPUT up to 4096px. Use HD ONLY when: (1) user explicitly requests HD/high-definition/4K output, or (2) user needs output resolution above 2500px, or (3) subject has fine edge detail like hair, fur, or feathers. Never default to HD without one of those reasons. | |
| imageCount | Yes | Number of images to process |