Generate custom print
generate_custom_printGenerate a CUSTOM t-shirt print from a text prompt (AI, takes 2-10 min). SPENDS THE ACCOUNT OWNER'S CREDITS: tell them the cost and their balance (get_credits) and get a yes BEFORE calling this — never spend silently, and never spend to 'try something' on your own initiative. Credits are earned (20 free on signup, 20 with every tee bought), so a wasted one is a real loss to them. Free exception: preserve=true prints their own image as-is and costs nothing. IMPORTANT: first call get_custom_print_options and ask the human to pick placement + product (and optionally background); do NOT silently use defaults. Args: prompt (design description), product? (one of ['kids_basic_tshirt_boy', 'kids_basic_tshirt_girl', 'kids_oversize_tshirt_boy', 'kids_oversize_tshirt_girl', 'mens_basic_tshirt', 'mens_oversize_tshirt', 'womens_basic_tshirt', 'womens_oversize_tshirt']), background? (t-shirt background, one of ['washed-beige', 'washed-black', 'washed-blue', 'washed-brown', 'washed-gray', 'washed-green', 'washed-orange', 'washed-pink', 'washed-red', 'washed-yellow', 'watercolor-beige', 'watercolor-blue', 'watercolor-sky']) — it is the design's background: it fills every piece of every product made from the design (sleeves, collar or hood, pants and underwear); the picture is a layer on the front only, placement? (print size/position, one of ['portrait_extended', 'square_center', 'chest_small']), model? (nb2 default | gpt-image-2 — both 1 credit, different styles), image_url? (https link to the user's OWN image — used as style/subject reference), preserve? (true = print the user's image exactly as-is, no AI redraw — kids' drawings, own art; FREE, no credits; requires image_url). Returns print_id — poll get_custom_print_status until done.
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": {
"prompt": "<prompt>"
},
"name": "generate_custom_print"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Generation engine: nb2 (default) or gpt-image-2 — both 1 credit. | |
| prompt | Yes | Text description of the design to generate. | |
| product | No | Garment from get_custom_print_options (default mens_oversize_tshirt). | |
| preserve | No | true = print the image exactly as-is, no AI redraw (free); requires image_url. | |
| image_url | No | https link to the user's OWN image, used as style/subject reference. | |
| placement | No | Print size/position: portrait_extended (default), square_center or chest_small. | |
| background | No | T-shirt background choice (see get_custom_print_options backgrounds). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| error | No | e.g. not enough credits, daily limit reached, invalid product. | |
| detail | No | ||
| status | No | ||
| print_id | No | Generation id — poll get_custom_print_status with it. | |
| tell_user | No | Say this to the account owner — what was spent from their balance and what is left. | |
| topup_url | No | Where the human sees their credits and how they are earned (present on 'not enough credits'). | |
| cost_credits | No | Credits spent on this generation. | |
| signup_bonus | No | ||
| balance_after | No | Credits left after this generation. | |
| balance_before | No | ||
| studio_account_created | No | Present when this first generation opened the user's credits account. |