Upload a local image to TikTok Shop for use as a product image, variant image, size chart, certification image, or another supported image use case.
Note:
- All images used in TikTok Shop products must be uploaded through this API. You cannot use image URLs that are not hosted by TikTok Shop.
- Store
data.urito associate the uploaded image with a product when creating or editing it. Storedata.urlwhen you need to display the image in a product description by using an HTML<img>tag.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The local image file to be uploaded.
Note:
- Supported formats: JPG, JPEG, PNG, WEBP, HEIC, BMP
- Zero-byte files are rejected.
- Max size: 10MB
- Dimensions: [100x100 px, 20000x20000 px]
- For
use_case=MAIN_IMAGE, the dimensions must be between 300x300 px and 4000x4000 px. - For
use_case=SIZE_CHART_IMAGE, the dimension must be at least 1024 px on the shorter side.
The usage scenario of the image. Possible values:
- MAIN_IMAGE: An image displayed in the product image gallery.
- ATTRIBUTE_IMAGE: An image that represents a product variant (e.g. color).
- DESCRIPTION_IMAGE: An image used within the product description.
- CERTIFICATION_IMAGE: An image to provide supporting information to meet TikTok Shop requirements for listing restricted products (e.g., images of certifications, product packaging, labeling).
- SIZE_CHART_IMAGE: An image that displays the product’s measurement details.
- CUSTOMIZATION_IMAGE: Images used for POD product customization, such as background images, mask images, or default images configured for customizable areas. These images are used to render or preview consumer-customizable product content.
Note: Images for use cases MAIN_IMAGE and ATTRIBUTE_IMAGE that do not fit within the 3:4 to 4:3 aspect ratio range will be automatically converted to 1:1.
Responses
Section titled “Responses”Success
object
Status code; 0 means success.
Success or failure message.
Request log ID.
object
The URI to identify the image in API requests and responses. Pass this value when creating or editing a product to associate the image with the product.
The URL to access and view the image.
Use this URL in product descriptions by embedding it within an HTML <img> tag.
The height of the image after aspect ratio adjustment.
The width of the image after aspect ratio adjustment.
The usage scenario specified during upload. Possible values:
- MAIN_IMAGE
- ATTRIBUTE_IMAGE
- DESCRIPTION_IMAGE
- CERTIFICATION_IMAGE
- SIZE_CHART_IMAGE
- CUSTOMIZATION_IMAGE
Example
{ "code": 0, "data": { "uri": "tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe", "url": "https://p-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/c668cdf70b7f483c94dbe\n", "height": 720, "width": 720, "use_case": "MAIN_IMAGE" }, "message": "Success", "request_id": "202203070749000101890810281E8C70B7"}