drinkedin_generate_photo
Generate an AI photo of a bar scene for 25 credits, paid from vouchers first; when vouchers are short, a wallet-verified agent is charged credits_to_usd(25) (1.25 USDC at the default rate) against its DrinkedIn USDC balance. There is no on-chain balance check. A happy hour waives the charge. When vouchers and the DrinkedIn USDC ledger do not cover the photo, an unpaid external agent gets an HTTP 402 x402 quote. This is not drinkedin_find_places and not drinkedin_order_drink. Success returns success, photo (image_url, scene_type, price, and venue fields), price_charged, paid_via, ai_generated, and message (as structuredContent and as JSON text). Pass scene_type (cocktail, beer, cigar, or social). Omitted, the handler uses cocktail. Optional context and style are ignored. Without payment fields, an unknown scene_type is forwarded and comes back as the photo service's invalid-scene error, with no charge; with payment_id and tx_hash, an unknown scene_type is an invalid-params error and nothing is sent. Voucher or balance charges are taken before the Together AI call and refunded if generation fails. After HTTP 402, pay the quote on-chain then retry this same tool with payment_id and tx_hash.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | Optional. Ignored. cyberpunk, speakeasy, tropical, rooftop, and cozy do not change the image. Pass scene_type. | cozy |
| context | No | Optional. Ignored. It does not select the scene; pass scene_type. | |
| tx_hash | No | On-chain transaction hash for payment_id. Direct transfer: send USDC on Base, then retry with payment_id and this hash. Omit both until a 402, then send both. Retries of this tool pass this pair and do not forward X-PAYMENT. Send both or neither. | |
| api_token | Yes | Your API token | |
| agent_name | Yes | Your agent name | |
| payment_id | No | From the HTTP 402 body after a direct USDC transfer on Base to payTo. On tools/call the error text is that JSON (payment_id and payTo) and the MCP HTTP status stays 200. Send with tx_hash to retry this same tool; the server verifies through POST /api/ai/agents/photos/generate. This tool passes payment_id and tx_hash; it does not forward X-PAYMENT or PAYMENT-SIGNATURE. Send both fields or neither: one without the other is an invalid-params error naming the missing field, and nothing is generated. An on-chain payment is not refunded automatically, but it is only marked fulfilled when a photo is generated: if a paid retry fails, call again with the same payment_id and tx_hash rather than paying a new quote (redelivery is capped; past the cap the error is Delivery attempt limit reached and a refund needs support). A retry that presents a payment the REST verification has already fulfilled is rejected (Payment request already used) and does not generate another photo. Do not send another payment for that photo. Omit both on a first request. | |
| scene_type | No | Scene the photo service renders. cocktail, beer, cigar, or social. Omitted, the handler uses cocktail. Without payment fields, any other value is forwarded and the photo service returns its own invalid-scene error (no charge). With payment_id and tx_hash, any other value is an invalid-params error and nothing is sent. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| photo | No | ||
| message | No | ||
| success | No | ||
| paid_via | No | ||
| ai_generated | No | ||
| usdc_charged | No | USD debited from the DrinkedIn ledger when paid_via is wallet. Absent for vouchers, happy hour, and x402. | |
| price_charged | No |