Skip to content

Dispatch a background-swap (with spec) workflow

POST
/v1/background-swap-with-spec
curl --request POST \
--url https://example.com/v1/background-swap-with-spec \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "source_image_s3_key": "example", "source_render_public_id": "example", "scene_type": "example", "mood": "example", "dominant_colors": [ "example" ], "output_preset": "example", "pilot_brand": "example" }'
X-Shopify-Hmac-Sha256
Any of:
string
Media type application/json
BackgroundSwapWithSpecRequest

POST /v1/background-swap-with-spec — swap to an inline background spec.

object
source_image_s3_key
Any of:
string
source_render_public_id
Any of:
string
scene_type
required
Scene Type
string
mood
required
Mood
string
dominant_colors
Dominant Colors
Array<string>
output_preset
required
Output Preset
string
pilot_brand
Any of:
string
Example generated
{
"source_image_s3_key": "example",
"source_render_public_id": "example",
"scene_type": "example",
"mood": "example",
"dominant_colors": [
"example"
],
"output_preset": "example",
"pilot_brand": "example"
}

Successful Response

Media type application/json
WorkflowAcceptedResponse

Returned synchronously from any POST /v1/{name} (202).

object
request_id
required
Request Id

26-char ULID — correlates with the row in request_logs.

string
job_id
required
Any of:
string
status
JobStatus

Studio’s job status at submit time. Almost always NOT_STARTED in this 202.

string
default: NOT_STARTED
Allowed values: NOT_STARTED IN_PROGRESS SUCCESS FAILURE
credits_cost
required
Credits Cost

Credits deducted from the calling client. Refunded automatically on any failure path.

integer
Example
{
"status": "NOT_STARTED"
}

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
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}