Trenz Open PlatformTrenz Open Platform
Trenz Home
Product
  • Trenz Home
  • Apply for API Key
Docs
  • Quick Start
  • API Reference
Resources
  • Billing
  • Error Codes
Contact
  • support@trenz.ai

© 2026 Trenz. All rights reserved. · One-stop API platform for social commerce

  • Overview
  • Trenz API
Information
Data
    Data/Ads
      TikTok Ad Creative DetailgetAd Searchget
    Data/Creatives
      Creative SearchgetCreative Detailget
    Data/Creators
      Creator SearchgetCreator Detailget
    Data/Lives
      Live SearchgetLive Detailget
    Data/Products
      Product SearchgetProduct Detailget
    Data/Sellers
      Seller SearchgetSeller Detailget
    Data/Videos
      Video SearchgetVideo Detailget
Content
    Content/AI Analysis
      Video Content AnalysispostVideo Script BreakdownpostVideo Script Breakdown V2postVideo Storyboard Breakdownpost
    Content/AI Copywriting
      AI Product DescriptionpostAI Product TitlepostProduct Review Analysispost
    Content/AI Image
      AI Image GenerationpostVideo Subtitle Removalpost
    Content/AI Video
      SD Pro Fast Video GenerationpostSD Pro Video GenerationpostVideo ClonepostGrok Video GenerationpostSora2 Pro Video GenerationpostSora2 Video GenerationpostVideo Super ResolutionpostVeo3 Video GenerationpostWan2.6 Video Generationpost
    Content/Avatar
      Avatar Photo AnalysispostTalking Photo Video Generationpost
    Content/Material Search
      Aggregated Image SearchpostAggregated Material Searchpost
    Content/Tools
      Text EmbeddingpostVideo Transcriptionpost
Social
    Social/1.Account Management
      Social Account ListpostSocial Account DetailpostDisconnect Social AccountpostRefresh Social TokenpostUpdate Account RemarkpostTikTok QR Code LoginpostTikTok QR Code Status Checkpost
    Social/2.Video Publishing
      Trigger Quality PrecheckpostPrecheck Record ListpostCancel Individual PublishpostPublish Session StatuspostCancel Publish SessionpostUpload and Publish Videopost
    Social/3.Video Management
      Publishing Record ListpostValidate Video InfopostPublishing Record DetailpostPlatform Video Metrics Listpost
    Social/4.Comment Management
      Create CommentpostDelete CommentpostLike CommentpostManaged Comment ListpostManaged Reply ListpostReal-time Comment QuerypostComment RepliespostReply to CommentpostSync Commentspost
    Social/5.Analytics
      Analytics OverviewpostShoppable Video ListpostShoppable Video DetailpostTop Accounts RankingpostTop Products RankingpostTop Videos RankingpostAnalytics Trendpost
    Social/6.Creation Tools
      Hashtag SuggestionspostRecently Used MusicpostPopular Music Searchpost
    Social/7.TikTok Shop
      TikTok Shop Product ListpostAdd Product to Showcasepost
Ads
    Ads/Accounts
      Ad Account ListpostUpdate Ad Account Remarkpost
    Ads/Campaigns
      Ad ListpostAd DetailpostAd Insight Datapost
    Ads/Landing Pages
      Landing Page ListpostLanding Page Field Definitionspost
    Ads/Leads & Reports
      Leads ListpostAd Integrated Reportpost
General
    Async Tasks
      Query async task statusget
    File Upload
      Generate Presigned Upload URLpost
Trenz Open Platform API

Trenz Open Platform API

Trenz Open Platform API for cross-border e-commerce data, content creation, social media management and advertising.

Authentication

All requests must include X-API-Key header or Authorization: Bearer <API-Key>.

Error Codes

HTTPCodeDescription
400BAD_REQUESTMalformed request
400INVALID_PARAMInvalid parameter
400MISSING_PARAMRequired parameter missing
400INVALID_SORT_FIELDInvalid sort field
400INVALID_INCLUDEInvalid include parameter
400PAGE_SIZE_EXCEEDEDPage size exceeded
401AUTH_MISSING_KEYAPI Key missing
401AUTH_INVALID_KEYAPI Key invalid
401AUTH_KEY_REVOKEDAPI Key revoked
401AUTH_KEY_SUSPENDEDAPI Key suspended
402INSUFFICIENT_BALANCEInsufficient balance
403FORBIDDEN_SCOPENo permission to access this resource
404ROUTE_NOT_FOUNDEndpoint not found
404TASK_NOT_FOUNDAsync task not found
429RATE_LIMITEDRate limit exceeded
429QUOTA_EXCEEDEDQuota exceeded
500INTERNAL_ERRORInternal server error
502BACKEND_ERRORUpstream service error
503BACKEND_UNAVAILABLEUpstream service unavailable
504BACKEND_TIMEOUTUpstream service timeout
Tags
Data/Ads

