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/Products
      Product SearchgetProduct DetailgetProduct Related CreatorsgetProduct Related LivesgetProduct ReviewsgetSimilar ProductsgetProduct Related Videosget
    Data/Sellers
      Seller SearchgetSeller DetailgetSeller Related CreatorsgetSeller Related ProductsgetSeller Related Videosget
    Data/Creators
      Creator SearchgetCreator DetailgetCreator Related LivesgetCreator ProductsgetSimilar CreatorsgetCreator Videosget
    Data/Videos
      Video SearchgetVideo DetailgetVideo ProductsgetVideo ReviewsgetSimilar Videosget
    Data/Lives
      Live SearchgetLive DetailgetLive Related ProductsgetSimilar Livesget
    Data/Ads
      TikTok Ad Creative DetailgetAd Creative Related ProductsgetSimilar Ad CreativesgetAd Searchget
    Data/Creatives
      Creative SearchgetCreative Detailget
Content
    Content/AI Analysis
      Video Script Breakdown V2postVideo Storyboard Breakdownpost
    Content/AI Copywriting
      Product Review Analysispost
    Content/AI Image
      GPT-Image-2 Image GenerationpostNanobanana Image Generationpost
    Content/AI Video
      SeeDance2.0 Pro Fast Video GenerationpostSeeDance2.0 Video GenerationpostGrok Video GenerationpostVeo3 Video GenerationpostWan2.6 Video Generationpost
    Content/Material Search
      Aggregated Image Searchpost
Social
    Social/1.Account Management
      Social Account ListpostSocial Account DetailpostDisconnect Social AccountpostUpdate 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
Trenz Agent
    Trenz Agent/Chat
      Stream AI agent response (Server-Sent Events)post
    Trenz Agent/Sessions & Reports
      Get a single reportgetList the current user's sessionsgetGet a session's messagesgetGet all reports of a sessionget
General
    Account
      Query account status and credits balanceget
    Async Tasks
      Query async task statusget
    File Upload
      Generate Presigned Upload URLpost
Content Creation
    Content Creation/AI Video
      Happy Horse Video Generationpost
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_CREDITSInsufficient credits
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/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/Creators

Parameters

  • category: Creator category ID (a content-niche tag, a different taxonomy from product categories). See "Creator Category ID Reference" below for allowed values. You may also search without it and read the category_label field from the response for precise filtering.
  • has_contact: Whether the creator has public contact info (true/false), filters creators with public email or social handles.

Creator Category ID Reference

Category IDCategory
creator_category_v20240616_8Shopping & Retail
creator_category_v20240616_15Media & Entertainment
creator_category_v20240616_10Beauty & Fashion
creator_category_v20240616_14Personal Blog
creator_category_v20240616_12Clothing & Accessories
creator_category_v20240616_32Public Figure
creator_category_v20240616_23Art & Crafts
creator_category_v20240616_17Sports & Fitness
creator_category_v20240616_24Health & Wellness
creator_category_v20240616_13Music & Dance
creator_category_v20240616_9Home, Furniture & Appliances
creator_category_v20240616_19Pets & Animals
creator_category_v20240616_18Education
creator_category_v20240616_11Food & Drink
creator_category_v20240616_31Automotive & transportation
creator_category_v20240616_5Electronics
creator_category_v20240616_29Gaming
creator_category_v20240616_30Professional Services
creator_category_v20240616_16Baby
creator_category_v20240616_33Food & Cooking
creator_category_v20240616_20Travel & Tourism
creator_category_v20240616_27Finance & Investing
creator_category_v20240616_2Machinery & Equipment
creator_category_v20240616_21Brand
creator_category_v20240616_25Consultant & Service
creator_category_v20240616_4Property
creator_category_v20240616_28Government & Politics
creator_category_v20240616_6Restaurants & Bars
creator_category_v20240616_26IT & High Tech
creator_category_v20240616_22Software & Apps
creator_category_v20240616_3LIVE Creator Networks
creator_category_v20240616_7Movie, TV & Studio
creator_category_v20240616_34Others
Creator and streamer (live) categories share the same taxonomy; this table also applies to the category parameter of "Data/Lives".
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.
Data/Lives

Parameters

  • category: Streamer category ID; uses the same taxonomy as creator categories. See "Streamer Category ID Reference" below for allowed values. You may also search without it.
  • is_living: Whether currently live-streaming (true/false)
  • is_commercial: Whether this is a commerce live stream (true/false)

Streamer Category ID Reference

Category IDCategory
creator_category_v20240616_8Shopping & Retail
creator_category_v20240616_15Media & Entertainment
creator_category_v20240616_10Beauty & Fashion
creator_category_v20240616_14Personal Blog
creator_category_v20240616_12Clothing & Accessories
creator_category_v20240616_32Public Figure
creator_category_v20240616_23Art & Crafts
creator_category_v20240616_17Sports & Fitness
creator_category_v20240616_24Health & Wellness
creator_category_v20240616_13Music & Dance
creator_category_v20240616_9Home, Furniture & Appliances
creator_category_v20240616_19Pets & Animals
creator_category_v20240616_18Education
creator_category_v20240616_11Food & Drink
creator_category_v20240616_31Automotive & transportation
creator_category_v20240616_5Electronics
creator_category_v20240616_29Gaming
creator_category_v20240616_30Professional Services
creator_category_v20240616_16Baby
creator_category_v20240616_33Food & Cooking
creator_category_v20240616_20Travel & Tourism
creator_category_v20240616_27Finance & Investing
creator_category_v20240616_2Machinery & Equipment
creator_category_v20240616_21Brand
creator_category_v20240616_25Consultant & Service
creator_category_v20240616_4Property
creator_category_v20240616_28Government & Politics
creator_category_v20240616_6Restaurants & Bars
creator_category_v20240616_26IT & High Tech
creator_category_v20240616_22Software & Apps
creator_category_v20240616_3LIVE Creator Networks
creator_category_v20240616_7Movie, TV & Studio
creator_category_v20240616_34Others
category (streamer category) and product_category (commerce product category) are two different taxonomies — do not mix them up.

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/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.
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/Material Search
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
Trenz Agent/Chat
AI conversational agent endpoint (streaming Server-Sent Events response).
Trenz Agent/Sessions & Reports
Read-only sessions & reports: list sessions, get session messages, get session reports, get a single report. Free endpoints.
Account
Query account status, tier and credits balance.
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
Content Creation/AI Video
Schemas
APIErrorAPIResponseUsageInfo
ContactTrenzsupport@trenz.ai
Servers
https://openapi.gateway.trenz.ai

Production

JSON
JSON