> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trycarhub.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Customize vehicle photos

> Turn one vehicle photo and a prompt into a marketing image.

`POST /v1/render/customize` produces one 1K PNG from a vehicle photograph and your instructions using Nano Banana 2.1 on Vertex AI. The endpoint belongs to **E — Image production** and is in invite-only beta. Your organization needs access for live keys, test keys, and the Playground.

Each successful image costs **400 credits**. CarHub reserves 400 credits when it accepts the job. A failed generation, model refusal, or invalid image response releases the reservation without charging you.

## Submit a photo

Send exactly one JPEG, PNG, or WebP image up to 20 MiB and 40 megapixels. Describe the final photo in a nonempty prompt of up to 4,000 characters. Unknown parameters, batch inputs, and conversation history are rejected.

```bash theme={null}
curl "$CARHUB_API_URL/v1/render/customize" \
  -H "Authorization: Bearer $CARHUB_API_KEY" \
  -H "Idempotency-Key: car-cleanup-001" \
  -F "image=@vehicle.jpg" \
  -F "prompt=Wash the car. Keep its current paint color, wheels, equipment, and background."
```

To use an [uploaded photo](https://docs.trycarhub.com/guides/uploads.md), provide its reference instead:

```bash theme={null}
curl "$CARHUB_API_URL/v1/render/customize" \
  -H "Authorization: Bearer $CARHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input_ref": "upl_example",
    "prompt": "Change the paint color to metallic blue while preserving the wheels, trim, and vehicle condition."
  }'
```

## Write the intended result

The model aims to produce a final photograph ready for a marketing publication. It applies requested changes while preserving unaffected vehicle details and the source orientation. It does not search external sources.

| Intent | Example prompt |
| - | - |
| Clean the vehicle | `Wash the car. Keep its current paint color, wheels, equipment, and background.` |
| Change the paint color | `Change the paint color to metallic blue while preserving the wheels, trim, and vehicle condition.` |
| Change the setting | `Place the car in a modern outdoor dealership courtyard with coherent daylight and reflections. Preserve the vehicle and camera angle.` |

“Wash the car” requests a clean car. It does not request a scene with a person washing it. People, objects, text, logos, and effects are added only when requested or necessary for your intended result.

Review the generated photo before publishing it. Generative editing can alter details; instructions alone cannot guarantee vehicle fidelity.

## Retrieve the image

A new submission returns `202` with a [job](https://docs.trycarhub.com/guides/jobs.md). Poll `GET /v1/jobs/{id}` or receive a [webhook](https://docs.trycarhub.com/guides/webhooks.md). Synchronous waiting is not supported. Jobs expire after 300 seconds.

A successful job exposes:

```json theme={null}
{
  "image": {
    "url": "https://files.example/customized.png?signature=...",
    "expires_at": 1793103300,
    "format": "png",
    "width": 1024,
    "height": 768,
    "bytes": 245760
  }
}
```

`expires_at` is a Unix timestamp. Signed result URLs expire after 15 minutes by default. Use the returned expiration and download the file before it expires. Polling does not renew the URL. Stored results also remain subject to your data retention policy.

## Try the sandbox

With beta access, select **Image Customizer** in the Playground, upload a photo, and enter a prompt in the multiline field. The response panel shows the result and a download link.

Test keys return a deterministic fixture and never contact Vertex AI. Use `X-Carhub-Test-Scenario: model_error` to exercise a failed job and credit release. Sandbox output does not evaluate prompt quality or visual fidelity. Use live generations to evaluate cleaning, color changes, and background changes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.