工具 API
file_ video_ ad_ upload
Uploads a video to the Asset Library so the returned `video_id` can be used for ad creation. Request timeout is 10 seconds, and upload speed depends on network bandwidth, so keep file sizes reasonable. If the uploaded video already exists in the advertiser account, the API returns the existing video's information. Smart Fix is recommended when uploading videos. Starting April 24th, 2025, Smart Fix automatically fixes only `LOW_RESOLUTION` and `ILLEGAL_VIDEO_SIZE`; `LOW_RESOLUTION` is enhanced to 1280x720 (720p), `ILLEGAL_VIDEO_SIZE` is adjusted to 1:1, 9:16, or 16:9, only one fixed version is returned, and the fixed video's name follows `file_name` or the default naming convention. Before use in ads, the video must meet creative delivery requirements. Related endpoints referenced by this workflow include /file/name/check/ for duplicate-name checks and /file/video/ad/search/ for retrieving video details when processing is delayed.
调用信息
- 工具标识
- tiktok-ads.file_video_ad_upload
- 服务提供方
- TikTok 广告
- 平均响应
- 0 ms
- 近 7 天调用
- 0
输入参数
advertiser_id必填Advertiser ID.
auto_bind_enabledValid only when `flaw_detect=true` and `auto_fix_enabled=true`. Whether to automatically upload the fixed video to your creative library. Default value: `false`.
auto_fix_enabledWhether to automatically fix detected video issues. Default value: `false`. Behavior depends on this field and `flaw_detect`: if issues are detected and `auto_fix_enabled=false`, the API returns an error with flaw types; if `flaw_detect=true` and `auto_fix_enabled=true`, the API automatically fixes `LOW_RESOLUTION` and `ILLEGAL_VIDEO_SIZE` and returns `fix_task_id` and `flaw_types`. `LOW_RESOLUTION` is enhanced to 1280x720 (720p). `ILLEGAL_VIDEO_SIZE` is adjusted to one of the standard aspect ratios: 1:1, 9:16, or 16:9.
file_idRequired when `upload_type=UPLOAD_BY_FILE_ID`. ID of a file already uploaded to the file repository.
file_nameVideo name. Length limit: 1-100 characters. Default behavior depends on Smart Fix: when `flaw_detect=false` and `auto_fix_enabled=false`, the default is the original local file name or the filename part of the URL path; if that source name exceeds 100 characters, only the first 100 characters are used. When `flaw_detect=true` and `auto_fix_enabled=true`, the default is still the original file name or URL filename, and if you provide `file_name`, that value becomes the fixed video's name. Videos under the same `advertiser_id` cannot have duplicate file names; use /file/name/check/ to verify availability before upload. If you get a duplicate-name error, rename the file or append a timestamp and upload again.
flaw_detectWhether to automatically detect issues in the video. Default value: `false`. When used together with `auto_fix_enabled=true`, issue detection can lead to automatic fixes and fixed-video retrieval behavior.
is_third_partyWhether the video is third-party content.
upload_typeVideo upload method. `Content-Type` also depends on this field: use `application/json` when `upload_type=UPLOAD_BY_URL` or `UPLOAD_BY_FILE_ID`. Companion-field requirements: `UPLOAD_BY_URL` requires `video_url`; `UPLOAD_BY_FILE_ID` requires `file_id`; `UPLOAD_BY_VIDEO_ID` requires `video_id`. If set to `UPLOAD_BY_URL`, or `UPLOAD_BY_FILE_ID`, the API returns a new `video_id`; uploading the same video multiple times with any of those three modes still generates a new `video_id` each time.
video_idRequired when `upload_type=UPLOAD_BY_VIDEO_ID`. Existing video ID. Pass only a `video_id` created in TikTok Ads Manager or via API; values from other sources may fail or produce a video that cannot be used for ad creation. You can obtain valid `video_id` values from this endpoint's response or from /file/video/ad/search/.
video_urlRequired when `upload_type=UPLOAD_BY_URL`. Public video URL, such as `http://xxx.xxx`. Recommended file size is within 10 MB. The URL must be browser-valid and properly encoded, for example spaces must be encoded as `%20`. The server verifies the response `Content-Type`; text media types such as `text/html` or `text/plain` are invalid. If the source response includes `Content-MD5`, the data is also verified against it. Ratio, format, resolution, and bitrate limits are the same as for `video_file`. Before uploading, make sure the URL is playable and in a supported format; invalid or unsupported URLs can cause an error or produce an unusable `video_id` for ad creation.