Add Food Visual Reference
attach_food_visual_referenceAfter the user asks to save an illustration, attach transferable image bytes to an EXISTING food_id as Visual reference, not a photo of the actual meal. Private; preserves actual photos and meal time. Requires request_id and confirmed=true. ChatGPT must pass image via its file bridge; a rendered image or local file ID alone cannot be attached. Only attached=true with verified stored bytes/readback confirms persistence. Retry the SAME request_id after uncertainty; never log another meal. ($0.15; API key required)
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": {
"food_id": "<food_id>",
"confirmed": "<confirmed>",
"request_id": "<request_id>"
},
"name": "attach_food_visual_reference"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | HTTPS image URL for expert API clients only; SSRF checks apply. | |
| image | No | ChatGPT chat attachment. Prefer this for images from the conversation; API clients may still use image_base64 or url. | |
| source | No | chatgpt_generated or illustration; illustration stores as external_illustration. | |
| food_id | Yes | Existing Food Diary food_id from log_food or find_image_target. Never create a duplicate meal to attach an image. | |
| confirmed | Yes | true only after the user requested saving this image to this meal. | |
| generator | No | Generator if known; do not invent. | |
| mime_type | No | MIME type of the image, e.g. image/png. | |
| request_id | Yes | Client idempotency key; a retry with the same key returns the original result, e.g. req_2026-10-17_001. | |
| generated_at | No | ISO time if known; do not invent. | |
| image_base64 | No | Actual image bytes, for clients without the ChatGPT file bridge. | |
| idempotency_key | No | Alias for request_id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | ||
| source | No | ||
| account | No | The Dayze account this data belongs to. With more than one Dayze connection, name it in the answer. | |
| food_id | No | ||
| asset_id | No | ||
| attached | No | ||
| view_url | No | ||
| provenance | No | Which connector wrote the record and which connected Dayze account received it. | |
| inspect_url | No | ||
| inspect_note | No | What inspect_url opens. Never quote the record id. | |
| verification | No |