Transform Images
This page will help you get started with our replace background API for the Automobile category
POST
AuthBearer token
Prefer ReadMe's own explorer? Open it here.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
auth_key | string | Required | The authentication key of the user |
sku_name | string | Required | The name of sku you are processing |
category_id | string | Required | The type of images to be processed, can be one of the following, “Automobile”, “Food”, "E-commerce" Default: Automobile. |
image_data | object[] | Required | An array object containing batches of images to process |
image_data[].category | string | Optional | Our AI Models will automatically detect the image as Exterior, Interior, Miscellaneous Default: Unclassified. |
image_data[].image_urls | string[] | Optional | Provide the URL of the image to be processed. You can add multiple images by clicking on the "+" sign Default: []. |
image_data[].image_meta_data | object | Optional | Optional information at an individual images level that will be returned in the response |
background_type | string | Required | This attribute is deprecated, please use "legacy" at all times Default: legacy. |
background | string | Required | The ID of the new background which would be placed into the image, you can get these from your Spyne POC or from Darkroom Default: 923. |
number_plate_logo | string | Optional | Put 0 for no number plate masking, 1 for white number plate masking or a URL in 5:1 aspect ratio to mask the number plate with specific image |
sku_meta_data | object | Optional | Optional JSON data which will be sent back in the response |
Sample request
curl --request POST \
--url 'https://api.spyne.ai/api/pv1/image/replace-bg' \
--header 'Authorization: Bearer YOUR_API_KEY'import requests
url = "https://api.spyne.ai/api/pv1/image/replace-bg"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.post(url, headers=headers)
print(response.status_code, response.json())const response = await fetch("https://api.spyne.ai/api/pv1/image/replace-bg", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
});
console.log(response.status, await response.json());Sample response
{
"message": "Accepted",
"data": {
"sku_id": "0f1e8e8458b5420fba757f8799196b51"
}
}{}Response parameters (200)
| Field | Type | Description |
|---|---|---|
message | string | Example: Accepted. |
data | object | |
data.sku_id | string | Example: 0f1e8e8458b5420fba757f8799196b51. |
Errors
| Status | Meaning | When it happens |
|---|---|---|
400 | Bad Request | 400 |
Updated 2 days ago
Did this page help you?
