Wraps, tints & aftermarket
The same call with color= as a hex; cache per vehicle, view and color.
/api/v1/images/carThe same call with color= as a hex
A wrap, tint or PPF preview starts from the customer's exact car in the paint they will get, and the image call takes any paint: color= is one of the named presets or a hex. Write the hex bare in a URL (color=1a2b3c) and with its hash in JSON ("color": "#1a2b3c"); a short #rgb is accepted, a hex that equals a preset's own swatch is that preset, and the credit is the same 1 as any other image. PNG and WebP keep the transparent background, so the car's own alpha is your mask; trim=1 brings its edges to the edge of the box.
curl --fail-with-body \
-H "Authorization: Bearer $CAR_IMAGE_API_KEY" \
"https://carimage.dev/api/v1/images/car?vehicle=veh_78qtwrgh37bkr&view=side&color=1a2b3c&w=1200&h=600&trim=1&format=webp" \
--output porsche-911-1a2b3c.webpCache per vehicle, view and color
Every paint is a recolor of one neutral render of that vehicle and view, so a color nobody asked for before is not a second cold render: the wait is on the first request for a vehicle and view, not on each color. Key your cache on vehicle id, view and color, and refresh it with the ETag the way a marketplace does (refresh with the ETag): an unchanged image answers 304 for free. A turntable or a configurator wants the car itself rather than a picture of it: that is a 3D model.
color=1a2b3c in a URL. A literal # starts a URL fragment, so the color and any later parameters would not reach the server, even in a quoted URL. The fifteen named presets and their swatches are on Images.The long version, with the white-base compositing recipe: the wrap, tint and PPF story.