Skip to content

Upload a hero image for a deal

POST
/api/canvas/{deal_id}/hero-image
curl --request POST \
--url https://example.com/api/canvas/example/hero-image \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=example

Upload a hero image, auto-crop to 2.7:1 banner ratio, and persist.

Accepts JPEG, PNG, or WebP up to 10 MB. The image is cropped server-side to a consistent banner aspect ratio matching pipeline-generated heroes.

deal_id
required
Deal Id
string
Media type multipart/form-data
Body_upload_hero_image_api_canvas__deal_id__hero_image_post
object
file
required
File
string

Successful Response

Media type application/json
HeroImageResponse

Response after a successful hero image upload.

object
public_url
required
Public Url
string
width
required
Width
integer
height
required
Height
integer
aspect_ratio
required
Aspect Ratio
number
Example generated
{
"public_url": "example",
"width": 1,
"height": 1,
"aspect_ratio": 1
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}