Create Photo Capture
POST
/users/{user_id}/events/{event_id}/captures/photo
const url = 'https://example.com/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/events/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/captures/photo';const form = new FormData();form.append('file', 'file');form.append('mode', 'meal_photo');
const options = {method: 'POST'};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/events/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/captures/photo \ --header 'Content-Type: multipart/form-data' \ --form file=@file \ --form mode=meal_photoCapture a meal from an image — a receipt/confirmation photo (mode=receipt) or a photo of
the meal itself (mode=meal_photo). Same “capture first, enrich later” flow as text captures:
the image is persisted and the nutrition job decomposes it via Claude vision, then drops the
bytes. Gated by meal_photo_integration. Client polls GET /meal-items as usual.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”user_id
required
User Id
string format: uuid
event_id
required
Event Id
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typemultipart/form-data
Body_create_photo_capture_users__user_id__events__event_id__captures_photo_post
object
file
required
File
string format: binary
mode
Mode
string
Responses
Section titled “Responses”Successful Response
Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}