Add a photo
add_photoAdds one photo to the user's My photos in Luala, free, so it can be edited: an old print to restore, clothes to try on, a photo to change. The answer is the saved photo with its photo_id and edit prices: when the user asked for an edit of it, tell them that edit's price, and once they agree make it by calling the Luala tool its price is keyed by in photo.prices (remove_background, replace_background, edit…) with this photo_id, which saves the result to their Luala photos. Pass the file the user attached as photo. If you can't, but the file is in your sandbox, call with its content_type (image/jpeg, image/png or image/webp: convert a HEIC to JPEG first) and size in bytes, PUT the file to the answer's upload url with its headers, then call again with the answer's key. Called with none of these, it answers with the luala.app page where the user adds it. The user accepted the upload rules when connecting Luala.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "add_photo"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | ||
| size | No | ||
| photo | No | The file the user attached. | |
| space | No | The space, by its id or name from list_spaces; left out, the personal one, but a shoot names one when the user is in several. When they haven't said which, ask. | |
| content_type | No |