Parameters

Ad Type Reference

Allowed values for ad_type:
ValueAd Type
1TikTok Shop Ads
2Independent Site Ads
3App Ads
4Game Ads
5Brand Ads
6Lead Ads
7Engagement Ads

Product Category ID Reference

The category parameter is the ad's associated product category ID:
Category IDCategory
601450Beauty & Personal Care
601152Womenswear & Underwear
700645Health
603014Sports & Outdoor
601739Phones & Electronics
600942Home Appliances
824328Menswear & Underwear
605248Fashion Accessories
700437Food & Beverages
600001Household Products
604453Furniture
600024Kitchenware
600154Home Textiles
824584Luggage & Bags
604206Toys & Hobbies
601352Shoes
604579Tools & Hardware
604968Home Improvement
602118Pet Supplies
601755Computers & Office
602284Baby & Maternity
605196Automotive & Motorcycle
951432Collectibles
801928Books, Magazines & Audio/Video
953224Jewelry & Accessories
856720Pre-Owned Goods
802184Kids' Fashion
These are Level-1 categories. Passing a Level-1 ID filters all ads in that category.
Data/Creatives

Parameters

  • country: Country code. Allowed values: us, th, my, vn, mx, de, fr, it, es, jp, br, gb, ph, sg, id

Product Category ID Reference

The category parameter is the creative's associated product category ID:
Category IDCategory
601450Beauty & Personal Care
601152Womenswear & Underwear
700645Health
603014Sports & Outdoor
601739Phones & Electronics
600942Home Appliances
824328Menswear & Underwear
605248Fashion Accessories
700437Food & Beverages
600001Household Products
604453Furniture
600024Kitchenware
600154Home Textiles
824584Luggage & Bags
604206Toys & Hobbies
601352Shoes
604579Tools & Hardware
604968Home Improvement
602118Pet Supplies
601755Computers & Office
602284Baby & Maternity
605196Automotive & Motorcycle
951432Collectibles
801928Books, Magazines & Audio/Video
953224Jewelry & Accessories
856720Pre-Owned Goods
802184Kids' Fashion
These are Level-1 categories. Passing a Level-1 ID filters all creatives in that category.
Data/Creators

Parameters

  • category: Creator category ID. Creator categories differ from product categories — they are content-niche tags. No list is provided yet; we recommend first searching without this parameter and then using the category_label field from the response for further filtering.
  • has_contact: Whether the creator has public contact info (true/false), filters creators with public email or social handles.
Data/Lives

Parameters

  • category: Streamer category ID; uses the same taxonomy as creator categories. No list is provided yet; we recommend first searching without this parameter.
  • is_living: Whether currently live-streaming (true/false)
  • is_commercial: Whether this is a commerce live stream (true/false)

Product Category ID Reference

The product_category parameter is the product category ID for commerce lives:
Category IDCategory
601450Beauty & Personal Care
601152Womenswear & Underwear
700645Health
603014Sports & Outdoor
601739Phones & Electronics
600942Home Appliances
824328Menswear & Underwear
605248Fashion Accessories
700437Food & Beverages
600001Household Products
604453Furniture
600024Kitchenware
600154Home Textiles
824584Luggage & Bags
604206Toys & Hobbies
601352Shoes
604579Tools & Hardware
604968Home Improvement
602118Pet Supplies
601755Computers & Office
602284Baby & Maternity
605196Automotive & Motorcycle
951432Collectibles
801928Books, Magazines & Audio/Video
953224Jewelry & Accessories
856720Pre-Owned Goods
802184Kids' Fashion
These are Level-1 categories. Passing a Level-1 ID filters all lives in that category.
Data/Products

Product Category ID Reference

