Render 1-4 products as ONE shareable JPEG "menu" card and return its URL.
The card shows each product's photo with a big numbered badge (the ref you
assign), and its name + price printed under the photo. Built for chat
commerce (WhatsApp): send the image, tell the customer "reply 1, 2 or 3",
and they pick without opening links. No AI is involved — the image is
server-composited from the live catalog data, so prices match what the
product tools return.
Ref numbering contract: refs are yours to assign — use sequential numbers
per conversation and NEVER reuse one (if the first card was 1-3, the next
card starts at 4). A number must keep meaning the same product for the whole
conversation.
Args:
params (RenderOptionsCardInput):
- items (list[CardProduct]): 1-4 of {product_id, ref}
- currency (str): LKR (default), USD, GBP, AUD, CAD, EUR
Returns:
str: JSON:
{
"card_url": str, # public JPEG URL — send this as the image
"items": [{"ref": int, "product_id": str, "name": str,
"price": {"amount": float, "currency": str}, "url": str}],
"unavailable": [str] # product_ids that failed to load (omitted from card)
}
Error: "Error: <message>" when no product could be loaded.