Skip to main content
POST
Image Backgrounding

Authorizations

Authorization
string
header
required

Organisation API key, sent as Authorization: Bearer chk_live_….

  • chk_live_… — real inference, real credits, livemode: true.
  • chk_test_… — identical pipeline against the fixture backend, test credits, livemode: false.

Keys are stored hashed; only the prefix (chk_live_a1b2…) is ever displayed again. A key may be scoped to a subset of endpoint families — calling outside its scopes is a 403.

Headers

Idempotency-Key
string

Client-generated key (a UUID is ideal) making this POST safe to retry. The first request is executed and its response stored for 24 h; any replay with the same key returns that stored response with Idempotent-Replayed: true and bills nothing. Reusing a key with a different payload is a 409 idempotency_key_reuse.

Required string length: 8 - 255
X-Carhub-Test-Scenario
string

Steers the fixture backend. Ignored by live keys, 400 test_scenario_not_supported if the scenario is unknown to the endpoint. Common catalogue:

Some endpoints add their own scenarios; unsupported common scenarios (for example empty_result on a generation endpoint) are rejected rather than silently ignored.

Examples:

"empty_result"

"low_confidence"

"model_error"

"slow"

"insufficient_credits"

Query Parameters

wait
boolean
default:false

Hold the connection until the job settles and answer 200 with the completed job instead of 202 with a queued one. Available on fast endpoints only; the ceiling is 30 s, after which the job keeps running and the call answers 202 as usual.

Body

images
file[]
required

Repeat the images field once per file. 10 MB each.

Required array length: 1 - 30 elements
background
string
default:19

Background ID from the backgrounds table. Use default for the default studio, a numeric ID such as 19, 35 or 109, custom--<ID> for custom assets, or "" to skip background replacement.

Examples:

"19"

"35"

"109"

"default"

""

category
enum<string>
default:auto

Renderer/category override. Auto routes exterior position folders to the exterior renderer and interior, tire, trunk and engine folders to the interior renderer.

Available options:
auto,
exterior,
interior,
tire,
trunk,
engine
interior_background
string
default:default

Provisioned interior background set used for non-exterior shots.

Examples:

"default"

"peyrot"

interior_color
string
default:#FFFFFFFF

RGBA fallback when a category image is absent from the interior set.

Pattern: ^#[0-9A-Fa-f]{8}$
image_ratio
enum<string>
default:4:3

Output aspect ratio. A banner forces 16:9.

Available options:
4:3,
16:9,
3:2
upscale_model_name
enum<string>
default:fine_grain

AI-enhanced fine-grain is the highest-quality option; GAN is faster.

Available options:
fine_grain,
GAN,
None
denoising_strength
number
default:0.175

Fine-grain denoising strength. Values above 0.2 can introduce artifacts.

Required range: 0 <= x <= 1
shadow_intensity
number
default:0.8
Required range: 0 <= x <= 1
is_reflection
boolean
default:true

Add a floor reflection beneath the vehicle.

reflection_intensity
number
default:0.35
Required range: 0 <= x <= 1
alpha_value
integer
default:100

Opacity of interior glass and windscreen areas (0 transparent, 255 opaque).

Required range: 0 <= x <= 255
logo
string | null

Public logo URL or local worker path. Applied when a plate is detected.

plate_color
string
default:""
Pattern: ^$|^#[0-9A-Fa-f]{6}$
top_banner_url
string<uri> | null

Top banner image. Any banner forces a 16:9 render.

bottom_banner_url
string<uri> | null

Bottom banner image. Any banner forces a 16:9 render.

overlay_top
boolean
default:false
overlay_bot
boolean
default:false
only_banner
boolean
default:false

Skip background removal and assemble banners around the original image.

studio_mode
boolean
default:false

Detect position from pixels. When false, infer it from the image URL path.

roll
number | null

Explicit camera roll in degrees; null enables automatic detection.

pitch
number | null

Reserved for compatibility; currently unused by the pipeline.

token
string | null

Optional traceability value returned unchanged in the result.

output_format
enum<string>
default:jpg
Available options:
jpg,
png,
webp

Response

Job completed synchronously (wait=true).

The unit of work of the API. Every inference call creates one, and every result is read back from one — synchronously through wait=true, or later through GET /v1/jobs/{id} or a webhook.

result is populated only in succeeded, error only in failed / expired. stages is present on inspection jobs only.

id
string
required

Job identifier — job_ followed by a base58 string.

Pattern: ^job_[1-9A-HJ-NP-Za-km-z]{8,32}$
Example:

"job_3ZxK9pQr7TnW"

object
string
required
Allowed value: "job"
endpoint
enum<string>
required

Dotted slug of a CarHub endpoint, the identifier used for jobs and usage.

Available options:
vehicle.analyze,
vehicle.segment,
vehicle.identify,
vin.read,
plate.read,
document.read,
dashboard.read,
engine.detect,
video.onboard,
damage.detect,
damage.severity,
tire.read,
tire.detect,
parts.recognize,
parts.segment,
parts.decompose,
pricing.vehicle,
pricing.repair,
render.background,
render.enhance,
render.plate,
render.360,
render.video,
viewer.hotspots,
inspections
status
enum<string>
required

Lifecycle of a job. queuedprocessing → one of succeeded | failed; expired when it was never picked up in time, canceled when it was cancelled before starting. The three settled states are terminal.

Available options:
queued,
processing,
succeeded,
failed,
expired,
canceled
livemode
boolean
required

false when the job was created with a chk_test_ key: fixture result, test credits.

created
integer<int64>
required

Epoch seconds, UTC.

Example:

1755300000

started_at
integer<int64> | null
required

When the job left the queue. Null while queued.

Example:

1755300000

completed_at
integer<int64> | null
required

When the job settled. Null until then.

Example:

1755300000

model_version
string | null
required

Exact model build that produced the result, as <model>@<release date>. Null until the job starts. Pin your regression tests to it.

Example:

"plate-reader@2026-08-01"

credits
object
required

Credit accounting for the job. One credit equals one USD cent. reserved is held at admission and charged is the real cost after settlement; unused credits are released.

result
render.background result · object | null
required

The re-backgrounded image, plus the transparent cutout it was composited from when you asked for it.

error
object | null
required

Populated when status is failed or expired, null otherwise.

stages
Inspection stage · object[]

Per-stage progress. Present on inspections jobs only, absent everywhere else.

test_scenario
string

The X-Carhub-Test-Scenario that produced this job. Present on test-mode jobs that were steered by one, absent otherwise — a live job never carries it.

Example:

"low_confidence"