The category parameter in search endpoints takes a numeric category ID. Below is the TikTok Level-1 category list:
Category IDCategory
601450Beauty & Personal Care
601152Womenswear & Underwear
700645Health
603014Sports & Outdoor
601739Phones & Electronics
600942Home Appliances
824328Menswear & Underwear
605248Fashion Accessories
700437Food & Beverages
600001Household Products
604453Furniture
600024Kitchenware
600154Home Textiles
824584Luggage & Bags
604206Toys & Hobbies
601352Shoes
604579Tools & Hardware
604968Home Improvement
602118Pet Supplies
601755Computers & Office
602284Baby & Maternity
605196Automotive & Motorcycle
951432Collectibles
801928Books, Magazines & Audio/Video
953224Jewelry & Accessories
856720Pre-Owned Goods
802184Kids' Fashion
These are Level-1 categories. Passing a Level-1 ID filters all products under that category.
Data/Sellers

Parameters

  • seller_type: Seller type (1=Overseas Non-Brand, 2=Local, 3=Brand, 4=Non-Brand)

Product Category ID Reference

The category parameter is the seller's primary product category ID; it uses the same taxonomy as product search:
Category IDCategory
601450Beauty & Personal Care
601152Womenswear & Underwear
700645Health
603014Sports & Outdoor
601739Phones & Electronics
600942Home Appliances
824328Menswear & Underwear
605248Fashion Accessories
700437Food & Beverages
600001Household Products
604453Furniture
600024Kitchenware
600154Home Textiles
824584Luggage & Bags
604206Toys & Hobbies
601352Shoes
604579Tools & Hardware
604968Home Improvement
602118Pet Supplies
601755Computers & Office
602284Baby & Maternity
605196Automotive & Motorcycle
951432Collectibles
801928Books, Magazines & Audio/Video
953224Jewelry & Accessories
856720Pre-Owned Goods
802184Kids' Fashion
These are Level-1 categories. Passing a Level-1 ID filters all sellers primarily in that category.
Data/Videos

Parameters

  • is_commercial: Whether this is a commerce video (true/false)

Product Category ID Reference

The category parameter is the video's associated product category ID:
Category IDCategory
601450Beauty & Personal Care
601152Womenswear & Underwear
700645Health
603014Sports & Outdoor
601739Phones & Electronics
600942Home Appliances
824328Menswear & Underwear
605248Fashion Accessories
700437Food & Beverages
600001Household Products
604453Furniture
600024Kitchenware
600154Home Textiles
824584Luggage & Bags
604206Toys & Hobbies
601352Shoes
604579Tools & Hardware
604968Home Improvement
602118Pet Supplies
601755Computers & Office
602284Baby & Maternity
605196Automotive & Motorcycle
951432Collectibles
801928Books, Magazines & Audio/Video
953224Jewelry & Accessories
856720Pre-Owned Goods
802184Kids' Fashion
These are Level-1 categories. Passing a Level-1 ID filters all videos in that category.
Content/AI Analysis
Content/AI Copywriting
Content/AI Image
All *_url fields in this section require publicly accessible URLs. To upload local files, first call the 'Generate Presigned Upload URL' endpoint under 'File Upload'.
Content/AI Video
All *_url fields in this section require publicly accessible URLs. To upload local files, first call the 'Generate Presigned Upload URL' endpoint under 'File Upload'.
Content/Avatar
All *_url fields in this section require publicly accessible URLs. To upload local files, first call the 'Generate Presigned Upload URL' endpoint under 'File Upload'.
Content/Material Search
Content/Tools
Social/1.Account Management
You must bind at least one social account before using any social media feature. TikTok QR-code login is currently supported. Once bound, call 'Social Account List' to view all connected accounts with their status and metrics.
Social/2.Video Publishing
One-step publishing via 'Upload and Publish Video', with support for immediate and scheduled publishing across multiple accounts.

Prerequisite: Bind a Social Account

You must bind at least one social account before publishing. Go to 'Social/1.Account Management' and use 'TikTok QR Code Login' + 'TikTok QR Code Status' for QR-based binding. Once bound, retrieve the id field from 'Social Account List' — this is the platform_account_id required by the publishing endpoint below.

Step 1: Upload File

1.1 Call 'Generate Presigned Upload URL' to get a temporary upload URL (this endpoint is under 'File Upload')

