Add a photo from a web address
add_photo_from_urlAdds a photo to the business from a public web address (url), or, in ChatGPT, from an image the owner
attached to the chat (file): send one of them. JPEG, PNG, WebP, AVIF or HEIC, up to 25 MB. With
product_id, the photo also joins that product after its last photo, when the plan has room for one
more on it (otherwise plan_limit). Its id can go in a product's media with upsert_products at once;
its sizes are made in the background. An address off the public internet gets photo_url_refused, and one
that doesn't answer with a photo photo_url_unreachable, photo_type_not_allowed or photo_too_large.
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_from_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | A public http or https address of the photo. | |
| file | No | A file the owner attached in ChatGPT, as ChatGPT passes it to a tool. Its `download_url` is a temporary address that acts as a password to the file. | |
| product_id | No | A product the photo joins, after its last photo. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| url | Yes | Where its sizes are, once ready: add `/{width}.webp` for a width in `webp_widths`, or `/{width}.avif` for one in `avif_widths`. | |
| width | Yes | Once ready: its width, turned upright. | |
| height | Yes | Once ready: its height, turned upright. | |
| status | Yes | uploaded until its sizes are made; ready after; failed when they could not be. | |
| filename | Yes | ||
| created_at | Yes | ||
| jpeg_width | Yes | Once ready: the width of its JPEG copy, under {media}/{business_id}/{id}/{width}.jpg, for drawing pages as pictures; null before, and for photos made before copies were. | |
| size_bytes | Yes | ||
| avif_widths | Yes | The widths made in AVIF, under {media}/{business_id}/{id}/{width}.avif. | |
| placeholder | Yes | Once ready: a tiny WebP as a data: URI, to show blurred while the photo loads; empty before. | |
| webp_widths | Yes | The widths made in WebP, under {media}/{business_id}/{id}/{width}.webp. | |
| content_type | Yes | Read from the file itself. |