Upload a photo
upload_photoUse only when the user wants their own photo on the front. Accepts a public HTTPS URL or base64 bytes (JPEG, PNG, WebP, HEIC, max 15 MB) and an explicit mode. Returns an uploadId for prepare_postcard, pixel size, a preview URL and quality warnings.
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": {
"mode": "<mode>",
"source": "<source>"
},
"name": "upload_photo"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | "test" = free sandbox (never printed, Stripe test card 4242 4242 4242 4242). "live" = real card, printed and mailed. Always explicit. | |
| source | Yes | ||
| idempotencyKey | No | Reuse this key only to retry the same request. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | Yes | ||
| height | Yes | ||
| uploadId | Yes | ||
| warnings | Yes | ||
| expiresAt | Yes | ||
| previewUrl | Yes |