TerminalCode
curl -X POST "https://openapi.gateway.trenz.com/open/v1/social/upload/presigned-url" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"file_name": "my_video.mp4"}'
Response example:
Code
{ "data": { "presigned_url": "https://data-datanebula-object.tos-ap-southeast-1.volces.com/upload/my_video.mp4_xxx?...", "object_key": "upload/my_video.mp4_xxx", "s3_bucket": "data-datanebula-object", "cdn_url": "https://oss-data.trenz.ai/upload%2Fmy_video.mp4_xxx?..." } }
Record the returned object_key and s3_bucket — they are needed in the following steps.

1.2 Upload the file to presigned_url via PUT

TerminalCode
curl -X PUT "{presigned_url}" \ -H "Content-Type: video/mp4" \ --data-binary @my_video.mp4
presigned_url is valid for 1 hour. File size limits depend on the target platform (TikTok max 4GB, YouTube max 256GB, Instagram Reels max 1GB).

Step 2: Validate Video Info (Recommended)

After upload, call 'Validate Video Info' to check that the video matches the target platform's spec (resolution, duration, bitrate, etc.) and avoid publishing failures:
TerminalCode
curl -X POST "https://openapi.gateway.trenz.com/open/v1/social/videos/check-info" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"bucket_name": "data-datanebula-object", "bucket_key": "upload/my_video.mp4_xxx"}'
This endpoint checks encoding, resolution, duration, etc. against the requirements of TikTok, YouTube, Instagram and other platforms.

Step 3: Call 'Upload and Publish Video'

TerminalCode
curl -X POST "https://openapi.gateway.trenz.com/open/v1/social/publish/upload-and-publish" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "video_title": "My Video", "video_description": "Check this out!", "bucket_name": "data-datanebula-object", "bucket_key": "upload/my_video.mp4_xxx", "publications": [ { "platform_account_id": 4687, "title": "Check out this video!", "platform_config": "{\"privacy\":\"PUBLIC_TO_EVERYONE\"}" } ] }'
bucket_name = the s3_bucket returned in Step 1, bucket_key = the object_key returned in Step 1. Supports publishing to multiple accounts in parallel via the publications array. The returned session_token is used to poll publishing progress.

Scheduled Publishing

Set scheduled_at (Unix seconds) in each publications entry to schedule publishing. Each account can have its own schedule:
Code
{ "video_title": "My Video", "bucket_name": "data-datanebula-object", "bucket_key": "upload/my_video.mp4_xxx", "publications": [ { "platform_account_id": 4687, "title": "Publish now", "platform_config": "{\"privacy\":\"PUBLIC_TO_EVERYONE\"}" }, { "platform_account_id": 5678, "title": "Publish tomorrow", "scheduled_at": 1774100400, "platform_config": "{\"share_to_feed\":true}" } ] }
scheduled_at must fall within 5 minutes to 90 days from now. Omit or set to 0 for immediate publishing; values under 5 minutes are auto-demoted to immediate. Scheduled publications can be rescheduled via the 'Reschedule' endpoint.

Step 4: Poll 'Publish Session Status'

TerminalCode
curl -X POST "https://openapi.gateway.trenz.com/open/v1/social/publish/session" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"session_token": "127169e7-35e3-40..."}'
Recommended poll interval: 3–5 seconds. Repeat until status is completed or failed.

Cancel Publishing (Optional)

  • 'Cancel Publish Session' cancels an in-progress session: POST /open/v1/social/publish/session/cancel
  • 'Cancel Individual Publish' cancels a submitted publication: POST /open/v1/social/publish/cancel
Social/3.Video Management
Social/4.Comment Management
Social/5.Analytics
Social/6.Creation Tools
Social/7.TikTok Shop
Ads/Accounts
Ads/Campaigns
Ads/Landing Pages
Ads/Leads & Reports
Async Tasks

Async Task Workflow

  1. Submit the task (e.g. POST /open/v1/ai/videos/content-analysis) → returns task_id
  2. Poll status: GET /open/v1/tasks/{task_id}
    • status="running" → keep polling (recommended interval 3-5 sec)
    • status="success" → the result field contains the full result
    • status="failed" → the error_message field contains the error details
  3. Successful task results are persisted and can be retrieved again at any time
All AI analysis and AI generation endpoints are async. They return task_id immediately without blocking.
File Upload
Schemas
APIErrorAPIResponseUsageInfo
ContactTrenzsupport@trenz.ai
Servers
https://openapi.gateway.trenz.ai

Production

JSON
JSON