{"components":{"schemas":{"APIError":{"properties":{"code":{"type":"string"},"docs_url":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","request_id"],"type":"object"},"APIResponse":{"properties":{"data":{"description":"Response data (endpoint-specific)","type":"object"},"page":{"type":"integer"},"page_size":{"type":"integer"},"request_id":{"type":"string"},"total":{"description":"Total count (list endpoints)","type":"integer"},"usage":{"$ref":"#/components/schemas/UsageInfo"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["data","request_id"],"type":"object"},"UsageInfo":{"properties":{"credits_balance":{"description":"Remaining credits balance after this request","type":"integer"},"credits_cost":{"description":"Credits consumed for this request","type":"integer"}},"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"in":"header","name":"X-API-Key","type":"apiKey"},"BearerAuth":{"scheme":"bearer","type":"http"}}},"info":{"contact":{"email":"support@trenz.ai","name":"Trenz"},"description":"Trenz Open Platform API for cross-border e-commerce data, content creation, social media management and advertising.\n\n## Authentication\n\nAll requests must include `X-API-Key` header or `Authorization: Bearer \u003cAPI-Key\u003e`.\n\n## Error Codes\n\n| HTTP | Code | Description |\n|------|------|-------------|\n| 400 | BAD_REQUEST | Malformed request |\n| 400 | INVALID_PARAM | Invalid parameter |\n| 400 | MISSING_PARAM | Required parameter missing |\n| 400 | INVALID_SORT_FIELD | Invalid sort field |\n| 400 | INVALID_INCLUDE | Invalid include parameter |\n| 400 | PAGE_SIZE_EXCEEDED | Page size exceeded |\n| 401 | AUTH_MISSING_KEY | API Key missing |\n| 401 | AUTH_INVALID_KEY | API Key invalid |\n| 401 | AUTH_KEY_REVOKED | API Key revoked |\n| 401 | AUTH_KEY_SUSPENDED | API Key suspended |\n| 402 | INSUFFICIENT_CREDITS | Insufficient credits |\n| 403 | FORBIDDEN_SCOPE | No permission to access this resource |\n| 404 | ROUTE_NOT_FOUND | Endpoint not found |\n| 404 | TASK_NOT_FOUND | Async task not found |\n| 429 | RATE_LIMITED | Rate limit exceeded |\n| 429 | QUOTA_EXCEEDED | Quota exceeded |\n| 500 | INTERNAL_ERROR | Internal server error |\n| 502 | BACKEND_ERROR | Upstream service error |\n| 503 | BACKEND_UNAVAILABLE | Upstream service unavailable |\n| 504 | BACKEND_TIMEOUT | Upstream service timeout |","title":"Trenz Open Platform API","version":"1.0.0"},"openapi":"3.0.3","paths":{"/open/v1/ad-creatives/{id}":{"get":{"description":"Get TikTok ad creative details.","operationId":"trenz-ad-creative-detail","parameters":[{"description":"Ad creative ID","in":"path","name":"entity_id","required":true,"schema":{"type":"string"}},{"description":"Region code","in":"query","name":"country","required":true,"schema":{"enum":["us","th","my","vn","mx","it","fr","de","es","jp","br","gb","ph","sg","id"],"type":"string"}},{"description":"Included sub-resources, comma-separated: calendar,core,trend,products,similar","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Include related resources, comma-separated (values: core(Core Metrics))","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"ad_cover":{"description":"Ad cover image","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"ad_create_time":{"description":"Ad creation time","type":"integer"},"ad_title":{"description":"Ad title","type":"string"},"ad_url":{"description":"Ad URL","type":"string"},"advertiser_avatar":{"description":"Advertiser avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"advertiser_id":{"description":"Advertiser ID","type":"string"},"advertiser_name":{"description":"Advertiser name","type":"string"},"button_text":{"description":"CTA button text","type":"string"},"create_time":{"description":"Created at (ms timestamp)","type":"integer"},"duration":{"description":"Duration (ms)","type":"integer"},"id":{"description":"Unique identifier","type":"string"},"last_update_time":{"description":"Last updated (ms timestamp)","type":"integer"},"web_url":{"description":"Product page URL","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"TikTok Ad Creative Detail","tags":["Data/Ads"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.ads.read"}},"/open/v1/ad-creatives/{id}/products":{"get":{"description":"","operationId":"trenz-ad-creative-products","parameters":[{"description":"Ad Creative ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_ads_detail_product_country_code":{"description":"Country code","type":"string"},"tiktok_ads_detail_product_id":{"description":"Unique identifier","type":"string"},"tiktok_ads_detail_product_launch_time":{"description":"Published at (ms timestamp)","type":"integer"},"tiktok_ads_detail_product_total_gmv":{"description":"Total GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_ads_detail_product_total_sold_count":{"description":"Total units sold","type":"integer"},"tiktok_ads_detail_video_30d_gmv":{"description":"Video 30D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_ads_detail_video_30d_sold_count":{"description":"Video 30D Sold Count","type":"integer"},"tiktok_ads_detail_video_id":{"description":"Video ID","type":"string"},"tiktok_product_detail_ceiling_price":{"description":"Max price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_product_detail_commission_rate":{"description":"Commission rate","type":"number"},"tiktok_product_detail_floor_price":{"description":"Min price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_product_detail_l1_category":{"description":"Level-1 category","type":"string"},"tiktok_product_detail_l2_category":{"description":"Level-2 category","type":"string"},"tiktok_product_detail_l3_category":{"description":"Level-3 category","type":"string"},"tiktok_product_detail_product_images":{"description":"Product images","items":{"properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"type":"array"},"tiktok_product_detail_product_name":{"description":"Product name","type":"string"},"tiktok_product_detail_product_rating":{"description":"Product rating (0-5)","type":"number"},"tiktok_product_detail_product_sku_props":{"description":"SKU properties","items":{"properties":{"has_image":{"description":"Has image","type":"boolean"},"prop_id":{"description":"Property ID","type":"string"},"prop_name":{"description":"Property name","type":"string"},"sale_prop_values":{"description":"Property values","items":{"properties":{"image":{"properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"prop_value":{"description":"Property value","type":"string"},"prop_value_id":{"description":"Property value ID","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"},"tiktok_product_detail_product_skus":{"description":"SKU list","items":{"properties":{"is_hot":{"description":"Is hot selling","type":"boolean"},"price":{"properties":{"discount":{"description":"Discount info","type":"string"},"original_price":{"description":"Original price","type":"string"},"original_price_value":{"description":"Original price value","type":"string"},"real_price":{"description":"Actual price","type":"number"},"unit_price_desc":{"description":"Unit price description","type":"string"}},"type":"object"},"sale_prop_value_ids":{"description":"Property value ID combination","type":"string"},"sku_id":{"description":"SKU ID","type":"string"},"sku_sale_props":{"description":"SKU properties","items":{"properties":{"prop_id":{"description":"Property ID","type":"string"},"prop_name":{"description":"Property name (e.g. Color)","type":"string"},"prop_value":{"description":"Property value","type":"string"},"prop_value_id":{"description":"Property value ID","type":"string"}},"type":"object"},"type":"array"},"status":{"description":"Status (1=active)","type":"integer"},"stock":{"description":"Stock","type":"integer"}},"type":"object"},"type":"array"},"tiktok_product_detail_product_status":{"description":"Product status","type":"integer"},"tiktok_product_detail_region":{"description":"Region code","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Ad Creative Related Products","tags":["Data/Ads"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.ads.read"}},"/open/v1/ad-creatives/{id}/similar":{"get":{"description":"","operationId":"trenz-ad-creative-similar","parameters":[{"description":"Ad Creative ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_ads_detail_similar_ad_cover":{"description":"Ad cover image","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_ads_detail_similar_ad_create_time":{"description":"Ad creation time","type":"integer"},"tiktok_ads_detail_similar_ad_day_count":{"description":"Days running","type":"integer"},"tiktok_ads_detail_similar_ad_title":{"description":"Ad title","type":"string"},"tiktok_ads_detail_similar_ad_type":{"description":"Ad type","type":"integer"},"tiktok_ads_detail_similar_ad_url":{"description":"Ad URL","type":"string"},"tiktok_ads_detail_similar_advertiser_avatar":{"description":"Advertiser avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_ads_detail_similar_advertiser_id":{"description":"Advertiser ID","type":"string"},"tiktok_ads_detail_similar_advertiser_name":{"description":"Advertiser name","type":"string"},"tiktok_ads_detail_similar_button_text":{"description":"CTA button text","type":"string"},"tiktok_ads_detail_similar_country_code":{"description":"Country code","type":"string"},"tiktok_ads_detail_similar_creative_id":{"description":"Creative ID","type":"string"},"tiktok_ads_detail_similar_duration":{"description":"Duration (ms)","type":"integer"},"tiktok_ads_detail_similar_last_update_time":{"description":"Last updated (ms timestamp)","type":"integer"},"tiktok_ads_detail_similar_objective_type":{"description":"Ad objective type","type":"integer"},"tiktok_ads_detail_similar_product_id":{"description":"Product ID","type":"string"},"tiktok_ads_detail_similar_product_images":{"description":"Product images","items":{"properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"type":"array"},"tiktok_ads_detail_similar_product_l1_category":{"description":"Product L1 Category","type":"string"},"tiktok_ads_detail_similar_product_l2_category":{"description":"Product L2 Category","type":"string"},"tiktok_ads_detail_similar_product_l3_category":{"description":"Product L3 Category","type":"string"},"tiktok_ads_detail_similar_product_title":{"description":"Product title","type":"string"},"tiktok_ads_detail_similar_total_gmv":{"description":"Total GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_ads_detail_similar_video_id":{"description":"Video ID","type":"string"},"tiktok_ads_detail_similar_video_play_count":{"description":"View count","type":"integer"},"tiktok_ads_detail_similar_video_popularity":{"description":"Video popularity","type":"integer"},"tiktok_ads_detail_similar_web_url":{"description":"Product page URL","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Similar Ad Creatives","tags":["Data/Ads"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.ads.read"}},"/open/v1/ads/accounts":{"post":{"description":"List ad accounts with platform filtering; returns account info and statistics.\n\nTo bind your account, please go to Trenz to complete the binding.","operationId":"trenz-ads-account-list","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"page":{"description":"Page number","type":"integer"},"page_size":{"default":10,"description":"Page size, default 10, max 100","maximum":100,"type":"integer"},"platforms":{"description":"Platform type list, default [\"tiktok-advertiser\"]","items":{"type":"string"},"type":"array"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"accounts":{"description":"Account list","items":{"properties":{"account_id":{"description":"Account ID","type":"string"},"advertiser_id":{"description":"Advertiser ID","type":"string"},"advertiser_name":{"description":"Advertiser name","type":"string"},"platform":{"description":"Platform type","type":"string"},"remark":{"description":"Remark","type":"string"},"status":{"description":"Status","type":"string"}},"type":"object"},"type":"array"},"page_info":{"description":"Pagination","properties":{"page":{"type":"integer"},"page_size":{"type":"integer"},"total_number":{"type":"integer"},"total_page":{"type":"integer"}},"type":"object"},"stats":{"description":"Account statistics","type":"object"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Ad Account List","tags":["Ads/Accounts"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.ads.read"}},"/open/v1/ads/accounts/remark":{"post":{"description":"Update the remark of an ad account; an empty string clears the remark.","operationId":"trenz-ads-account-update-remark","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Advertiser account ID (database primary key)","type":"string"},"remark":{"description":"Remark content, max 500 characters, empty string clears the remark","type":"string"}},"required":["account_id","remark"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"account":{"description":"Updated account info","properties":{"account_id":{"description":"Account ID","type":"string"},"advertiser_id":{"description":"Advertiser ID","type":"string"},"remark":{"description":"Updated remark","type":"string"}},"type":"object"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Update Ad Account Remark","tags":["Ads/Accounts"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.ads.write"}},"/open/v1/ads/search":{"get":{"description":"Search TikTok ad creatives with filters on delivery days, estimated GMV, engagement rate, etc.","operationId":"trenz-ads-search","parameters":[{"description":"Search keyword","example":"phone case","in":"query","name":"keyword","required":false,"schema":{"type":"string"}},{"description":"Ad category ID","example":"100001","in":"query","name":"category","required":false,"schema":{"type":"string"}},{"description":"Ad type: 1=TikTok Shop, 2=Independent Site, 3=App, 4=Game, 5=Brand, 6=Lead, 7=Engagement","example":"spark","in":"query","name":"ad_type","required":false,"schema":{"type":"string"}},{"description":"Exclude Spark Ads","example":false,"in":"query","name":"exclude_spark_ads","required":false,"schema":{"type":"boolean"}},{"description":"Min views","example":1000,"in":"query","name":"min_views","required":false,"schema":{"type":"number"}},{"description":"Max views","example":1000000,"in":"query","name":"max_views","required":false,"schema":{"type":"number"}},{"description":"Min GMV (USD)","example":1000,"in":"query","name":"min_gmv","required":false,"schema":{"type":"number"}},{"description":"Max GMV (USD)","example":100000,"in":"query","name":"max_gmv","required":false,"schema":{"type":"number"}},{"description":"Min delivery days","example":1,"in":"query","name":"min_days","required":false,"schema":{"type":"number"}},{"description":"Max delivery days","example":30,"in":"query","name":"max_days","required":false,"schema":{"type":"number"}},{"description":"Sort, format: field:asc|desc. Allowed: cost, days, engagement, gmv, views. Default: gmv:desc","example":"gmv:desc","in":"query","name":"sort","required":false,"schema":{"default":"gmv:desc","enum":["cost","days","engagement","gmv","views"],"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"ad_create_time":{"description":"Ad creation time","type":"integer"},"ad_day_count":{"description":"Days running","type":"integer"},"ad_maximum_cost":{"description":"Ad max spend","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"ad_roas":{"description":"Ad ROAS","type":"number"},"ad_title":{"description":"Ad title","type":"string"},"ad_url":{"description":"Ad URL","type":"string"},"advertiser_id":{"description":"Advertiser ID","type":"string"},"advertiser_name":{"description":"Advertiser name","type":"string"},"advertiser_url":{"description":"Advertiser URL","type":"string"},"button_text":{"description":"CTA button text","type":"string"},"country_code":{"description":"Country code","type":"string"},"create_time":{"description":"Created at (ms timestamp)","type":"integer"},"duration":{"description":"Duration (ms)","type":"integer"},"id":{"description":"Unique identifier","type":"string"},"last_update_time":{"description":"Last updated (ms timestamp)","type":"integer"},"product_id":{"description":"Product ID","type":"string"},"product_l1_category":{"description":"Product L1 category","type":"string"},"product_l2_category":{"description":"Product L2 category","type":"string"},"product_l3_category":{"description":"Product L3 category","type":"string"},"product_title":{"description":"Product title","type":"string"},"total_gmv":{"description":"Total GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"total_sc":{"description":"Total sales","type":"integer"},"video_engagement_rate":{"description":"Engagement rate (0-1)","type":"number"},"video_gpm_30d":{"description":"30-day video GPM","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"video_id":{"description":"Video ID","type":"string"},"video_like_count":{"description":"Like count","type":"integer"},"video_like_rate":{"description":"Like rate","type":"number"},"video_play_count":{"description":"View count","type":"integer"},"video_popularity":{"description":"Video popularity","type":"integer"},"web_url":{"description":"Product page URL","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Ad Search","tags":["Data/Ads"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.ads.read"}},"/open/v1/ads/tiktok/ads":{"post":{"description":"List TikTok ads with field selection, filter conditions, and metrics.","operationId":"trenz-ads-list","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Advertiser account ID","type":"string"},"advertiser_id":{"description":"Advertiser account ID","type":"string"},"exclude_field_types_in_response":{"description":"Excluded field types","items":{"type":"string"},"type":"array"},"fields":{"description":"Fields to return","items":{"type":"string"},"type":"array"},"filtering":{"description":"Filter (click to expand for details)","properties":{"ad_ids":{"description":"Ad ID list","items":{"type":"string"},"type":"array"},"ad_name":{"description":"Ad name (fuzzy search)","type":"string"},"adgroup_ids":{"description":"Ad group ID list","items":{"type":"string"},"type":"array"},"campaign_ids":{"description":"Ad campaign ID list","items":{"type":"string"},"type":"array"},"objective_type":{"description":"Delivery objective type","type":"string"},"primary_status":{"description":"Primary status","type":"string"},"secondary_status":{"description":"Sub-status","type":"string"}},"type":"object"},"force_refresh":{"description":"Whether to force refresh","type":"boolean"},"page":{"description":"Page number","type":"integer"},"page_size":{"default":20,"description":"Page size, default 20, max 100","maximum":100,"type":"integer"},"with_metrics":{"description":"Whether to include metric data","type":"boolean"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"list":{"description":"Ad list","items":{"properties":{"ad_id":{"type":"string"},"ad_name":{"type":"string"},"adgroup_id":{"type":"string"},"advertiser_id":{"type":"string"},"campaign_id":{"type":"string"},"create_time":{"type":"string"},"operation_status":{"type":"string"},"status":{"type":"string"}},"type":"object"},"type":"array"},"page_info":{"description":"Pagination","properties":{"page":{"type":"integer"},"page_size":{"type":"integer"},"total_number":{"type":"integer"},"total_page":{"type":"integer"}},"type":"object"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Ad List","tags":["Ads/Campaigns"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.ads.read"}},"/open/v1/ads/tiktok/ads/detail":{"post":{"description":"Get full details of a single TikTok ad, including targeting, budget/bid, and performance data.","operationId":"trenz-ads-detail","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"ad_id":{"description":"Ad ID","type":"string"}},"required":["ad_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"ad_id":{"description":"Ad ID","type":"string"},"ad_name":{"description":"Ad name","type":"string"},"ad_text":{"description":"Ad copy","type":"string"},"adgroup_id":{"description":"Ad group ID","type":"string"},"adgroup_name":{"description":"Ad group name","type":"string"},"advertiser_id":{"description":"Advertiser account ID","type":"string"},"advertiser_name":{"description":"Advertiser account name","type":"string"},"bid_price":{"description":"Bid","type":"number"},"budget":{"description":"Budget amount","type":"number"},"campaign_id":{"description":"Campaign ID","type":"string"},"campaign_name":{"description":"Campaign name","type":"string"},"currency":{"description":"Currency","type":"string"},"data_items":{"description":"Performance data","items":{"type":"object"},"type":"array"},"images":{"description":"Image file","items":{"properties":{"file_name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"objective_type_desc":{"description":"Promotion objective description","type":"string"},"operation_status":{"description":"Operation status","type":"string"},"schedule_end_time":{"description":"Delivery end time","type":"string"},"schedule_start_time":{"description":"Delivery start time","type":"string"},"state_desc":{"description":"Status description","type":"string"},"videos":{"description":"Video file","items":{"properties":{"file_name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Ad Detail","tags":["Ads/Campaigns"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.ads.read"}},"/open/v1/ads/tiktok/ads/insight":{"post":{"description":"Get TikTok ad performance data, including dashboard summary and daily breakdown.","operationId":"trenz-ads-insight-data","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"ad_id":{"description":"Ad ID","type":"string"},"end_date":{"description":"Query end date, format YYYY-MM-DD, omit for all-time","type":"string"},"start_date":{"description":"Query start date, format YYYY-MM-DD, omit for all-time","type":"string"}},"required":["ad_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"board_items":{"description":"Dashboard summary","items":{"properties":{"key":{"type":"string"},"label":{"type":"string"},"trend":{"type":"number"},"value":{"type":"number"}},"type":"object"},"type":"array"},"detail_items":{"description":"Daily detail data","items":{"properties":{"date":{"type":"string"},"metrics":{"type":"object"}},"type":"object"},"type":"array"},"metrics":{"description":"Available metric definition list","items":{"properties":{"key":{"type":"string"},"label":{"type":"string"},"unit":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Ad Insight Data","tags":["Ads/Campaigns"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.ads.read"}},"/open/v1/ads/tiktok/leads":{"post":{"description":"List TikTok ad leads, filterable by advertiser account, platform, and time range.","operationId":"trenz-ads-leads-list","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"advertiser_id":{"description":"Advertiser account ID","type":"string"},"end_time":{"description":"Lead creation time end (Unix seconds)","type":"integer"},"lead_id":{"description":"Lead ID (exact match)","type":"string"},"page":{"description":"Page number","type":"integer"},"page_size":{"default":10,"description":"Page size, default 10, max 100","maximum":100,"type":"integer"},"platform":{"description":"Platform type, e.g. tiktok","type":"string"},"start_time":{"description":"Lead creation time start (Unix seconds)","type":"integer"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"list":{"description":"Lead list","items":{"properties":{"ad_id":{"type":"string"},"advertiser_id":{"type":"string"},"create_time":{"type":"string"},"form_data":{"type":"object"},"lead_id":{"type":"string"},"page_id":{"type":"string"},"platform":{"type":"string"}},"type":"object"},"type":"array"},"page_info":{"description":"Pagination","properties":{"page":{"type":"integer"},"page_size":{"type":"integer"},"total_number":{"type":"integer"},"total_page":{"type":"integer"}},"type":"object"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Leads List","tags":["Ads/Leads \u0026 Reports"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.ads.read"}},"/open/v1/ads/tiktok/pages":{"post":{"description":"List TikTok landing pages, filterable by status, title, type, and time range.","operationId":"trenz-ads-pages-list","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Advertiser account ID","type":"string"},"advertiser_id":{"description":"Advertiser account ID (one of `advertiser_account_id` or `library_id` is required)","type":"string"},"business_type":{"description":"Page type, default LEAD_GEN","type":"string"},"business_types":{"description":"Page type array (takes precedence over `business_type`)","items":{"type":"string"},"type":"array"},"library_id":{"description":"Form library ID (required when migrating the page to Business Center)","type":"string"},"page":{"description":"Page number","type":"integer"},"page_size":{"default":20,"description":"Page size, default 20, max 100","maximum":100,"type":"integer"},"status":{"description":"Page status filter","type":"string"},"title":{"description":"Page title fuzzy search","type":"string"},"update_time_range":{"description":"Updated time range (click to expand for details)","properties":{"end_time":{"description":"End time","type":"string"},"start_time":{"description":"Start time","type":"string"}},"type":"object"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"list":{"description":"Landing page list","items":{"properties":{"business_type":{"type":"string"},"create_time":{"type":"string"},"page_id":{"type":"string"},"status":{"type":"string"},"title":{"type":"string"},"update_time":{"type":"string"}},"type":"object"},"type":"array"},"page_info":{"description":"Pagination","properties":{"page":{"type":"integer"},"page_size":{"type":"integer"},"total_number":{"type":"integer"},"total_page":{"type":"integer"}},"type":"object"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Landing Page List","tags":["Ads/Landing Pages"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.ads.read"}},"/open/v1/ads/tiktok/pages/fields":{"post":{"description":"List form field definitions for a TikTok landing page.","operationId":"trenz-ads-page-fields","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Advertiser account ID","type":"string"},"advertiser_id":{"description":"Advertiser account ID","type":"string"},"page_id":{"description":"Page ID","type":"string"}},"required":["account_id","advertiser_id","page_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"fields":{"description":"Form field list","items":{"properties":{"field_id":{"type":"string"},"field_name":{"type":"string"},"field_type":{"type":"string"},"options":{"items":{"type":"string"},"type":"array"},"required":{"type":"boolean"}},"type":"object"},"type":"array"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Landing Page Field Definitions","tags":["Ads/Landing Pages"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.ads.read"}},"/open/v1/ads/tiktok/report":{"post":{"description":"Get a TikTok ad integrated report with multi-dimensional, multi-metric aggregation.","operationId":"trenz-ads-integrated-report","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Advertiser account ID","type":"string"},"advertiser_id":{"description":"Advertiser account ID (one of `advertiser_account_id`, `advertiser_ids`, or `bc_id` is required)","type":"string"},"advertiser_ids":{"description":"Advertiser ID list, max 5","items":{"type":"string"},"type":"array"},"bc_id":{"description":"Business Center ID","type":"string"},"data_level":{"description":"Data level","enum":["AUCTION_AD","AUCTION_ADGROUP","AUCTION_CAMPAIGN","AUCTION_ADVERTISER"],"type":"string"},"dimensions":{"description":"Aggregation dimension","items":{"type":"string"},"type":"array"},"enable_total_metrics":{"description":"Whether to return aggregated metrics","type":"boolean"},"end_date":{"description":"End date, YYYY-MM-DD","type":"string"},"filtering":{"description":"Filter","items":{"properties":{"field_name":{"description":"Filter field name","type":"string"},"filter_type":{"description":"Filter type","type":"string"},"filter_value":{"description":"Filter value","type":"string"}},"type":"object"},"type":"array"},"metrics":{"description":"Metrics to query, default [\"spend\",\"impressions\"]","items":{"type":"string"},"type":"array"},"multi_adv_report_in_utc_time":{"description":"Whether to use UTC time","type":"boolean"},"order_field":{"description":"Sort field","type":"string"},"order_type":{"description":"Sort mode","enum":["ASC","DESC"],"type":"string"},"page":{"description":"Page number","type":"integer"},"page_size":{"default":10,"description":"Page size, default 10, max 1000","maximum":1000,"type":"integer"},"query_lifetime":{"description":"Whether to query lifetime metrics","type":"boolean"},"report_type":{"description":"Report type","enum":["BASIC","AUDIENCE","PLAYABLE_MATERIAL","CATALOG","BC","TT_SHOP"],"type":"string"},"service_type":{"description":"Service type","type":"string"},"start_date":{"description":"Start date, YYYY-MM-DD","type":"string"}},"required":["account_id","report_type","dimensions"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"list":{"description":"Report data list","items":{"properties":{"dimensions":{"description":"Dimension value","type":"object"},"metrics":{"description":"Metric value","type":"object"}},"type":"object"},"type":"array"},"page_info":{"description":"Pagination","properties":{"page":{"type":"integer"},"page_size":{"type":"integer"},"total_number":{"type":"integer"},"total_page":{"type":"integer"}},"type":"object"},"total_metrics":{"description":"Aggregated metrics (returned when enable_total_metrics is true)","type":"object"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Ad Integrated Report","tags":["Ads/Leads \u0026 Reports"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.ads.read"}},"/open/v1/agent/chat":{"post":{"description":"Call the AI conversational agent and receive a Server-Sent Events (SSE) stream. **The gateway entry costs 0 credits**; the real charge is settled per output token internally by the agent (see \"Billing\").\n\n**Protocol** — The response is a chunked SSE stream (**not** a single JSON payload). Each event is an `event:` line + a `data:` line + one blank line, per the SSE spec:\n\n```text\nevent: \u003cevent_type\u003e\ndata: \u003cJSON object\u003e\n\n```\n\n- The `data` line is standard JSON; non-ASCII characters are `\\uXXXX`-escaped. Read each `data:` line and JSON-parse it to recover the values.\n- Every event carries a monotonically increasing `seq`; process events in `seq` order, and stitch `content` text fragments by `seq` to reconstruct the full reply.\n- The stream interleaves heartbeat comment lines `: ping - \u003ctimestamp\u003e` (starting with `:`, a valid SSE comment). These are **not events — ignore them**; they only keep the long-lived connection alive.\n\n**Billing** — AI conversation is billed per **output token**, settled internally by the agent (not at the gateway entry):\n\n| codename | description | price (per output token) |\n|---|---|---|\n| `core` | Platform **default** model, strongest overall | about **$166.70 / 1M** ($0.167 / 1K) |\n\n- **Only output tokens are billed; input and cache read / write are all free.** The per-token rate looks high precisely because of this — cost is folded into output only: a turn's input (system prompt + tool results + history, often tens of thousands up to 100K+ tokens, much of it served from cache) usually far exceeds the output, yet **none of it is billed**, so the all-in cost comes out lower.\n- Capabilities triggered during the conversation (video / image generation) are billed **separately** per their async-task rules.\n- When credits hit 0 the **current turn completes**; the next request is rejected (surfaced in-stream as `event: error`, `code: INSUFFICIENT_CREDITS`).\n\n**model parameter** — Opaque codename. Trenz exposes a single model, `core` (default). Empty / omitted → `core`; an invalid value silently falls back to `core`.\n\n**attachments parameter** — Object-storage references (product images / model reference images / videos uploaded by the user). Each must include `os_bucket` + `os_key`; those two alone are enough for downstream image / video tools to reference by key. For direct LLM fetch (e.g. `recognize_image`) provide a pre-signed `url` (open-platform callers must sign it themselves). See the request body schema and example.\n\n**Inline XML tags in the assistant text** — Beyond Markdown, the reconstructed `content` text inlines the following tags, and they **may be split across multiple `content` events** — accumulate the full text (by `seq`) before parsing:\n\n| tag | form | meaning |\n|---|---|---|\n| `\u003creport\u003e` | paired | The core artifact: an analysis report; title attr is the title, body is standard Markdown, render in a dedicated panel |\n| `\u003centity\u003e` | self-closing | Entity reference (product / creator / shop / video, etc.); type / id etc. in attributes |\n| `\u003cchart\u003e` | paired | In-report chart; type (bar/line/pie), title attrs, body is JSON, data is self-contained |\n| `\u003ctask-result\u003e` | self-closing | Image / video generation result; result_type (image/video), image_url in attributes |\n| `\u003cvideo-scripts\u003e` | paired | Video script options; body is a JSON array, each item has `scenes` |\n| `\u003cselect\u003e` | paired | A choice control the user must answer; always outside `\u003c/report\u003e` |\n| `\u003csuggestions\u003e` | paired | Informational follow-up suggestions (Markdown list), does not pause the turn |\n| `\u003cconnect\u003e` | self-closing | OAuth authorization button; platform attr specifies the platform |\n\n- `\u003creport\u003e` — usually one per turn; body is Markdown, extract and render as the \"report\". The trailing `\u003cselect\u003e` / `\u003csuggestions\u003e` sit outside the report and must be extracted separately. The full report text is already in this turn's `content` stream — no extra fetch needed.\n\n### How to extract the report from the stream\n\nThe full report is already in the `content` event stream — **no extra endpoint needed**. Three steps:\n\n1. **Accumulate text**: collect `data.text` from every `event: content` into the full text (content is pushed in `seq` order; concatenating in arrival order is fine).\n2. **Wait for close**: a report is long and spans multiple `content` chunks; the simplest approach is to extract once after `event: done` (for streaming render, wait until `\u003c/report\u003e` appears).\n3. **Regex extract**: pull the title and body of `\u003creport\u003e` (the body is standard Markdown — hand it straight to your Markdown renderer).\n\n```js\nlet full = \"\"\nes.addEventListener(\"content\", e =\u003e { full += JSON.parse(e.data).text })\nes.addEventListener(\"done\", () =\u003e {\n  const m = full.match(/\u003creport\\s+[^\u003e]*\u003e([\\s\\S]*?)\u003c\\/report\u003e/)\n  if (m) {\n    const title    = m[0].match(/title=\"([^\"]*)\"/)?.[1] ?? \"\"\n    const markdown = m[1].trim()   // report body (Markdown)\n    renderReport(title, markdown)  // render in a dedicated panel\n  }\n}, { once: true })\n```\n\nThe report body may inline `\u003centity\u003e` / `\u003cchart\u003e` tags — post-process per the tag descriptions above; the remaining plain text (outside `\u003creport\u003e`) is the chat-bubble content.\n\nThe full report text comes from the `content` stream (the method above); to merely reference this turn's report, `event: done`'s `report_ids` already provides the persisted report ids — no need to parse them out of the full text.\n\n- `\u003cselect\u003e` — requires a user choice; when present, that turn's `event: done` reports `stop_reason: \"awaiting_user_input\"` (vs. `\"end_turn\"`). Format:\n\n```xml\n\u003cselect id=\"choice_xxx\" question=\"What would you like to do?\" multi=\"false\"\u003e\n  \u003coption value=\"option_a\"\u003eDisplay text A\u003c/option\u003e\n  \u003coption value=\"option_b\"\u003eDisplay text B\u003c/option\u003e\n\u003c/select\u003e\n```\n\n  Handling: render a selection UI (a `multi=\"true\"` attribute means multi-select) → POST the chosen option's **`value` attribute** (not the display text) as the next request's `message` (same `session_id`).\n\n- `\u003csuggestions\u003e` — informational follow-up suggestions (a Markdown list); does **not** pause the conversation (`stop_reason` stays `end_turn`). Render as clickable suggestions; on click, send that item's text as the next `message`.\n\n- `\u003centity\u003e` — the tag is only a *reference*: it carries no name / image / metrics, just `type` / `id` / `region` / `platform`. To render a rich card, fetch by `id` from the matching open-platform detail endpoint (product / creator / shop / video each have their own). `category` and sourcing entities (`platform=\"1688\"` / `\"web\"`) already carry their info in attributes — no fetch needed. **Detail endpoints are billed per call**; a report often contains many entities, so lazy-load and cache by id rather than fetching all at once.\n\n- `\u003cchart\u003e` — `type`: `bar` (comparison) / `line` (trend) / `pie` (share); `title` is required. Body is a JSON array — the first string field is the x-axis, the first numeric field is the y-axis (if an object has multiple numeric fields, only the first is rendered, not stacked).\n\n**Async task hand-off** — When the agent triggers a long-running capability (video / image generation), it emits an `event: task` (with a `task_id`), also listed in `event: done`'s `pending_tasks`. Poll the final result via `GET /open/v1/tasks/{task_id}`.","operationId":"agentChat","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"attachments":[{"media_type":"image/jpeg","name":"product.jpg","os_bucket":"trenz-uploads","os_key":"u/123/2026-05/product_xxx.jpg"},{"media_type":"model","name":"model_reference.jpg","os_bucket":"trenz-uploads","os_key":"u/123/2026-05/model_yyy.jpg"}],"message":"Generate a product video from the images I just uploaded, shown worn by the model","model":"core","session_id":"454bb2c9-f972-4371-8525-d26cda19eedc"},"schema":{"properties":{"attachments":{"description":"Optional. Object-storage references (images / model reference images / videos). Each must include `os_bucket` + `os_key`.","items":{"properties":{"media_type":{"description":"Optional, defaults to `image/jpeg`. Allowed: `image/png`, `image/jpeg`, `video/mp4`, `model` (special: a fashion model reference image, routed to the product-video tool's `model_images` argument rather than `images`).","type":"string"},"name":{"description":"Optional. Filename — a semantic label for the LLM.","type":"string"},"os_bucket":{"description":"Required. Object-storage bucket name (e.g. `trenz-uploads`).","type":"string"},"os_key":{"description":"Required. Object-storage object key (e.g. `u/123/2026-05/product_xxx.jpg`).","type":"string"},"url":{"description":"Optional. Pre-signed URL (for direct LLM fetch, e.g. `recognize_image`). Open-platform callers must sign it themselves; `os_bucket` + `os_key` alone is enough for downstream tools.","type":"string"}},"required":["os_bucket","os_key"],"type":"object"},"type":"array"},"message":{"description":"User message content. When responding to a `\u003cselect\u003e` widget from the prior turn, send the chosen option's `value` attribute as the message text.","type":"string"},"model":{"description":"Optional. Model codename: `core` (default, ~$166.70/1M output tokens). Empty = `core`.","enum":["core"],"type":"string"},"session_id":{"description":"Optional. Continue an existing chat session. Omit to start a new session; the response's `event: init` payload includes the assigned `session_id`.","format":"uuid","type":"string"}},"required":["message"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"text/event-stream":{"example":"event: init\ndata: {\"session_id\": \"c3f1e8a2-7b14-4f9d-8c3a-1d4e5f6a7b8c\", \"agent_id\": \"trenzer\", \"estimated_seconds\": 5}\n\nevent: content\ndata: {\"text\": \"\\u597d\\u7684\\uff0c\\u6b63\\u5728\\u4e3a\\u4f60\\u751f\\u6210\\u4ea7\\u54c1\\u89c6\\u9891\\u3002\", \"seq\": 1}\n\nevent: tool\ndata: {\"name\": \"submit_product_video\", \"status\": \"calling\", \"display_name\": \"\\u4ea7\\u54c1\\u89c6\\u9891\\u751f\\u6210\", \"seq\": 2}\n\nevent: tool\ndata: {\"name\": \"submit_product_video\", \"status\": \"done\", \"duration_ms\": 412, \"summary\": \"\\u4efb\\u52a1\\u5df2\\u63d0\\u4ea4\", \"seq\": 3}\n\nevent: task\ndata: {\"task_id\": \"9f8e7d6c-5b4a-3c2d-1e0f-a1b2c3d4e5f6\", \"tool_name\": \"submit_product_video\", \"display_name\": \"\\u4ea7\\u54c1\\u89c6\\u9891\\u751f\\u6210\", \"seq\": 4}\n\nevent: done\ndata: {\"stop_reason\": \"end_turn\", \"model\": \"core\", \"usage\": {\"input_tokens\": 142, \"output_tokens\": 38}, \"pending_tasks\": [{\"task_id\": \"9f8e7d6c-5b4a-3c2d-1e0f-a1b2c3d4e5f6\", \"tool_name\": \"submit_product_video\"}], \"report_ids\": [], \"message_id\": \"a7b8c9d0-1234-5678-9abc-def012345678\", \"seq\": 5}\n","schema":{"description":"Server-Sent Events stream. The HTTP response body is a sequence of events:\n\n    event: \u003cevent_type\u003e\n    data: \u003cJSON object\u003e\n    (blank line)\n\n`data` is standard JSON with non-ASCII `\\uXXXX`-escaped. **Event types**:\n\n- `init` — Stream start (always first).\n    `data: { session_id: string, agent_id: string, estimated_seconds?: int }`\n\n- `agent` — Switched to a specialist agent (e.g. `market-analyst`); status hint only.\n    `data: { agent_id: string, seq: int }`\n\n- `content` — Streamed assistant text (zero or more).\n    `data: { text: string, seq: int }`\n\n  Note: text may contain inline XML tags (`\u003creport\u003e`, `\u003centity\u003e`, `\u003cchart\u003e`, `\u003ctask-result\u003e`, `\u003cvideo-scripts\u003e`, `\u003cselect\u003e`, `\u003csuggestions\u003e`, `\u003cconnect\u003e`) and may be split across multiple content events — accumulate the full text (by `seq`) before parsing (see the operation description for each tag's semantics).\n\n- `tool` — Tool call lifecycle event (zero or more).\n    `data: { name: string, status: \"calling\" | \"done\" | \"error\", display_name?: string, summary?: string, duration_ms?: int, seq: int }`\n\n- `task` — An async task was created (long-running capability, e.g. video / image generation). Poll it via `GET /open/v1/tasks/{task_id}`.\n    `data: { task_id: string, tool_name: string, display_name?: string, seq: int }`\n\n- `done` — Stream end (always last on successful completion).\n    `data: { stop_reason: string, model?: string, usage?: { input_tokens: int, output_tokens: int }, pending_tasks?: array, report_ids?: array, message_id?: string, seq?: int }`\n\n    Note: `usage` here is **LLM token counts** (the billing dimension, based on `output_tokens`), distinct from the HTTP envelope's `usage.credits_cost` / `usage.credits_balance`. `model` echoes the codename used for this turn. `report_ids` are the report ids generated / updated this turn (already server-persisted); the full report text is in the `content` stream, so this does not imply a separate fetch.\n\n    `stop_reason` values:\n    - `end_turn` — Turn complete.\n    - `awaiting_user_input` — Turn paused; `content` text contains a `\u003cselect\u003e` widget requiring a user reply.\n    - `max_tokens` — LLM token budget exhausted; response truncated.\n    - `max_turns` — Reached the per-request maximum agent turn limit.\n    - `error` — Generation failed (detail typically also surfaces as a preceding `event: error`).\n    - `abort` — Client closed the connection or upstream aborted.\n\n- `error` — In-stream error event (may appear before or instead of `done`).\n    `data: { message: string, code?: string }`\n    Common `code`: `INSUFFICIENT_CREDITS` (balance is 0).\n\n**Keep-alive** — The stream periodically emits SSE comment lines starting with `:` (e.g. `: ping - \u003ctimestamp\u003e`, roughly every 15s). These are standard SSE comments (not events); clients must ignore them.\n\n**Stream termination** — Stream ends after `done` or `error` (no recovery path). Connection close is definitive.\n\n**Session continuation** — Pass the `session_id` from `init` in the next request. Omitting `session_id` always starts a new session.","type":"string"}}},"description":"SSE event stream (agent response)."},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Stream AI agent response (Server-Sent Events)","tags":["Trenz Agent/Chat"],"x-billing-mode":"free","x-coin-cost":0}},"/open/v1/ai/gpt-image-2/image/generation":{"post":{"description":"GPT-Image-2 AI image generation (powered by OpenAI GPT-Image-2), with reference-image guidance.\n\n\u003e 💡 **About reference images**\n\u003e\n\u003e Simply pass publicly accessible image URLs via the `images` field. This endpoint already wraps the upstream asset-library compliance flow internally — callers do NOT need to invoke the Asset Library API separately.\n\nAsync endpoint, returns `task_id`. Use `GET /open/v1/tasks/{task_id}` to poll task status and result.","operationId":"trenz-ai-gpt-image-2-generate","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"function_type":{"default":"general_edit","description":"Function type: general_edit, ai_clothing, product_image, digital_avatar, handheld_product","enum":["general_edit","ai_clothing","product_image","digital_avatar","handheld_product"],"type":"string"},"image_size":{"default":"1K","description":"Output image resolution","enum":["1K","2K","4K"],"type":"string"},"images":{"description":"Reference image list (recommended unified input field)","items":{"properties":{"url":{"description":"Image URL (any publicly accessible image link)","type":"string"}},"type":"object"},"type":"array"},"prompt":{"description":"Image generation prompt, 1-5000 characters","type":"string"},"ratio":{"default":"9:16","description":"Output image aspect ratio","enum":["1:1","9:16","16:9"],"type":"string"}},"required":["prompt"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":20}},"schema":{"properties":{"data":{"properties":{"task_id":{"description":"Async task ID for status polling","type":"string"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"GPT-Image-2 Image Generation","tags":["Content/AI Image"],"x-billing-mode":"async_on_complete","x-coin-cost":20,"x-pricing":{"default_quantity":1,"default_tier":"1K","fallback_coin_cost":20,"mode":"per_unit","quantity_param":"","tier_param":"image_size","unit_price_map":{"1K":15,"2K":15,"4K":20}},"x-scope":"trenz.ai_image.write"}},"/open/v1/ai/nanobanana/image/generation":{"post":{"description":"Nanobanana AI image generation (powered by Google Gemini multimodal models with SWRR multi-provider dispatch), with reference-image guidance.\n\n\u003e 💡 **About reference images**\n\u003e\n\u003e Simply pass publicly accessible image URLs via the `images` field. This endpoint already wraps the upstream asset-library compliance flow internally — callers do NOT need to invoke the Asset Library API separately.\n\nAsync endpoint, returns `task_id`. Use `GET /open/v1/tasks/{task_id}` to poll task status and result.","operationId":"trenz-ai-nanobanana-generate","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"function_type":{"default":"general_edit","description":"Function type: general_edit, ai_clothing, product_image, digital_avatar, handheld_product","enum":["general_edit","ai_clothing","product_image","digital_avatar","handheld_product"],"type":"string"},"image_size":{"default":"1K","description":"Output image resolution","enum":["1K","2K","4K"],"type":"string"},"images":{"description":"Reference image list (recommended unified input field)","items":{"properties":{"url":{"description":"Image URL (any publicly accessible image link)","type":"string"}},"type":"object"},"type":"array"},"prompt":{"description":"Image generation prompt, 1-5000 characters","type":"string"},"ratio":{"default":"9:16","description":"Output image aspect ratio","enum":["1:1","9:16","16:9"],"type":"string"}},"required":["prompt"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":20}},"schema":{"properties":{"data":{"properties":{"task_id":{"description":"Async task ID for status polling","type":"string"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Nanobanana Image Generation","tags":["Content/AI Image"],"x-billing-mode":"async_on_complete","x-coin-cost":20,"x-pricing":{"default_quantity":1,"default_tier":"1K","fallback_coin_cost":20,"mode":"per_unit","quantity_param":"","tier_param":"image_size","unit_price_map":{"1K":15,"2K":15,"4K":20}},"x-scope":"trenz.ai_image.write"}},"/open/v1/ai/products/review-analysis":{"post":{"description":"AI analysis of product user reviews.\n\nAsync endpoint, returns `task_id`. Use `GET /open/v1/tasks/{task_id}` to poll task status and result.","operationId":"trenz-product-review-analysis","parameters":[{"description":"Country code","in":"query","name":"country_code","schema":{"default":"us","type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"is_regenerate":{"default":false,"description":"Whether to force re-analysis","type":"boolean"},"product_id":{"description":"Product ID","type":"string"}},"required":["product_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":20}},"schema":{"properties":{"data":{"properties":{"product_id":{"description":"Product ID","type":"string"},"task_id":{"description":"Async task ID","type":"string"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Product Review Analysis","tags":["Content/AI Copywriting"],"x-billing-mode":"async_on_complete","x-coin-cost":20,"x-scope":"trenz.ai.write"}},"/open/v1/ai/sd-pro-fast/video/generation":{"post":{"description":"SeeDance2.0 Fast AI video generation with multi-image, reference video/audio, frame mode and other advanced features; faster generation.\n\n\u003e 💡 **Real-person reference images / videos**\n\u003e\n\u003e The upstream \"Asset Library API\" is used for compliance verification of real-person images / videos.\n\u003e\n\u003e **🎯 This endpoint already wraps that flow internally — callers do NOT need to invoke the Asset Library API separately.**\n\u003e\n\u003e Simply pass publicly accessible image / video URLs via the `images` or `reference_videos` fields.\n\nAsync endpoint, returns `task_id`. Use `GET /open/v1/tasks/{task_id}` to poll task status and result.","operationId":"trenz-ai-sd-pro-fast-generate","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"aspect_ratio":{"default":"9:16","enum":["9:16","16:9","1:1","4:3","3:4","21:9"],"type":"string"},"audio":{"default":true,"type":"boolean"},"country_code":{"default":"us","type":"string"},"duration":{"default":5,"maximum":15,"minimum":4,"type":"integer"},"images":{"description":"Multiple reference image list","items":{"properties":{"url":{"type":"string"}},"type":"object"},"type":"array"},"language":{"type":"string"},"prompt":{"description":"Video generation prompt, 1-5000 characters","type":"string"},"reference_audios":{"description":"Reference audio list","items":{"properties":{"url":{"type":"string"}},"type":"object"},"type":"array"},"reference_videos":{"description":"Reference video list","items":{"properties":{"url":{"type":"string"}},"type":"object"},"type":"array"},"resolution":{"default":"720p","enum":["480p","720p"],"type":"string"},"role_mode":{"default":"reference","enum":["reference","frame"],"type":"string"}},"required":["prompt"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":300}},"schema":{"properties":{"data":{"properties":{"task_id":{"description":"Async task ID","type":"string"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"SeeDance2.0 Pro Fast Video Generation","tags":["Content/AI Video"],"x-billing-mode":"async_on_complete","x-coin-cost":300,"x-pricing":{"default_quantity":5,"default_tier":"720p","fallback_coin_cost":300,"mode":"per_unit","quantity_param":"duration","tier_param":"resolution","unit_price_map":{"480p":10,"720p":20}},"x-scope":"trenz.ai_video.write"}},"/open/v1/ai/sd-pro/video/generation":{"post":{"description":"SeeDance2.0 Pro AI video generation with multi-image, reference video/audio, frame mode and other advanced features.\n\n\u003e 💡 **Real-person reference images / videos**\n\u003e\n\u003e The upstream \"Asset Library API\" is used for compliance verification of real-person images / videos.\n\u003e\n\u003e **🎯 This endpoint already wraps that flow internally — callers do NOT need to invoke the Asset Library API separately.**\n\u003e\n\u003e Simply pass publicly accessible image / video URLs via the `images` or `reference_videos` fields.\n\nAsync endpoint, returns `task_id`. Use `GET /open/v1/tasks/{task_id}` to poll task status and result.","operationId":"trenz-ai-sd-pro-generate","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"aspect_ratio":{"default":"9:16","enum":["9:16","16:9","1:1","4:3","3:4","21:9"],"type":"string"},"audio":{"default":true,"type":"boolean"},"country_code":{"default":"us","type":"string"},"duration":{"default":5,"maximum":15,"minimum":4,"type":"integer"},"images":{"description":"Multiple reference image list","items":{"properties":{"url":{"type":"string"}},"type":"object"},"type":"array"},"language":{"type":"string"},"prompt":{"description":"Video generation prompt, 1-5000 characters","type":"string"},"reference_audios":{"description":"Reference audio list","items":{"properties":{"url":{"type":"string"}},"type":"object"},"type":"array"},"reference_videos":{"description":"Reference video list","items":{"properties":{"url":{"type":"string"}},"type":"object"},"type":"array"},"resolution":{"default":"720p","enum":["480p","720p","1080p"],"type":"string"},"role_mode":{"default":"reference","enum":["reference","frame"],"type":"string"}},"required":["prompt"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":450}},"schema":{"properties":{"data":{"properties":{"task_id":{"description":"Async task ID","type":"string"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"SeeDance2.0 Video Generation","tags":["Content/AI Video"],"x-billing-mode":"async_on_complete","x-coin-cost":450,"x-pricing":{"default_quantity":5,"default_tier":"720p","fallback_coin_cost":450,"mode":"per_unit","quantity_param":"duration","tier_param":"resolution","unit_price_map":{"1080p":50,"480p":20,"720p":30}},"x-scope":"trenz.ai_video.write"}},"/open/v1/ai/search/image":{"post":{"description":"Aggregated multi-source image search.","operationId":"trenz-ai-image-search","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"limit":{"default":20,"description":"Result size limit, max 100","type":"integer"},"offset":{"default":0,"description":"Pagination offset","type":"integer"},"query":{"description":"Search keyword","type":"string"}},"required":["query"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":20}},"schema":{"properties":{"data":{"properties":{"items":{"description":"Image list","items":{"properties":{"author":{"type":"string"},"description":{"type":"string"},"height":{"type":"integer"},"id":{"type":"string"},"source":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"},"width":{"type":"integer"}},"type":"object"},"type":"array"},"total":{"description":"Total count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Aggregated Image Search","tags":["Content/Material Search"],"x-billing-mode":"per_call","x-coin-cost":20,"x-scope":"trenz.ai.read"}},"/open/v1/ai/videos/grok/generate":{"post":{"description":"Grok-model image-to-video generation, supporting multiple aspect ratios and durations.\n\nAsync endpoint, returns `task_id`. Use `GET /open/v1/tasks/{task_id}` to poll task status and result.","operationId":"trenz-ai-grok-generate","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"aspect_ratio":{"default":"9:16","description":"Aspect ratio","enum":["9:16","16:9"],"type":"string"},"duration":{"default":5,"description":"Video duration (seconds)","maximum":15,"minimum":2,"type":"integer"},"image":{"description":"Image info (required, image-to-video, click to expand for details)","properties":{"url":{"description":"Image URL (any publicly accessible image URL is supported)","type":"string"}},"type":"object"},"language":{"default":"default","description":"Language","type":"string"},"prompt":{"description":"Video generation prompt","type":"string"}},"required":["prompt"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":210}},"schema":{"properties":{"data":{"properties":{"job_id":{"description":"Async task ID","type":"string"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Grok Video Generation","tags":["Content/AI Video"],"x-billing-mode":"async_on_complete","x-coin-cost":210,"x-pricing":{"default_quantity":5,"default_tier":"_default","fallback_coin_cost":210,"mode":"per_unit","quantity_param":"duration","tier_param":"","unit_price_map":{"_default":15}},"x-scope":"trenz.ai.write"}},"/open/v1/ai/videos/happyhorse/generate":{"post":{"description":"Happy Horse AI Video Generation\n\nAsync endpoint, returns `task_id`. Use `GET /open/v1/tasks/{task_id}` to poll task status and result.","operationId":"trenz-ai-happyhorse-generate","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"aspect_ratio":{"default":"9:16","enum":["9:16","16:9","1:1","4:3","3:4"],"type":"string"},"duration":{"default":5,"maximum":15,"minimum":3,"type":"integer"},"images":{"description":"Multiple reference image list，max 5 images","items":{"properties":{"url":{"type":"string"}},"type":"object"},"type":"array"},"language":{"default":"default","type":"string"},"prompt":{"description":"Video generation prompt","type":"string"},"resolution":{"default":"720p","enum":["720p","1080p"],"type":"string"}},"required":["prompt"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":675}},"schema":{"properties":{"data":{"properties":{"task_id":{"description":"Async task ID","type":"string"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Happy Horse Video Generation","tags":["Content/AI Video"],"x-billing-mode":"async_on_complete","x-coin-cost":675,"x-pricing":{"default_quantity":5,"default_tier":"720p","fallback_coin_cost":675,"mode":"per_unit","quantity_param":"duration","tier_param":"resolution","unit_price_map":{"1080p":45,"720p":18}},"x-scope":"trenz.ai.write"}},"/open/v1/ai/videos/scripts/breakdown-v2":{"post":{"description":"Structured breakdown of a video script (V2, enhanced).\n\nAsync endpoint, returns `task_id`. Use `GET /open/v1/tasks/{task_id}` to poll task status and result.","operationId":"trenz-video-scripts-breakdown-v2","parameters":[{"description":"Language","in":"query","name":"language","schema":{"default":"en","type":"string"}},{"description":"Country code","in":"query","name":"country_code","schema":{"default":"us","type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"is_regenerate":{"default":false,"description":"Whether to force regeneration","type":"boolean"},"video_id":{"description":"Video ID","type":"string"}},"required":["video_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":20}},"schema":{"properties":{"data":{"properties":{"task_id":{"description":"Async task ID","type":"string"},"video_id":{"description":"Video ID","type":"string"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Video Script Breakdown V2","tags":["Content/AI Analysis"],"x-billing-mode":"async_on_complete","x-coin-cost":20,"x-scope":"trenz.ai.write"}},"/open/v1/ai/videos/scripts/storyboard":{"post":{"description":"Structured breakdown of video storyboard.\n\nAsync endpoint, returns `task_id`. Use `GET /open/v1/tasks/{task_id}` to poll task status and result.","operationId":"trenz-video-scripts-storyboard","parameters":[{"description":"Language","in":"query","name":"language","schema":{"default":"en","type":"string"}},{"description":"Country code","in":"query","name":"country_code","schema":{"default":"us","type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"video_id":{"description":"Video ID","type":"string"}},"required":["video_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":20}},"schema":{"properties":{"data":{"properties":{"task_id":{"description":"Async task ID","type":"string"},"video_id":{"description":"Video ID","type":"string"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Video Storyboard Breakdown","tags":["Content/AI Analysis"],"x-billing-mode":"async_on_complete","x-coin-cost":20,"x-scope":"trenz.ai.write"}},"/open/v1/ai/videos/veo3/generate":{"post":{"description":"Veo 3.1-model video generation with multi-image input support.\n\nAsync endpoint, returns `task_id`. Use `GET /open/v1/tasks/{task_id}` to poll task status and result.","operationId":"trenz-ai-veo3-generate","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"aspect_ratio":{"default":"portrait","description":"Video ratio","type":"string"},"duration":{"default":8,"description":"Video duration (seconds)","enum":[5,8],"type":"integer"},"image":{"description":"Single image (optional, legacy format, click to expand for details)","properties":{"url":{"description":"Image URL (any publicly accessible image URL is supported)","type":"string"}},"type":"object"},"images":{"description":"Image info array (optional, multi-image)","items":{"properties":{"url":{"description":"Image URL (any publicly accessible image URL is supported)","type":"string"}},"type":"object"},"type":"array"},"language":{"default":"default","description":"Language","type":"string"},"prompt":{"description":"Video generation prompt","type":"string"}},"required":["prompt"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":210}},"schema":{"properties":{"data":{"properties":{"job_id":{"description":"Async task ID","type":"string"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Veo3 Video Generation","tags":["Content/AI Video"],"x-billing-mode":"async_on_complete","x-coin-cost":210,"x-pricing":{"default_quantity":8,"default_tier":"_default","fallback_coin_cost":210,"mode":"per_unit","quantity_param":"duration","tier_param":"","unit_price_map":{"_default":15}},"x-scope":"trenz.ai.write"}},"/open/v1/ai/videos/wan26/generate":{"post":{"description":"Wan2.6-model image-to-video generation, supporting 720p / 1080p.\n\nAsync endpoint, returns `task_id`. Use `GET /open/v1/tasks/{task_id}` to poll task status and result.","operationId":"trenz-ai-wan26-generate","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"duration":{"default":15,"description":"Video duration (seconds)","enum":[5,10,15],"type":"integer"},"image":{"description":"Image info (required, image-to-video, click to expand for details)","properties":{"url":{"description":"Image URL (any publicly accessible image URL is supported)","type":"string"}},"type":"object"},"language":{"default":"default","description":"Language","type":"string"},"prompt":{"description":"Video generation prompt","type":"string"},"resolution":{"default":"720p","description":"Video resolution","enum":["720p","1080p"],"type":"string"}},"required":["image","prompt"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":210}},"schema":{"properties":{"data":{"properties":{"job_id":{"description":"Async task ID","type":"string"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Wan2.6 Video Generation","tags":["Content/AI Video"],"x-billing-mode":"async_on_complete","x-coin-cost":210,"x-pricing":{"default_quantity":15,"default_tier":"720p","fallback_coin_cost":210,"mode":"per_unit","quantity_param":"duration","tier_param":"resolution","unit_price_map":{"1080p":15,"720p":15}},"x-scope":"trenz.ai.write"}},"/open/v1/auth/verify":{"get":{"description":"Query basic account information for the current API Key: user / app, pricing tier, credits balance and account status. Free endpoint — does not consume credits.","operationId":"auth-verify","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"app_id":1024,"credits_balance":12450,"status":"active","tier":"payg","user_id":"u_abc123"},"request_id":"req_abc123"},"schema":{"properties":{"data":{"properties":{"app_id":{"description":"Application ID","format":"int64","type":"integer"},"credits_balance":{"description":"Remaining credits balance","format":"int64","type":"integer"},"status":{"description":"Account status: `active` / `suspended` / `revoked` / `deleted`","type":"string"},"tier":{"description":"Pricing tier (defined by the control plane, e.g. `payg` / `tenant_basic`)","type":"string"},"user_id":{"description":"User ID","type":"string"}},"required":["user_id","app_id","tier","credits_balance","status"],"type":"object"},"request_id":{"type":"string"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Query account status and credits balance","tags":["Account"],"x-billing-mode":"free","x-coin-cost":0}},"/open/v1/creatives/search":{"get":{"description":"Search TikTok ad creatives / video creatives, with filters and sort on category, region, AIGC flag and more.","operationId":"trenz-creatives-search","parameters":[{"description":"Search keyword","example":"phone case","in":"query","name":"keyword","required":false,"schema":{"type":"string"}},{"description":"Creative category ID","example":"100001","in":"query","name":"category","required":false,"schema":{"type":"string"}},{"description":"Whether has linked products","example":true,"in":"query","name":"has_product","required":false,"schema":{"type":"boolean"}},{"description":"Whether is sponsored content","example":false,"in":"query","name":"is_sponsored","required":false,"schema":{"type":"boolean"}},{"description":"Whether is AI-generated content","example":false,"in":"query","name":"is_aigc","required":false,"schema":{"type":"boolean"}},{"description":"Sort, format: field:asc|desc. Allowed: engagement, gmv, gpm, likes, plays. Default: gmv:desc","example":"gmv:desc","in":"query","name":"sort","required":false,"schema":{"default":"gmv:desc","enum":["engagement","gmv","gpm","likes","plays"],"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"author_nickname":{"description":"Author name","type":"string"},"author_uid":{"description":"Author user ID","type":"string"},"author_unique_id":{"description":"Author TikTok username","type":"string"},"content_intent":{"description":"Content intent","type":"string"},"content_tag_v2":{"description":"Content tags","items":{"type":"string"},"type":"array"},"country_code":{"description":"Country code","type":"string"},"follower_cnt":{"description":"Follower count","type":"integer"},"id":{"description":"Unique identifier","type":"string"},"is_aigc_video":{"description":"Is AI-generated video","type":"boolean"},"platform":{"description":"Platform","type":"string"},"product_id":{"description":"Product ID","type":"string"},"user_avatar":{"description":"User avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"video_30d_gmv":{"description":"30-day video GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"video_30d_gpm":{"description":"30-day video GPM","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"video_collect_count":{"description":"Save count","type":"integer"},"video_comment_count":{"description":"Comment count","type":"integer"},"video_date":{"description":"Video date","type":"string"},"video_desc":{"description":"Video description","type":"string"},"video_duration":{"description":"Duration (ms)","type":"integer"},"video_engagement_rate":{"description":"Engagement rate (0-1)","type":"number"},"video_gmv":{"description":"Video GMV","type":"string"},"video_id":{"description":"Video ID","type":"string"},"video_launch_time":{"description":"Published at (ms timestamp)","type":"integer"},"video_like_count":{"description":"Like count","type":"integer"},"video_play_count":{"description":"View count","type":"integer"},"video_share_count":{"description":"Share count","type":"integer"},"video_total_gmv":{"description":"Video total GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"video_total_gpm":{"description":"Video total GPM","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Creative Search","tags":["Data/Creatives"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.creative.read"}},"/open/v1/creatives/{id}":{"get":{"description":"Get TikTok creative details with video metrics, creator info, linked products, and optional content analysis and embedding.","operationId":"trenz-creative-detail","parameters":[{"description":"Creative video ID","in":"path","name":"entity_id","required":true,"schema":{"type":"string"}},{"description":"Region code","in":"query","name":"country","required":true,"schema":{"enum":["us","th","my","vn","mx","de","fr","it","es","jp","br","gb","ph","sg","id"],"type":"string"}},{"description":"Included sub-resources, comma-separated: analysis,embedding","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Include related resources, comma-separated (values: analysis(Analytics data), embedding(Embedding data))","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"ceiling_price":{"description":"Max price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"commission_rate":{"description":"Commission rate","type":"number"},"country_code":{"description":"Country code","type":"string"},"floor_price":{"description":"Min price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"follower_count":{"description":"Follower count","type":"integer"},"id":{"description":"Unique identifier","type":"string"},"l1_category":{"description":"L1 category","type":"string"},"l2_category":{"description":"L2 category","type":"string"},"l3_category":{"description":"L3 category","type":"string"},"nickname":{"description":"Display name","type":"string"},"product_country_code":{"description":"Product country","type":"string"},"product_id":{"description":"Product ID","type":"string"},"product_images":{"description":"Product images","items":{"properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"type":"array"},"product_launch_time":{"description":"Product listing time (ms timestamp)","type":"integer"},"product_name":{"description":"Product name","type":"string"},"product_rating":{"description":"Product rating (0-5)","type":"number"},"product_status":{"description":"Product status","type":"integer"},"product_total_gmv":{"description":"Product total GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"product_total_sold_count":{"description":"Product total sales","type":"integer"},"share_url":{"description":"TikTok share URL","type":"string"},"uid":{"description":"User ID","type":"string"},"unique_id":{"description":"TikTok username","type":"string"},"user_avatar":{"description":"User avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"video_30d_gmv":{"description":"30-day video GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"video_30d_gpm":{"description":"30-day video GPM","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"video_30d_sold_count":{"description":"30-day video sales","type":"integer"},"video_collect_count":{"description":"Save count","type":"integer"},"video_comment_count":{"description":"Comment count","type":"integer"},"video_engagement_rate":{"description":"Engagement rate (0-1)","type":"number"},"video_id":{"description":"Video ID","type":"string"},"video_like_count":{"description":"Like count","type":"integer"},"video_play_count":{"description":"View count","type":"integer"},"video_share_count":{"description":"Share count","type":"integer"},"video_total_gmv":{"description":"Video total GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Creative Detail","tags":["Data/Creatives"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.creative.read"}},"/open/v1/creators/search":{"get":{"description":"Search TikTok creators with multi-dimensional filters on followers, GMV, engagement rate, etc.","operationId":"trenz-creators-search","parameters":[{"description":"Search keyword","example":"phone case","in":"query","name":"keyword","required":false,"schema":{"type":"string"}},{"description":"Creator category ID","example":"100001","in":"query","name":"category","required":false,"schema":{"type":"string"}},{"description":"Min followers","example":10000,"in":"query","name":"min_followers","required":false,"schema":{"type":"number"}},{"description":"Max followers","example":1000000,"in":"query","name":"max_followers","required":false,"schema":{"type":"number"}},{"description":"30-day min GMV (USD)","example":1000,"in":"query","name":"min_gmv_30d","required":false,"schema":{"type":"number"}},{"description":"30-day max GMV (USD)","example":100000,"in":"query","name":"max_gmv_30d","required":false,"schema":{"type":"number"}},{"description":"Min average views","example":1000,"in":"query","name":"min_avg_views","required":false,"schema":{"type":"number"}},{"description":"Max average views","example":100000,"in":"query","name":"max_avg_views","required":false,"schema":{"type":"number"}},{"description":"Min engagement rate (0-1)","example":0.01,"in":"query","name":"min_engagement","required":false,"schema":{"type":"number"}},{"description":"Max engagement rate (0-1)","example":0.1,"in":"query","name":"max_engagement","required":false,"schema":{"type":"number"}},{"description":"Whether has contact info","example":true,"in":"query","name":"has_contact","required":false,"schema":{"type":"boolean"}},{"description":"Sort, format: field:asc|desc. Allowed: avg_views, engagement, follower_growth_7d, followers, gmv_30d, video_gmv_30d. Default: gmv_30d:desc","example":"gmv_30d:desc","in":"query","name":"sort","required":false,"schema":{"default":"gmv_30d:desc","enum":["avg_views","engagement","follower_growth_7d","followers","gmv_30d","video_gmv_30d"],"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"account_type":{"description":"Account type","type":"integer"},"author_avg_engagement_rate":{"description":"Avg engagement rate (0-1)","type":"number"},"bio_email":{"description":"Bio email","type":"string"},"category_label":{"description":"Creator category label","type":"string"},"country_code":{"description":"Country code","type":"string"},"ecom_video_avg_play_count":{"description":"Avg e-commerce video views","type":"number"},"facebook_url":{"description":"Facebook URL","type":"string"},"follower_count":{"description":"Follower count","type":"integer"},"follower_count_growth_for_last_7_days":{"description":"7-day follower growth","type":"integer"},"has_live_product":{"description":"Has live commerce","type":"boolean"},"has_shop_product":{"description":"Has shop products","type":"boolean"},"has_video_product":{"description":"Has video commerce","type":"boolean"},"id":{"description":"Unique identifier","type":"string"},"ins_id":{"description":"Instagram ID","type":"string"},"linkedin_url":{"description":"LinkedIn URL","type":"string"},"live_30d_gmv":{"description":"30-day live GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"live_30d_gpm":{"description":"30-day live GPM","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"nickname":{"description":"Display name","type":"string"},"product_category_label_list":{"description":"Product category labels","items":{"type":"string"},"type":"array"},"telegram_url":{"description":"Telegram URL","type":"string"},"total_favorited":{"description":"Total likes received","type":"integer"},"total_video_live_30d_gmv":{"description":"30-day video+live total GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"twitter_id":{"description":"Twitter/X ID","type":"string"},"unique_id":{"description":"TikTok username","type":"string"},"user_avatar":{"description":"User avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"user_sell_product_l3_category":{"description":"Selling product L3 categories","items":{"type":"string"},"type":"array"},"video_30d_gmv":{"description":"30-day video GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"video_30d_gpm":{"description":"30-day video GPM","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"video_avg_like_count":{"description":"Avg video likes","type":"number"},"video_avg_play_count":{"description":"Avg video views","type":"number"},"video_total_like_count_to_follower_count_ratio":{"description":"Likes to followers ratio","type":"number"},"whatsapp_url":{"description":"WhatsApp URL","type":"string"},"youtube_channel_id":{"description":"YouTube channel ID","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Creator Search","tags":["Data/Creators"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.creators.read"}},"/open/v1/creators/{id}":{"get":{"description":"Get TikTok creator details with video list and shoppable products.","operationId":"trenz-creators-detail","parameters":[{"description":"Creator ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Include related resources, comma-separated (values: channel(Sales Channels), core(Core Metrics), portrait(Audience Profile))","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"bio_email":{"description":"Bio email","type":"string"},"bio_url":{"description":"Bio URL","type":"string"},"category_label":{"description":"Creator category label","type":"string"},"enterprise_verify_reason":{"description":"Enterprise verification","type":"string"},"facebook_url":{"description":"Facebook URL","type":"string"},"has_live_product":{"description":"Has live commerce products","type":"boolean"},"has_shop_product":{"description":"Has shop products","type":"boolean"},"has_video_product":{"description":"Has video commerce products","type":"boolean"},"id":{"description":"Unique identifier","type":"string"},"ins_id":{"description":"Instagram ID","type":"string"},"last_update_time":{"description":"Last updated (ms timestamp)","type":"integer"},"linkedin_url":{"description":"LinkedIn URL","type":"string"},"nickname":{"description":"Display name","type":"string"},"partnered_brand":{"description":"Partnered brands","items":{"properties":{"id":{"description":"Brand ID","type":"string"},"name":{"description":"Brand name","type":"string"}},"type":"object"},"type":"array"},"product_category_label_list":{"description":"Product category labels","items":{"type":"string"},"type":"array"},"seller_avatar":{"description":"Shop avatar","type":"string"},"shop_main_category":{"description":"Main category","type":"string"},"shop_name":{"description":"Shop name","type":"string"},"shop_rating":{"description":"Shop rating","type":"string"},"signature":{"description":"Bio description","type":"string"},"telegram_url":{"description":"Telegram URL","type":"string"},"total_gmv":{"description":"Total GMV","type":"string"},"total_sold_count":{"description":"Total units sold","type":"string"},"twitter_id":{"description":"Twitter/X ID","type":"string"},"unique_id":{"description":"TikTok username","type":"string"},"user_avatar":{"description":"User avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"website":{"description":"Website","type":"string"},"wechat":{"description":"WeChat","type":"string"},"whatsapp_url":{"description":"WhatsApp URL","type":"string"},"youtube_channel_id":{"description":"YouTube channel ID","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Creator Detail","tags":["Data/Creators"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.creators.read"}},"/open/v1/creators/{id}/lives":{"get":{"description":"","operationId":"trenz-creators-lives","parameters":[{"description":"Creator ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_creator_detail_live_country_code":{"description":"Country code","type":"string"},"tiktok_creator_detail_live_cover":{"description":"Live cover","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_creator_detail_live_end_time":{"description":"End time (ms timestamp)","type":"integer"},"tiktok_creator_detail_live_gmv":{"description":"GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_creator_detail_live_gpm":{"description":"GPM (GMV per 1K views)","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_creator_detail_live_max_user_count":{"description":"Peak viewers","type":"integer"},"tiktok_creator_detail_live_most_product_category_label":{"description":"Main product category","type":"string"},"tiktok_creator_detail_live_new_follow_count":{"description":"New followers","type":"integer"},"tiktok_creator_detail_live_opm":{"description":"OPM (orders per 1K views)","type":"number"},"tiktok_creator_detail_live_product_count":{"description":"Product count","type":"integer"},"tiktok_creator_detail_live_room_id":{"description":"Live room ID","type":"string"},"tiktok_creator_detail_live_room_link":{"description":"Live room URL","type":"string"},"tiktok_creator_detail_live_start_time":{"description":"Start time (ms timestamp)","type":"integer"},"tiktok_creator_detail_live_title":{"description":"Live title","type":"string"},"tiktok_creator_detail_live_total_sold_count":{"description":"Total units sold","type":"integer"},"tiktok_creator_detail_live_total_user":{"description":"Total viewers","type":"integer"},"tiktok_creator_detail_live_user_follower_count":{"description":"User follower count","type":"integer"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Creator Related Lives","tags":["Data/Creators"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.creators.read"}},"/open/v1/creators/{id}/products":{"get":{"description":"","operationId":"trenz-creators-products","parameters":[{"description":"Creator ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_creator_detail_by_live":{"description":"Sells via live commerce","type":"boolean"},"tiktok_creator_detail_by_shop":{"description":"Sells via shop","type":"boolean"},"tiktok_creator_detail_by_video":{"description":"Sells via video commerce","type":"boolean"},"tiktok_creator_detail_live_30d_gmv":{"description":"30D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_creator_detail_live_30d_sold_count":{"description":"30D Sold Count","type":"integer"},"tiktok_creator_detail_product_country_code":{"description":"Product country","type":"string"},"tiktok_creator_detail_product_id":{"description":"Product ID","type":"string"},"tiktok_creator_detail_product_launch_time":{"description":"Product listing time (ms timestamp)","type":"integer"},"tiktok_creator_detail_total_video_live_30d_gmv":{"description":"Total Video Live 30D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_creator_detail_total_video_live_30d_sold_count":{"description":"Total Video Live 30D Sold Count","type":"integer"},"tiktok_creator_detail_user_id":{"description":"User ID","type":"string"},"tiktok_creator_detail_video_30d_gmv":{"description":"30D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_creator_detail_video_30d_sold_count":{"description":"30D Sold Count","type":"integer"},"tiktok_product_detail_ceiling_price":{"description":"Max price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_product_detail_commission_rate":{"description":"Commission rate","type":"string"},"tiktok_product_detail_floor_price":{"description":"Min price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_product_detail_l1_category":{"description":"Level-1 category","type":"string"},"tiktok_product_detail_l2_category":{"description":"Level-2 category","type":"string"},"tiktok_product_detail_l3_category":{"description":"Level-3 category","type":"string"},"tiktok_product_detail_product_images":{"description":"Product images","items":{"properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"type":"array"},"tiktok_product_detail_product_name":{"description":"Product name","type":"string"},"tiktok_product_detail_product_rating":{"description":"Product rating (0-5)","type":"number"},"tiktok_product_detail_product_sku_props":{"description":"SKU properties","items":{"properties":{"has_image":{"description":"Has image","type":"boolean"},"prop_id":{"description":"Property ID","type":"string"},"prop_name":{"description":"Property name","type":"string"},"sale_prop_values":{"description":"Property values","items":{"properties":{"image":{"properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"prop_value":{"description":"Property value","type":"string"},"prop_value_id":{"description":"Property value ID","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"},"tiktok_product_detail_product_skus":{"description":"SKU list","items":{"properties":{"is_hot":{"description":"Is hot selling","type":"boolean"},"price":{"properties":{"discount":{"description":"Discount info","type":"string"},"original_price":{"description":"Original price","type":"string"},"original_price_value":{"description":"Original price value","type":"string"},"real_price":{"description":"Actual price","type":"number"},"unit_price_desc":{"description":"Unit price description","type":"string"}},"type":"object"},"sale_prop_value_ids":{"description":"Property value ID combination","type":"string"},"sku_id":{"description":"SKU ID","type":"string"},"sku_sale_props":{"description":"SKU properties","items":{"properties":{"prop_id":{"description":"Property ID","type":"string"},"prop_name":{"description":"Property name (e.g. Color)","type":"string"},"prop_value":{"description":"Property value","type":"string"},"prop_value_id":{"description":"Property value ID","type":"string"}},"type":"object"},"type":"array"},"status":{"description":"Status (1=active)","type":"integer"},"stock":{"description":"Stock","type":"integer"}},"type":"object"},"type":"array"},"tiktok_product_detail_product_status":{"description":"Product status","type":"integer"},"tiktok_product_detail_region":{"description":"Region code","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Creator Products","tags":["Data/Creators"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.creators.read"}},"/open/v1/creators/{id}/similar":{"get":{"description":"","operationId":"trenz-creators-similar","parameters":[{"description":"Creator ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_creator_detail_similar_category_label":{"description":"Creator category label","type":"string"},"tiktok_creator_detail_similar_country_code":{"description":"Country code","type":"string"},"tiktok_creator_detail_similar_follower_count":{"description":"Follower count","type":"integer"},"tiktok_creator_detail_similar_nickname":{"description":"Display name","type":"string"},"tiktok_creator_detail_similar_total_video_live_30d_gmv":{"description":"Total Video Live 30D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_creator_detail_similar_uid":{"description":"User ID","type":"string"},"tiktok_creator_detail_similar_user_avatar":{"description":"User avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Similar Creators","tags":["Data/Creators"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.creators.read"}},"/open/v1/creators/{id}/videos":{"get":{"description":"","operationId":"trenz-creators-videos","parameters":[{"description":"Creator ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_creator_detail_is_ad":{"description":"Is advertisement","type":"boolean"},"tiktok_creator_detail_is_aigc_video":{"description":"Is AI-generated video","type":"boolean"},"tiktok_creator_detail_video_30d_gmv":{"description":"30D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_creator_detail_video_30d_sold_count":{"description":"30D Sold Count","type":"integer"},"tiktok_creator_detail_video_ad_source":{"description":"Ad source (1=has ad)","type":"string"},"tiktok_creator_detail_video_author_category_label":{"description":"Author category label","type":"string"},"tiktok_creator_detail_video_author_nickname":{"description":"Author display name","type":"string"},"tiktok_creator_detail_video_author_uid":{"description":"Author user ID","type":"string"},"tiktok_creator_detail_video_author_unique_id":{"description":"Author TikTok username","type":"string"},"tiktok_creator_detail_video_collect_count":{"description":"Save count","type":"integer"},"tiktok_creator_detail_video_comment_count":{"description":"Comment count","type":"integer"},"tiktok_creator_detail_video_country_code":{"description":"Country code","type":"string"},"tiktok_creator_detail_video_cover":{"description":"Live cover","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_creator_detail_video_desc":{"description":"Description","type":"string"},"tiktok_creator_detail_video_duration":{"description":"Duration (ms)","type":"integer"},"tiktok_creator_detail_video_engagement_rate":{"description":"Engagement rate (0-1)","type":"number"},"tiktok_creator_detail_video_id":{"description":"Unique identifier","type":"string"},"tiktok_creator_detail_video_launch_time":{"description":"Published at (ms timestamp)","type":"integer"},"tiktok_creator_detail_video_like_count":{"description":"Like count","type":"integer"},"tiktok_creator_detail_video_play_count":{"description":"View count","type":"integer"},"tiktok_creator_detail_video_product_id":{"description":"Product ID","type":"string"},"tiktok_creator_detail_video_product_images":{"description":"Product images","items":{"properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"type":"array"},"tiktok_creator_detail_video_product_l1_category":{"description":"Product L1 Category","type":"string"},"tiktok_creator_detail_video_product_l2_category":{"description":"Product L2 Category","type":"string"},"tiktok_creator_detail_video_product_l3_category":{"description":"Product L3 Category","type":"string"},"tiktok_creator_detail_video_product_title":{"description":"Product title","type":"string"},"tiktok_creator_detail_video_share_count":{"description":"Share count","type":"integer"},"tiktok_creator_detail_video_share_url":{"description":"TikTok share URL","type":"string"},"tiktok_creator_detail_video_total_like_count_to_follower_count_ratio":{"description":"Total likes to followers ratio","type":"number"},"tiktok_creator_detail_video_user_avatar":{"description":"User avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Creator Videos","tags":["Data/Creators"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.creators.read"}},"/open/v1/lives/search":{"get":{"description":"Search TikTok commerce live streams with filters on sales, GMV, audience count, etc.","operationId":"trenz-lives-search","parameters":[{"description":"Search keyword","example":"phone case","in":"query","name":"keyword","required":false,"schema":{"type":"string"}},{"description":"Streamer category ID","example":"100001","in":"query","name":"category","required":false,"schema":{"type":"string"}},{"description":"Product category ID","example":"100001","in":"query","name":"product_category","required":false,"schema":{"type":"string"}},{"description":"Whether currently live-streaming","example":false,"in":"query","name":"is_living","required":false,"schema":{"type":"boolean"}},{"description":"Whether is a commerce live","example":false,"in":"query","name":"is_commercial","required":false,"schema":{"type":"boolean"}},{"description":"Min sales","example":100,"in":"query","name":"min_sold","required":false,"schema":{"type":"number"}},{"description":"Max sales","example":10000,"in":"query","name":"max_sold","required":false,"schema":{"type":"number"}},{"description":"Min GMV (USD)","example":1000,"in":"query","name":"min_gmv","required":false,"schema":{"type":"number"}},{"description":"Max GMV (USD)","example":100000,"in":"query","name":"max_gmv","required":false,"schema":{"type":"number"}},{"description":"Min audience","example":100,"in":"query","name":"min_audience","required":false,"schema":{"type":"number"}},{"description":"Max audience","example":100000,"in":"query","name":"max_audience","required":false,"schema":{"type":"number"}},{"description":"Sort, format: field:asc|desc. Allowed: audience, gmv, peak_audience, sold, start_time. Default: gmv:desc","example":"gmv:desc","in":"query","name":"sort","required":false,"schema":{"default":"gmv:desc","enum":["audience","gmv","peak_audience","sold","start_time"],"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"country_code":{"description":"Country code","type":"string"},"cover":{"description":"Live cover","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"end_time":{"description":"End time (ms timestamp)","type":"integer"},"gmv":{"description":"GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"gpm":{"description":"GPM (GMV per 1K views)","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"id":{"description":"Unique identifier","type":"string"},"max_user_count":{"description":"Peak viewers","type":"integer"},"most_product_category_label":{"description":"Main product category","type":"string"},"new_follow_count":{"description":"New followers","type":"integer"},"opm":{"description":"OPM (orders per 1K views)","type":"number"},"product_count":{"description":"Product count","type":"integer"},"room_link":{"description":"Live room URL","type":"string"},"start_time":{"description":"Start time (ms timestamp)","type":"integer"},"title":{"description":"Live title","type":"string"},"total_sold_count":{"description":"Total units sold","type":"integer"},"total_user":{"description":"Total viewers","type":"integer"},"user_category_label":{"description":"User category label","type":"string"},"user_id":{"description":"User ID","type":"string"},"user_nickname":{"description":"User display name","type":"string"},"user_unique_id":{"description":"User TikTok username","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Live Search","tags":["Data/Lives"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.lives.read"}},"/open/v1/lives/{id}":{"get":{"description":"Get TikTok live stream details, including basics, core metrics, trends, linked products, and similar lives.","operationId":"trenz-lives-detail","parameters":[{"description":"Live ID","in":"path","name":"entity_id","required":true,"schema":{"type":"string"}},{"description":"Region code","in":"query","name":"country","required":true,"schema":{"enum":["us","th","my","vn","mx","it","fr","de","es","jp","br","gb","ph","sg","id"],"type":"string"}},{"description":"Included sub-resources, comma-separated: core,trend,products,similar","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Include related resources, comma-separated (values: core(Core Metrics))","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"country_code":{"description":"Country code","type":"string"},"cover":{"description":"Live cover","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"end_time":{"description":"End time (ms timestamp)","type":"integer"},"id":{"description":"Unique identifier","type":"string"},"most_product_category_label":{"description":"Main product category","type":"string"},"room_link":{"description":"Live room URL","type":"string"},"start_time":{"description":"Start time (ms timestamp)","type":"integer"},"title":{"description":"Live title","type":"string"},"user_avatar":{"description":"User avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"user_avg_audience_count":{"description":"Avg audience count","type":"number"},"user_avg_max_audience_count":{"description":"Avg peak viewers","type":"number"},"user_follower_count":{"description":"User follower count","type":"integer"},"user_id":{"description":"User ID","type":"string"},"user_live_count":{"description":"Total live count","type":"integer"},"user_nickname":{"description":"User display name","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Live Detail","tags":["Data/Lives"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.lives.read"}},"/open/v1/lives/{id}/products":{"get":{"description":"","operationId":"trenz-lives-products","parameters":[{"description":"Live ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_live_detail_product_ceiling_price":{"description":"Max price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_live_detail_product_commission_rate_num":{"description":"Commission rate","type":"string"},"tiktok_live_detail_product_conversion_rate":{"description":"Conversion rate","type":"number"},"tiktok_live_detail_product_country_code":{"description":"Country code","type":"string"},"tiktok_live_detail_product_floor_price":{"description":"Min price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_live_detail_product_gmv":{"description":"GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_live_detail_product_id":{"description":"Unique identifier","type":"string"},"tiktok_live_detail_product_images":{"description":"Image list","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_live_detail_product_l1_category":{"description":"Level-1 category","type":"string"},"tiktok_live_detail_product_l2_category":{"description":"Level-2 category","type":"string"},"tiktok_live_detail_product_l3_category":{"description":"Level-3 category","type":"string"},"tiktok_live_detail_product_rating":{"description":"Rating","type":"string"},"tiktok_live_detail_product_seller_avatar":{"description":"Shop avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_live_detail_product_seller_category_name_label":{"description":"Seller category label","type":"string"},"tiktok_live_detail_product_seller_id":{"description":"Shop ID","type":"string"},"tiktok_live_detail_product_seller_info":{"description":"Seller info","items":{"type":"string"},"type":"array"},"tiktok_live_detail_product_seller_name":{"description":"Seller name","type":"string"},"tiktok_live_detail_product_sold_count":{"description":"Units sold","type":"integer"},"tiktok_live_detail_product_title":{"description":"Live title","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Live Related Products","tags":["Data/Lives"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.lives.read"}},"/open/v1/lives/{id}/similar":{"get":{"description":"","operationId":"trenz-lives-similar","parameters":[{"description":"Live ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_live_detail_similar_country_code":{"description":"Country code","type":"string"},"tiktok_live_detail_similar_cover":{"description":"Live cover","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_live_detail_similar_gmv":{"description":"GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_live_detail_similar_max_user_count":{"description":"Peak viewers","type":"integer"},"tiktok_live_detail_similar_most_product_category_label":{"description":"Main product category","type":"string"},"tiktok_live_detail_similar_room_id":{"description":"Live room ID","type":"string"},"tiktok_live_detail_similar_title":{"description":"Live title","type":"string"},"tiktok_live_detail_similar_user_avatar":{"description":"User avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_live_detail_similar_user_id":{"description":"User ID","type":"string"},"tiktok_live_detail_similar_user_nickname":{"description":"User display name","type":"string"},"tiktok_live_detail_similar_user_unique_id":{"description":"User TikTok username","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Similar Lives","tags":["Data/Lives"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.lives.read"}},"/open/v1/products/search":{"get":{"description":"Search TikTok products with multi-dimensional filters on keyword, category, price, sales, etc.","operationId":"trenz-products-search","parameters":[{"description":"Search keyword","example":"phone case","in":"query","name":"keyword","required":false,"schema":{"type":"string"}},{"description":"Product category ID (numeric), can be obtained from the `l1_category` field in search results","example":"100001","in":"query","name":"category","required":false,"schema":{"type":"string"}},{"description":"Seller type: 1=Overseas Non-brand, 2=Local, 3=Brand, 4=Non-brand","example":"local","in":"query","name":"seller_type","required":false,"schema":{"type":"string"}},{"description":"Min price (USD)","example":1,"in":"query","name":"min_price","required":false,"schema":{"type":"number"}},{"description":"Max price (USD)","example":100,"in":"query","name":"max_price","required":false,"schema":{"type":"number"}},{"description":"Min rating (0-5)","example":4,"in":"query","name":"min_rating","required":false,"schema":{"type":"number"}},{"description":"Max rating (0-5)","example":5,"in":"query","name":"max_rating","required":false,"schema":{"type":"number"}},{"description":"7-day min sales","example":100,"in":"query","name":"min_sold_7d","required":false,"schema":{"type":"number"}},{"description":"7-day max sales","example":10000,"in":"query","name":"max_sold_7d","required":false,"schema":{"type":"number"}},{"description":"30-day min sales","example":500,"in":"query","name":"min_sold_30d","required":false,"schema":{"type":"number"}},{"description":"30-day max sales","example":50000,"in":"query","name":"max_sold_30d","required":false,"schema":{"type":"number"}},{"description":"Whether has free shipping","example":true,"in":"query","name":"free_shipping","required":false,"schema":{"type":"boolean"}},{"description":"Sort, format: field:asc|desc. Allowed: daily_sold, gmv_30d, gmv_7d, price, rating, sold_30d, sold_7d. Default: gmv_7d:desc","example":"gmv_7d:desc","in":"query","name":"sort","required":false,"schema":{"default":"gmv_7d:desc","enum":["daily_sold","gmv_30d","gmv_7d","price","rating","sold_30d","sold_7d"],"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"category_monthly_gmv":{"description":"Category monthly GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"category_opportunity":{"description":"Category opportunity index","type":"number"},"category_seller_count":{"description":"Category seller count","type":"integer"},"ceiling_price":{"description":"Max price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"commission_rate":{"description":"Commission rate","type":"number"},"create_time":{"description":"Created at (ms timestamp)","type":"integer"},"creator_sold_rate":{"description":"Creator conversion rate (0-1)","type":"number"},"creator_total_play_count":{"description":"Creator total views","type":"integer"},"cross_platform_amazon_est_monthly_sales_max":{"description":"Amazon est. monthly sales (max)","type":"integer"},"cross_platform_amazon_est_monthly_sales_min":{"description":"Amazon est. monthly sales (min)","type":"integer"},"cross_platform_amazon_product_count":{"description":"Amazon product count","type":"integer"},"cross_platform_shopify_product_count":{"description":"Shopify product count","type":"integer"},"cross_platform_shopify_site_count":{"description":"Shopify site count","type":"integer"},"floor_price":{"description":"Min price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"id":{"description":"Unique identifier","type":"string"},"l1_category":{"description":"L1 category","type":"string"},"original_ceiling_price":{"description":"Original max price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"original_floor_price":{"description":"Original min price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"product_daily_gmv":{"description":"Daily GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"product_daily_sold_count":{"description":"Daily sales","type":"integer"},"product_gmv":{"description":"Total GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"product_gmv_for_last_30_days":{"description":"30-day GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"product_gmv_for_last_3_days":{"description":"3-day GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"product_gmv_for_last_7_days":{"description":"7-day GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"product_images":{"description":"Product images","items":{"properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"type":"array"},"product_name":{"description":"Product name","type":"string"},"product_rating":{"description":"Product rating (0-5)","type":"number"},"product_sold_count":{"description":"Total sales","type":"integer"},"product_sold_count_for_last_30_days":{"description":"30-day sales","type":"integer"},"product_sold_count_for_last_3_days":{"description":"3-day sales","type":"integer"},"product_sold_count_for_last_7_days":{"description":"7-day sales","type":"integer"},"region":{"description":"Region code","type":"string"},"review_count":{"description":"Review count","type":"integer"},"seasonal_signal":{"description":"Seasonal signal","properties":{"month_range":{"description":"Seasonal month range","type":"string"},"peak_month":{"description":"Peak month","type":"string"},"peak_month_gmv":{"description":"Peak month GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"total_gmv":{"description":"Seasonal total GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"total_sold":{"description":"Seasonal total sales","type":"integer"}},"type":"object"},"seller_avatar":{"description":"Seller avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"seller_business_info":{"description":"Business entity info","items":{"type":"string"},"type":"array"},"seller_id":{"description":"Seller ID","type":"string"},"shipping_fee":{"description":"Shipping fee","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"shop_name":{"description":"Shop name","type":"string"},"shop_total_sold_count":{"description":"Shop total sales","type":"integer"},"signal_description":{"description":"Signal description","type":"string"},"signal_type":{"description":"Signal type","type":"string"},"sold_count_trend":{"description":"Sales trend (7-day)","items":{"properties":{"timestamp":{"description":"Timestamp (ms)","type":"integer"},"value":{"description":"Value","type":"number"}},"type":"object"},"type":"array"},"spike_pct":{"description":"Spike percentage","type":"number"},"total_related_creator_count":{"description":"Related creator count","type":"integer"},"total_related_video_count":{"description":"Related video count","type":"integer"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Product Search","tags":["Data/Products"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.products.read"}},"/open/v1/products/{id}":{"get":{"description":"Get TikTok product details with linked videos, creators, and reviews.","operationId":"trenz-products-detail","parameters":[{"description":"Product ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Include related resources, comma-separated (values: channel(Sales Channels), core(Core Metrics))","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"ceiling_price":{"description":"Max price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"commission_rate":{"description":"Commission rate","type":"number"},"create_time":{"description":"Listing time","type":"integer"},"floor_price":{"description":"Min price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"id":{"description":"Unique identifier","type":"string"},"l1_category":{"description":"Level-1 category","type":"string"},"last_update_time":{"description":"Last updated (ms timestamp)","type":"integer"},"original_ceiling_price":{"description":"Original max price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"original_floor_price":{"description":"Original min price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"product_id":{"description":"Product ID","type":"string"},"product_images":{"description":"Product images","items":{"properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"type":"array"},"product_name":{"description":"Product name","type":"string"},"product_rating":{"description":"Product rating (0-5)","type":"number"},"product_sku_props":{"description":"SKU properties","items":{"properties":{"has_image":{"description":"Has image","type":"boolean"},"prop_id":{"description":"Property ID","type":"string"},"prop_name":{"description":"Property name","type":"string"},"sale_prop_values":{"description":"Property values","items":{"properties":{"image":{"properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"prop_value":{"description":"Property value","type":"string"},"prop_value_id":{"description":"Property value ID","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"},"product_skus":{"description":"SKU list","items":{"properties":{"is_hot":{"description":"Is hot selling","type":"boolean"},"price":{"properties":{"discount":{"description":"Discount info","type":"string"},"original_price":{"description":"Original price","type":"string"},"original_price_value":{"description":"Original price value","type":"string"},"real_price":{"description":"Actual price","type":"number"},"unit_price_desc":{"description":"Unit price description","type":"string"}},"type":"object"},"sale_prop_value_ids":{"description":"Property value ID combination","type":"string"},"sku_id":{"description":"SKU ID","type":"string"},"sku_sale_props":{"description":"SKU properties","items":{"properties":{"prop_id":{"description":"Property ID","type":"string"},"prop_name":{"description":"Property name (e.g. Color)","type":"string"},"prop_value":{"description":"Property value","type":"string"},"prop_value_id":{"description":"Property value ID","type":"string"}},"type":"object"},"type":"array"},"status":{"description":"Status (1=active)","type":"integer"},"stock":{"description":"Stock","type":"integer"}},"type":"object"},"type":"array"},"product_specifications":{"description":"Product specifications","items":{"properties":{"name":{"description":"Specification name","type":"string"},"value":{"description":"Specification value","type":"string"}},"type":"object"},"type":"array"},"region":{"description":"Region code","type":"string"},"review_count":{"description":"Review count","type":"integer"},"seller_avatar":{"description":"Shop avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"seller_business_info":{"description":"Business entity info","items":{"type":"string"},"type":"array"},"seller_creator_avatar":{"description":"Creator avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"seller_creator_follow_count":{"description":"Creator follower count","type":"string"},"seller_creator_nickname":{"description":"Creator display name","type":"string"},"seller_creator_role":{"description":"Creator role","type":"integer"},"seller_creator_user_id":{"description":"Creator user ID","type":"string"},"seller_creator_user_name":{"description":"Creator username","type":"string"},"seller_id":{"description":"Shop ID","type":"string"},"shipping_fee":{"description":"Shipping fee","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"shop_main_category":{"description":"Main category","type":"string"},"shop_name":{"description":"Shop name","type":"string"},"shop_rating":{"description":"Shop rating","type":"number"},"shop_total_gmv":{"description":"Shop total GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"shop_total_sold_count":{"description":"Shop total sales","type":"integer"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Product Detail","tags":["Data/Products"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.products.read"}},"/open/v1/products/{id}/creators":{"get":{"description":"","operationId":"trenz-products-creators","parameters":[{"description":"Product ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_product_detail_author_avg_engagement_rate":{"description":"Avg engagement rate","type":"number"},"tiktok_product_detail_author_avg_like_cnt":{"description":"Author avg likes per video","type":"number"},"tiktok_product_detail_author_avg_play_cnt":{"description":"Author avg views per video","type":"number"},"tiktok_product_detail_author_total_like_cnt":{"description":"Author total likes","type":"integer"},"tiktok_product_detail_author_total_play_cnt":{"description":"Author total views","type":"integer"},"tiktok_product_detail_by_live":{"description":"Sells via live commerce","type":"boolean"},"tiktok_product_detail_by_shop":{"description":"Sells via shop","type":"boolean"},"tiktok_product_detail_by_video":{"description":"Sells via video commerce","type":"boolean"},"tiktok_product_detail_category_label":{"description":"Creator category label","type":"string"},"tiktok_product_detail_country_code":{"description":"Country code","type":"string"},"tiktok_product_detail_creator_bio_email":{"description":"Bio email","type":"string"},"tiktok_product_detail_creator_facebook_url":{"description":"Facebook URL","type":"string"},"tiktok_product_detail_creator_ins_id":{"description":"Instagram ID","type":"string"},"tiktok_product_detail_creator_linkedin_url":{"description":"LinkedIn URL","type":"string"},"tiktok_product_detail_creator_related_total_live":{"description":"Related live count","type":"integer"},"tiktok_product_detail_creator_related_total_video":{"description":"Related video count","type":"string"},"tiktok_product_detail_creator_telegram_url":{"description":"Telegram URL","type":"string"},"tiktok_product_detail_creator_twitter_id":{"description":"Twitter/X ID","type":"string"},"tiktok_product_detail_creator_video_30d_gmv":{"description":"Video 30D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_product_detail_creator_video_7d_gmv":{"description":"Video 7D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_product_detail_creator_whatsapp_url":{"description":"WhatsApp URL","type":"string"},"tiktok_product_detail_creator_youtube_channel_id":{"description":"YouTube channel ID","type":"string"},"tiktok_product_detail_follower_count":{"description":"Follower count","type":"integer"},"tiktok_product_detail_live_30d_gmv":{"description":"Live 30D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_product_detail_live_7d_gmv":{"description":"Live 7D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_product_detail_nickname":{"description":"Display name","type":"string"},"tiktok_product_detail_product_id":{"description":"Product ID","type":"string"},"tiktok_product_detail_total_video_live_30d_gmv":{"description":"Total Video Live 30D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_product_detail_total_video_live_7d_gmv":{"description":"Total Video Live 7D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_product_detail_uid":{"description":"User ID","type":"string"},"tiktok_product_detail_unique_id":{"description":"TikTok username","type":"string"},"tiktok_product_detail_user_avatar":{"description":"User avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_product_detail_user_id":{"description":"User ID","type":"string"},"tiktok_product_detail_video_total_like_count_to_follower_count_ratio":{"description":"Video likes to followers ratio","type":"number"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Product Related Creators","tags":["Data/Products"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.products.read"}},"/open/v1/products/{id}/lives":{"get":{"description":"","operationId":"trenz-products-lives","parameters":[{"description":"Product ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_product_detail_ceiling_price":{"description":"Max price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_product_detail_country_code":{"description":"Country code","type":"string"},"tiktok_product_detail_cover":{"description":"Live cover","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_product_detail_end_time":{"description":"End time (ms timestamp)","type":"integer"},"tiktok_product_detail_gpm":{"description":"GPM (GMV per 1K views)","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_product_detail_live_total_sold_count":{"description":"Live total units sold","type":"integer"},"tiktok_product_detail_max_user_count":{"description":"Peak viewers","type":"integer"},"tiktok_product_detail_most_product_category_label":{"description":"Main product category","type":"string"},"tiktok_product_detail_new_follower_count":{"description":"New followers gained","type":"integer"},"tiktok_product_detail_nickname":{"description":"Display name","type":"string"},"tiktok_product_detail_opm":{"description":"OPM (orders per 1K views)","type":"number"},"tiktok_product_detail_product_count":{"description":"Product count","type":"integer"},"tiktok_product_detail_room_id":{"description":"Live room ID","type":"string"},"tiktok_product_detail_room_link":{"description":"Live room URL","type":"string"},"tiktok_product_detail_start_time":{"description":"Start time (ms timestamp)","type":"integer"},"tiktok_product_detail_title":{"description":"Live title","type":"string"},"tiktok_product_detail_total_gmv":{"description":"Total GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_product_detail_total_user":{"description":"Total viewers","type":"integer"},"tiktok_product_detail_user_avatar":{"description":"User avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_product_detail_user_category_label":{"description":"User category label","type":"string"},"tiktok_product_detail_user_id":{"description":"User ID","type":"string"},"tiktok_product_detail_user_unique_id":{"description":"User TikTok username","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Product Related Lives","tags":["Data/Products"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.products.read"}},"/open/v1/products/{id}/reviews":{"get":{"description":"","operationId":"trenz-products-reviews","parameters":[{"description":"Product ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_product_detail_review_content":{"description":"Review content","type":"string"},"tiktok_product_detail_review_id":{"description":"Unique identifier","type":"string"},"tiktok_product_detail_review_images":{"description":"Image list","type":"array"},"tiktok_product_detail_review_media":{"description":"Media resources","properties":{"cover_url":{"description":"Video cover URL","type":"string"},"video_url":{"description":"Video URL","type":"string"}},"type":"object"},"tiktok_product_detail_review_product_id":{"description":"Product ID","type":"string"},"tiktok_product_detail_review_publish_time":{"description":"Published at (ms timestamp)","type":"string"},"tiktok_product_detail_review_rating":{"description":"Rating","type":"integer"},"tiktok_product_detail_review_sku_id":{"description":"SKU ID","type":"string"},"tiktok_product_detail_review_sku_image":{"description":"SKU image","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_product_detail_review_sku_specification":{"description":"SKU specification","type":"string"},"tiktok_product_detail_review_translated_review":{"description":"Translated review","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Product Reviews","tags":["Data/Products"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.products.read"}},"/open/v1/products/{id}/similar":{"get":{"description":"","operationId":"trenz-products-similar","parameters":[{"description":"Product ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_product_detail_similar_l1_category":{"description":"Level-1 category","type":"string"},"tiktok_product_detail_similar_l2_category":{"description":"Level-2 category","type":"string"},"tiktok_product_detail_similar_l3_category":{"description":"Level-3 category","type":"string"},"tiktok_product_detail_similar_product_gmv":{"description":"Total GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_product_detail_similar_product_id":{"description":"Product ID","type":"string"},"tiktok_product_detail_similar_product_images":{"description":"Product images","items":{"properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"type":"array"},"tiktok_product_detail_similar_product_name":{"description":"Product name","type":"string"},"tiktok_product_detail_similar_product_rating":{"description":"Product rating (0-5)","type":"number"},"tiktok_product_detail_similar_product_sold_count":{"description":"Total sales","type":"integer"},"tiktok_product_detail_similar_region":{"description":"Region code","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Similar Products","tags":["Data/Products"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.products.read"}},"/open/v1/products/{id}/videos":{"get":{"description":"","operationId":"trenz-products-videos","parameters":[{"description":"Product ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_product_detail_ad_source":{"description":"Ad source (1=has ad)","type":"integer"},"tiktok_product_detail_country_code":{"description":"Country code","type":"string"},"tiktok_product_detail_cover_url":{"description":"Cover image","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_product_detail_is_ad":{"description":"Is advertisement","type":"boolean"},"tiktok_product_detail_is_aigc_video":{"description":"Is AI-generated video","type":"boolean"},"tiktok_product_detail_product_id":{"description":"Product ID","type":"string"},"tiktok_product_detail_share_url":{"description":"TikTok share URL","type":"string"},"tiktok_product_detail_user_avatar":{"description":"User avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_product_detail_user_id":{"description":"User ID","type":"string"},"tiktok_product_detail_user_nickname":{"description":"User display name","type":"string"},"tiktok_product_detail_user_unique_id":{"description":"User TikTok username","type":"string"},"tiktok_product_detail_video_30d_gmv":{"description":"Video 30D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_product_detail_video_30d_play_count":{"description":"Video 30D Play Count","type":"integer"},"tiktok_product_detail_video_30d_sold_count":{"description":"Video 30D Sold Count","type":"integer"},"tiktok_product_detail_video_desc":{"description":"Video description","type":"string"},"tiktok_product_detail_video_duration":{"description":"Duration (ms)","type":"integer"},"tiktok_product_detail_video_engagement_rate":{"description":"Engagement rate (0-1)","type":"number"},"tiktok_product_detail_video_id":{"description":"Video ID","type":"string"},"tiktok_product_detail_video_launch_time":{"description":"Published at (ms timestamp)","type":"integer"},"tiktok_product_detail_video_like_count":{"description":"Like count","type":"integer"},"tiktok_product_detail_video_play_count":{"description":"View count","type":"integer"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Product Related Videos","tags":["Data/Products"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.products.read"}},"/open/v1/reports/{id}":{"get":{"description":"Returns the report detail by ID (including its `session_id`). Free endpoint.","operationId":"get-report","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}},{"description":"Report ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"content":"Markdown 内容","created_at":"2026-05-20T10:00:00Z","id":"rpt-xxxx","session_id":"sess-xxxx","title":"报告标题","updated_at":"2026-05-20T10:01:00Z"},"request_id":"req-xxxx"},"schema":{"properties":{"data":{"properties":{"content":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"session_id":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"request_id":{"type":"string"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"403":{"description":"FORBIDDEN — report exists but its session belongs to another user (owner check failed)"},"404":{"description":"REPORT_NOT_FOUND — report does not exist"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Get a single report","tags":["Trenz Agent/Sessions \u0026 Reports"],"x-billing-mode":"free","x-coin-cost":0}},"/open/v1/sellers/search":{"get":{"description":"Search TikTok sellers with multi-dimensional filters on category, rating, sales, etc.","operationId":"trenz-sellers-search","parameters":[{"description":"Search keyword","example":"phone case","in":"query","name":"keyword","required":false,"schema":{"type":"string"}},{"description":"Seller primary category ID","example":"100001","in":"query","name":"category","required":false,"schema":{"type":"string"}},{"description":"Seller type: 1=Overseas Non-brand, 2=Local, 3=Brand, 4=Non-brand","example":"local","in":"query","name":"seller_type","required":false,"schema":{"type":"string"}},{"description":"Min seller rating","example":4,"in":"query","name":"min_rating","required":false,"schema":{"type":"number"}},{"description":"Max seller rating","example":5,"in":"query","name":"max_rating","required":false,"schema":{"type":"number"}},{"description":"7-day min sales","example":100,"in":"query","name":"min_sold_7d","required":false,"schema":{"type":"number"}},{"description":"7-day max sales","example":10000,"in":"query","name":"max_sold_7d","required":false,"schema":{"type":"number"}},{"description":"7-day min sales amount (USD)","example":500,"in":"query","name":"min_gmv_7d","required":false,"schema":{"type":"number"}},{"description":"7-day max sales amount (USD)","example":50000,"in":"query","name":"max_gmv_7d","required":false,"schema":{"type":"number"}},{"description":"Sort, format: field:asc|desc. Allowed: gmv_7d, product_count, rating, sold_7d, total_gmv, total_sold. Default: gmv_7d:desc","example":"gmv_7d:desc","in":"query","name":"sort","required":false,"schema":{"default":"gmv_7d:desc","enum":["gmv_7d","product_count","rating","sold_7d","total_gmv","total_sold"],"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"region":{"description":"Region code","type":"string"},"seller_business_info":{"description":"Business entity info","items":{"type":"string"},"type":"array"},"shop_gmv_for_last_7_days":{"description":"7-day GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"shop_main_category":{"description":"Main category","type":"string"},"shop_name":{"description":"Shop name","type":"string"},"shop_product_count":{"description":"Product count","type":"integer"},"shop_rating":{"description":"Shop rating","type":"number"},"shop_sold_count_for_last_7_days":{"description":"7-day sales","type":"integer"},"shop_total_gmv":{"description":"Shop total GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"shop_total_sold_count":{"description":"Shop total sales","type":"integer"},"sold_count_trend":{"description":"Sales trend (7-day)","items":{"properties":{"timestamp":{"description":"Timestamp (ms)","type":"integer"},"value":{"description":"Value","type":"number"}},"type":"object"},"type":"array"},"total_related_creator_count":{"description":"Related creator count","type":"integer"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Seller Search","tags":["Data/Sellers"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.sellers.read"}},"/open/v1/sellers/{id}":{"get":{"description":"Get TikTok seller details with product list and linked creators.","operationId":"trenz-sellers-detail","parameters":[{"description":"Seller ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Include related resources, comma-separated (values: channel(Sales Channels), core(Core Metrics))","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"business_info":{"description":"Business info","items":{"type":"string"},"type":"array"},"create_time":{"description":"Listing time","type":"integer"},"creator_avatar":{"description":"Creator avatar","type":"string"},"creator_follow_count":{"description":"Creator followers","type":"string"},"creator_nickname":{"description":"Creator name","type":"string"},"creator_role":{"description":"Creator role","type":"integer"},"creator_user_id":{"description":"Creator user ID","type":"string"},"creator_user_name":{"description":"Creator username","type":"string"},"id":{"description":"Unique identifier","type":"string"},"last_update_time":{"description":"Last updated (ms timestamp)","type":"integer"},"region":{"description":"Region code","type":"string"},"seller_avatar":{"description":"Shop avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"seller_id":{"description":"Shop ID","type":"string"},"shop_main_category":{"description":"Main category","type":"string"},"shop_name":{"description":"Shop name","type":"string"},"shop_rating":{"description":"Shop rating","type":"number"},"shop_total_gmv":{"description":"Shop total GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Seller Detail","tags":["Data/Sellers"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.sellers.read"}},"/open/v1/sellers/{id}/creators":{"get":{"description":"","operationId":"trenz-sellers-creators","parameters":[{"description":"Seller ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_seller_detail_creator_account_type":{"description":"Account type","type":"integer"},"tiktok_seller_detail_creator_author_avg_engagement_rate":{"description":"Avg engagement rate","type":"number"},"tiktok_seller_detail_creator_author_avg_like_cnt":{"description":"Author avg likes per video","type":"number"},"tiktok_seller_detail_creator_author_avg_play_cnt":{"description":"Author avg views per video","type":"number"},"tiktok_seller_detail_creator_author_total_play_cnt":{"description":"Author total views","type":"integer"},"tiktok_seller_detail_creator_bio_email":{"description":"Bio email","type":"string"},"tiktok_seller_detail_creator_by_live":{"description":"Sells via live commerce","type":"boolean"},"tiktok_seller_detail_creator_by_shop":{"description":"Sells via shop","type":"boolean"},"tiktok_seller_detail_creator_by_video":{"description":"Sells via video commerce","type":"boolean"},"tiktok_seller_detail_creator_category_label":{"description":"Creator category label","type":"string"},"tiktok_seller_detail_creator_country_code":{"description":"Country code","type":"string"},"tiktok_seller_detail_creator_facebook_url":{"description":"Facebook URL","type":"string"},"tiktok_seller_detail_creator_follower_count":{"description":"Follower count","type":"integer"},"tiktok_seller_detail_creator_ins_id":{"description":"Instagram ID","type":"string"},"tiktok_seller_detail_creator_linkedin_url":{"description":"LinkedIn URL","type":"string"},"tiktok_seller_detail_creator_live_30d_gmv":{"description":"Live 30D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_seller_detail_creator_nickname":{"description":"Display name","type":"string"},"tiktok_seller_detail_creator_related_total_live":{"description":"Related live count","type":"integer"},"tiktok_seller_detail_creator_related_total_video":{"description":"Related video count","type":"integer"},"tiktok_seller_detail_creator_seller_id":{"description":"Shop ID","type":"string"},"tiktok_seller_detail_creator_telegram_url":{"description":"Telegram URL","type":"string"},"tiktok_seller_detail_creator_total_favorited":{"description":"Total likes received","type":"integer"},"tiktok_seller_detail_creator_total_video_live_30d_gmv":{"description":"Total Video Live 30D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_seller_detail_creator_twitter_id":{"description":"Twitter/X ID","type":"string"},"tiktok_seller_detail_creator_unique_id":{"description":"TikTok username","type":"string"},"tiktok_seller_detail_creator_user_avatar":{"description":"User avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_seller_detail_creator_user_id":{"description":"User ID","type":"string"},"tiktok_seller_detail_creator_video_30d_gmv":{"description":"Video 30D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_seller_detail_creator_video_7d_gmv":{"description":"Video 7D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_seller_detail_creator_video_count":{"description":"Video count","type":"integer"},"tiktok_seller_detail_creator_whatsapp_url":{"description":"WhatsApp URL","type":"string"},"tiktok_seller_detail_creator_youtube_channel_id":{"description":"YouTube channel ID","type":"string"},"tiktok_seller_detail_live_7d_gmv":{"description":"Live 7D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_seller_detail_total_video_live_7d_gmv":{"description":"Total Video Live 7D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Seller Related Creators","tags":["Data/Sellers"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.sellers.read"}},"/open/v1/sellers/{id}/products":{"get":{"description":"","operationId":"trenz-sellers-products","parameters":[{"description":"Seller ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_seller_detail_product_detail_link":{"description":"Product detail URL","type":"string"},"tiktok_seller_detail_product_link":{"description":"Product URL","type":"string"},"tiktok_seller_product_ceiling_price":{"description":"Max price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_seller_product_commission_rate":{"description":"Commission rate","type":"number"},"tiktok_seller_product_create_time":{"description":"Listing time","type":"integer"},"tiktok_seller_product_floor_price":{"description":"Min price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_seller_product_l1_category":{"description":"Level-1 category","type":"string"},"tiktok_seller_product_l2_category":{"description":"Level-2 category","type":"string"},"tiktok_seller_product_l3_category":{"description":"Level-3 category","type":"string"},"tiktok_seller_product_product_gmv":{"description":"Total GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_seller_product_product_gmv_for_last_7_days":{"description":"Product Gmv For Last 7 Days","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_seller_product_product_id":{"description":"Product ID","type":"string"},"tiktok_seller_product_product_images":{"description":"Product images","items":{"properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"type":"array"},"tiktok_seller_product_product_name":{"description":"Product name","type":"string"},"tiktok_seller_product_product_rating":{"description":"Product rating (0-5)","type":"number"},"tiktok_seller_product_product_sku_props":{"description":"SKU properties","items":{"properties":{"has_image":{"description":"Has image","type":"boolean"},"prop_id":{"description":"Property ID","type":"string"},"prop_name":{"description":"Property name","type":"string"},"sale_prop_values":{"description":"Property values","items":{"properties":{"image":{"properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"prop_value":{"description":"Property value","type":"string"},"prop_value_id":{"description":"Property value ID","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"},"tiktok_seller_product_product_skus":{"description":"SKU list","items":{"properties":{"is_hot":{"description":"Is hot selling","type":"boolean"},"price":{"properties":{"discount":{"description":"Discount info","type":"string"},"original_price":{"description":"Original price","type":"string"},"original_price_value":{"description":"Original price value","type":"string"},"real_price":{"description":"Actual price","type":"number"},"unit_price_desc":{"description":"Unit price description","type":"string"}},"type":"object"},"sale_prop_value_ids":{"description":"Property value ID combination","type":"string"},"sku_id":{"description":"SKU ID","type":"string"},"sku_sale_props":{"description":"SKU properties","items":{"properties":{"prop_id":{"description":"Property ID","type":"string"},"prop_name":{"description":"Property name (e.g. Color)","type":"string"},"prop_value":{"description":"Property value","type":"string"},"prop_value_id":{"description":"Property value ID","type":"string"}},"type":"object"},"type":"array"},"status":{"description":"Status (1=active)","type":"integer"},"stock":{"description":"Stock","type":"integer"}},"type":"object"},"type":"array"},"tiktok_seller_product_product_sold_count":{"description":"Total sales","type":"integer"},"tiktok_seller_product_product_sold_count_for_last_7_days":{"description":"Product Sold Count For Last 7 Days","type":"integer"},"tiktok_seller_product_product_status":{"description":"Product status","type":"integer"},"tiktok_seller_product_region":{"description":"Region code","type":"string"},"tiktok_seller_product_review_count":{"description":"Review count","type":"integer"},"tiktok_seller_product_total_related_creator_count":{"description":"Related creator count","type":"integer"},"tiktok_seller_product_total_related_video_count":{"description":"Related video count","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Seller Related Products","tags":["Data/Sellers"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.sellers.read"}},"/open/v1/sellers/{id}/videos":{"get":{"description":"","operationId":"trenz-sellers-videos","parameters":[{"description":"Seller ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_seller_detail_cover_url":{"description":"Cover image","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_seller_detail_follower_count":{"description":"Follower count","type":"integer"},"tiktok_seller_detail_is_ad":{"description":"Is advertisement","type":"boolean"},"tiktok_seller_detail_is_aigc_video":{"description":"Is AI-generated video","type":"boolean"},"tiktok_seller_detail_share_url":{"description":"TikTok share URL","type":"string"},"tiktok_seller_detail_user_avatar":{"description":"User avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_seller_detail_user_id":{"description":"User ID","type":"string"},"tiktok_seller_detail_user_nickname":{"description":"User display name","type":"string"},"tiktok_seller_detail_user_unique_id":{"description":"User TikTok username","type":"string"},"tiktok_seller_detail_video_30d_gmv":{"description":"Video 30D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_seller_detail_video_30d_play_count":{"description":"Video 30D Play Count","type":"integer"},"tiktok_seller_detail_video_30d_sold_count":{"description":"Video 30D Sold Count","type":"integer"},"tiktok_seller_detail_video_ad_source":{"description":"Video ad source","type":"integer"},"tiktok_seller_detail_video_comment_count":{"description":"Comment count","type":"integer"},"tiktok_seller_detail_video_country_code":{"description":"Video country","type":"string"},"tiktok_seller_detail_video_desc":{"description":"Video description","type":"string"},"tiktok_seller_detail_video_duration":{"description":"Duration (ms)","type":"integer"},"tiktok_seller_detail_video_engagement_rate":{"description":"Engagement rate (0-1)","type":"number"},"tiktok_seller_detail_video_id":{"description":"Video ID","type":"string"},"tiktok_seller_detail_video_launch_time":{"description":"Published at (ms timestamp)","type":"integer"},"tiktok_seller_detail_video_like_count":{"description":"Like count","type":"integer"},"tiktok_seller_detail_video_play_count":{"description":"View count","type":"integer"},"tiktok_seller_detail_video_seller_id":{"description":"Seller ID","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Seller Related Videos","tags":["Data/Sellers"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.sellers.read"}},"/open/v1/sessions":{"get":{"description":"Returns the session list for the current (or delegated) user; optionally fuzzy-search titles via `q`. `total` is the filtered total — page with `limit`/`offset`. Free endpoint.","operationId":"list-sessions","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}},{"description":"Page size, default 20, max 100 (cap enforced by nebula-claude)","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"Offset, default 0","in":"query","name":"offset","required":false,"schema":{"type":"integer"}},{"description":"Fuzzy title search (ILIKE)","in":"query","name":"q","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"sessions":[{"created_at":"2026-05-20T10:00:00Z","id":"sess-xxxx","last_active_at":"2026-05-25T12:00:00Z","message_count":7,"status":"active","title":"会话标题"}],"total":42},"request_id":"req-xxxx"},"schema":{"properties":{"data":{"properties":{"sessions":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"last_active_at":{"format":"date-time","type":"string"},"message_count":{"type":"integer"},"status":{"description":"Session status (default active)","enum":["active","archived"],"type":"string"},"title":{"type":"string"}},"type":"object"},"type":"array"},"total":{"type":"integer"}},"required":["sessions","total"],"type":"object"},"request_id":{"type":"string"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"List the current user's sessions","tags":["Trenz Agent/Sessions \u0026 Reports"],"x-billing-mode":"free","x-coin-cost":0}},"/open/v1/sessions/{sid}":{"get":{"description":"Returns all messages of the given session (including async tasks each message triggered). `content` is kept verbatim; business XML tags are parsed client-side.","operationId":"get-session-messages","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}},{"description":"Session ID","in":"path","name":"sid","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"messages":[{"agent_id":"trenzer","attachments":null,"content":"string，可能含 \u003creport\u003e 等业务 XML 标签","created_at":"2026-05-20T10:00:00Z","id":"msg-xxxx","role":"assistant","tasks":[{"completed_at":"2026-05-20T10:00:05Z","created_at":"2026-05-20T10:00:01Z","display_name":"Generate Image","result_type":"image","status":"completed","task_id":"tk-xxxx","tool_name":"image_gen"}]}]},"request_id":"req-xxxx"},"schema":{"properties":{"data":{"properties":{"messages":{"items":{"properties":{"agent_id":{"type":"string"},"attachments":{"items":{"properties":{"media_type":{"type":"string"},"name":{"type":"string"},"os_bucket":{"type":"string"},"os_key":{"type":"string"}},"type":"object"},"nullable":true,"type":"array"},"content":{"description":"原文，可能含 \u003creport\u003e/\u003centity\u003e 等业务 XML 标签，解析责任在客户端","type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"role":{"enum":["user","assistant"],"type":"string"},"tasks":{"items":{"properties":{"completed_at":{"format":"date-time","type":"string"},"created_at":{"format":"date-time","type":"string"},"display_name":{"type":"string"},"result_type":{"description":"Result type (default report; currently 3 values, may expand in future)","enum":["image","video","report"],"type":"string"},"status":{"description":"Task status","enum":["pending","running","completed","failed","cancelled"],"type":"string"},"task_id":{"type":"string"},"tool_name":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"}},"required":["messages"],"type":"object"},"request_id":{"type":"string"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"description":"SESSION_NOT_FOUND — Session does not exist or does not belong to the current user (merged semantics to avoid probing existence via status code)"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Get a session's messages","tags":["Trenz Agent/Sessions \u0026 Reports"],"x-billing-mode":"free","x-coin-cost":0}},"/open/v1/sessions/{sid}/reports":{"get":{"description":"Returns all reports generated in the given session, ordered by `created_at` DESC. Free endpoint.","operationId":"get-session-reports","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}},{"description":"Session ID","in":"path","name":"sid","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"reports":[{"content":"Markdown 内容","created_at":"2026-05-20T10:00:00Z","id":"rpt-xxxx","message_id":"msg-xxxx","title":"报告标题","updated_at":"2026-05-20T10:01:00Z"}]},"request_id":"req-xxxx"},"schema":{"properties":{"data":{"properties":{"reports":{"items":{"properties":{"content":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"message_id":{"type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"type":"object"},"type":"array"}},"required":["reports"],"type":"object"},"request_id":{"type":"string"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"description":"SESSION_NOT_FOUND — Session does not exist or does not belong to the current user (merged semantics to avoid probing existence via status code)"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Get all reports of a session","tags":["Trenz Agent/Sessions \u0026 Reports"],"x-billing-mode":"free","x-coin-cost":0}},"/open/v1/social/accounts/list":{"post":{"description":"List social accounts (including followers, engagement metrics, etc.).","operationId":"trenz-social-accounts-list","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"group_id":{"description":"Group filter: numeric ID = specific group, \"ungrouped\" = ungrouped, empty = all","type":"string"},"keyword":{"type":"string"},"page":{"default":1,"type":"integer"},"page_size":{"default":20,"type":"integer"},"platform":{"type":"string"},"sort_by":{"default":"display_time","type":"string"},"sort_order":{"default":"desc","type":"string"},"status":{"type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"accounts":{"items":{"properties":{"account_type":{"description":"Account type: business/creator","type":"string"},"avatar_url":{"description":"Avatar URL","type":"string"},"created_at":{"description":"Bound at (Unix timestamp)","type":"integer"},"display_name":{"description":"Display name","type":"string"},"engagement_rate":{"description":"Engagement rate (%)","type":"number"},"followers":{"description":"Followers","type":"integer"},"gmv":{"description":"GMV (tiktok-shop-pc only)","type":"number"},"gmv_currency":{"description":"GMV currency","type":"string"},"id":{"description":"Account ID","type":"integer"},"last_posted_at":{"description":"Last published at (Unix timestamp)","type":"integer"},"orders":{"description":"Orders","type":"integer"},"platform":{"description":"Platform: tiktok/tiktok-shop-pc/instagram/youtube/facebook","type":"string"},"post_activity":{"description":"Last 14-day publishing activity (index 0 = 14 days ago, 13 = today)","items":{"type":"integer"},"type":"array"},"refresh_token_expires_at":{"description":"OAuth token expires at (Unix timestamp)","type":"integer"},"region":{"description":"Region (tiktok-shop-pc)","type":"string"},"remark":{"description":"User remark","type":"string"},"scheduled_posts":{"description":"Pending-publish video count","type":"integer"},"status":{"description":"Status: active/expired/revoked","type":"string"},"total_comments":{"description":"Total comments","type":"integer"},"total_likes":{"description":"Total likes","type":"integer"},"total_posts":{"description":"Published video count","type":"integer"},"total_shares":{"description":"Total shares","type":"integer"},"total_views":{"description":"Total views","type":"integer"},"username":{"description":"Username","type":"string"}},"type":"object"},"type":"array"},"total":{"type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Social Account List","tags":["Social/1.Account Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/analytics/overview":{"post":{"description":"Get a social account analytics overview, including views, engagement, and commerce aggregates.","operationId":"trenz-social-analytics-overview","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account_types":{"description":"Account type filter","items":{"type":"string"},"type":"array"},"end_date":{"description":"End date YYYY-MM-DD","type":"string"},"platform_account_ids":{"description":"Account filter","items":{"type":"integer"},"type":"array"},"platforms":{"description":"Platform filter","items":{"type":"string"},"type":"array"},"start_date":{"description":"Start date YYYY-MM-DD","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"end_date":{"type":"string"},"start_date":{"type":"string"},"summary":{"properties":{"avg_anchor_display_rate":{"description":"Average anchor display rate","type":"number"},"avg_click_through_rate":{"description":"Average CTR","type":"number"},"comments_growth":{"description":"Comments growth","type":"integer"},"engagement_rate":{"type":"number"},"engagement_rate_change":{"description":"Engagement rate change","type":"number"},"engagements_growth":{"description":"Engagement growth","type":"integer"},"gmv_currency":{"description":"GMV currency","type":"string"},"likes_growth":{"type":"integer"},"platform_breakdown":{"description":"Per-platform breakdown","items":{"properties":{"comments":{"type":"integer"},"gmv":{"type":"number"},"likes":{"type":"integer"},"orders":{"type":"integer"},"platform":{"type":"string"},"shares":{"type":"integer"},"videos":{"type":"integer"},"views":{"type":"integer"}},"type":"object"},"type":"array"},"shares_growth":{"description":"Shares growth","type":"integer"},"total_accounts":{"type":"integer"},"total_comments":{"type":"integer"},"total_engagements":{"description":"Total engagement","type":"integer"},"total_gmv":{"type":"number"},"total_items_sold":{"description":"Units sold","type":"integer"},"total_likes":{"type":"integer"},"total_orders":{"type":"integer"},"total_posts":{"description":"Total post count","type":"integer"},"total_shares":{"type":"integer"},"total_videos":{"type":"integer"},"total_views":{"type":"integer"},"views_growth":{"type":"integer"}},"type":"object"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Analytics Overview","tags":["Social/5.Analytics"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/analytics/shop-videos":{"post":{"description":"List TikTok Shop shoppable videos with their commerce metrics.","operationId":"trenz-social-analytics-shop-videos","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account_types":{"description":"Account type list","items":{"type":"string"},"type":"array"},"date_range":{"description":"Date range","enum":["7d","14d","30d"],"type":"string"},"limit":{"description":"Page size","type":"integer"},"offset":{"description":"Offset","type":"integer"},"platform_account_ids":{"description":"Platform account ID list","items":{"type":"integer"},"type":"array"},"sort_by":{"description":"Sort: gmv/orders/items_sold/published_at","type":"string"},"sort_order":{"description":"Sort direction: desc/asc","type":"string"}},"required":["date_range"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"total_count":{"type":"integer"},"videos":{"items":{"properties":{"cover_url":{"type":"string"},"gmv":{"type":"number"},"gmv_currency":{"type":"string"},"items_sold":{"type":"integer"},"orders":{"type":"integer"},"platform_account_id":{"type":"integer"},"platform_url":{"type":"string"},"platform_video_id":{"type":"string"},"published_at":{"type":"integer"},"video_title":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Shoppable Video List","tags":["Social/5.Analytics"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/analytics/shop-videos/detail":{"post":{"description":"Get daily commerce metrics and linked products for a shoppable video.","operationId":"trenz-social-analytics-shop-video-detail","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"platform_account_id":{"description":"Shop account ID","type":"integer"},"platform_video_id":{"description":"Platform video ID","type":"string"}},"required":["platform_video_id","platform_account_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"daily_metrics":{"items":{"properties":{"anchor_display_rate":{"description":"Anchor display rate","type":"number"},"click_through_rate":{"description":"Click-through rate","type":"number"},"gmv":{"type":"number"},"gmv_currency":{"type":"string"},"items_sold":{"type":"integer"},"metric_date":{"type":"string"},"orders":{"type":"integer"}},"type":"object"},"type":"array"},"products":{"items":{"properties":{"product_id":{"type":"string"},"product_title":{"type":"string"}},"type":"object"},"type":"array"},"video":{"properties":{"cover_url":{"type":"string"},"platform_video_id":{"type":"string"},"video_title":{"type":"string"}},"type":"object"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Shoppable Video Detail","tags":["Social/5.Analytics"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/analytics/top-accounts":{"post":{"description":"Rank top accounts by metric.","operationId":"trenz-social-analytics-top-accounts","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account_types":{"description":"Account type list","items":{"type":"string"},"type":"array"},"end_date":{"description":"End date YYYY-MM-DD","type":"string"},"limit":{"description":"Result size, default 10","type":"integer"},"metric":{"description":"Sort metric: views/likes/comments/shares/gmv","type":"string"},"platforms":{"description":"Platform list, e.g. [\"tiktok\"]","items":{"type":"string"},"type":"array"},"start_date":{"description":"Start date YYYY-MM-DD","type":"string"}},"required":["metric"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"accounts":{"items":{"properties":{"avatar_url":{"type":"string"},"display_name":{"type":"string"},"metric_growth":{"type":"integer"},"metric_value":{"type":"integer"},"platform":{"type":"string"},"platform_account_id":{"type":"integer"},"video_count":{"type":"integer"}},"type":"object"},"type":"array"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Top Accounts Ranking","tags":["Social/5.Analytics"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/analytics/top-products":{"post":{"description":"Rank top products by sales metric.","operationId":"trenz-social-analytics-top-products","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account_types":{"description":"Account type list","items":{"type":"string"},"type":"array"},"end_date":{"description":"End date YYYY-MM-DD","type":"string"},"limit":{"description":"Result size, default 10","type":"integer"},"metric":{"description":"Sort metric: gmv/orders/video_count","type":"string"},"platform_account_ids":{"description":"Account ID list","items":{"type":"integer"},"type":"array"},"start_date":{"description":"Start date YYYY-MM-DD","type":"string"}},"required":["metric"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"products":{"items":{"properties":{"image_url":{"type":"string"},"platform_product_id":{"type":"string"},"price_amount":{"type":"number"},"price_currency":{"type":"string"},"product_id":{"type":"integer"},"title":{"type":"string"},"total_gmv":{"type":"number"},"total_items_sold":{"type":"integer"},"total_orders":{"type":"integer"},"video_count":{"type":"integer"}},"type":"object"},"type":"array"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Top Products Ranking","tags":["Social/5.Analytics"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/analytics/top-videos":{"post":{"description":"Rank top videos by metric.","operationId":"trenz-social-analytics-top-videos","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account_types":{"description":"Account type list","items":{"type":"string"},"type":"array"},"end_date":{"description":"End date YYYY-MM-DD","type":"string"},"limit":{"description":"Result size, default 10","type":"integer"},"metric":{"description":"Sort metric: views/likes/comments/shares","type":"string"},"platform_account_ids":{"description":"Account ID list","items":{"type":"integer"},"type":"array"},"platforms":{"description":"Platform list","items":{"type":"string"},"type":"array"},"start_date":{"description":"Start date YYYY-MM-DD","type":"string"}},"required":["metric"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"videos":{"items":{"properties":{"account_avatar_url":{"description":"Account avatar URL","type":"string"},"account_display_name":{"description":"Account display name","type":"string"},"anchor_display_rate":{"description":"Anchor display rate","type":"number"},"click_through_rate":{"description":"Click-through rate","type":"number"},"comment_count":{"type":"integer"},"cover_url":{"type":"string"},"gmv_amount":{"description":"GMV amount","type":"number"},"gmv_currency":{"description":"GMV currency","type":"string"},"item_sold_count":{"description":"Units sold","type":"integer"},"like_count":{"type":"integer"},"metric_growth":{"description":"Metric growth","type":"integer"},"order_count":{"description":"Orders","type":"integer"},"platform":{"type":"string"},"platform_account_id":{"type":"integer"},"platform_url":{"type":"string"},"platform_video_id":{"type":"string"},"product_id":{"description":"Linked product ID","type":"string"},"product_image_url":{"description":"Linked product image URL","type":"string"},"product_title":{"description":"Linked product name","type":"string"},"published_at":{"type":"integer"},"region":{"description":"Region","type":"string"},"share_count":{"type":"integer"},"video_title":{"type":"string"},"view_count":{"type":"integer"}},"type":"object"},"type":"array"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Top Videos Ranking","tags":["Social/5.Analytics"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/analytics/trend":{"post":{"description":"Get time-series trend data for a specified metric.","operationId":"trenz-social-analytics-trend","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account_types":{"description":"Account type list","items":{"type":"string"},"type":"array"},"end_date":{"description":"End date YYYY-MM-DD","type":"string"},"granularity":{"description":"Time granularity: day/week","type":"string"},"metric":{"description":"Metric: views/likes/comments/shares/followers","type":"string"},"platform_account_ids":{"description":"Account ID list","items":{"type":"integer"},"type":"array"},"platforms":{"description":"Platform list","items":{"type":"string"},"type":"array"},"start_date":{"description":"Start date YYYY-MM-DD","type":"string"},"value_mode":{"description":"Numeric mode","type":"string"}},"required":["metric"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"growth_rate":{"type":"number"},"total_growth":{"type":"number"},"trend_data":{"items":{"properties":{"date":{"type":"string"},"growth":{"type":"number"},"value":{"type":"number"}},"type":"object"},"type":"array"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Analytics Trend","tags":["Social/5.Analytics"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/comments/create":{"post":{"description":"Post a new comment under a video as the bound account.","operationId":"trenz-social-comments-create","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"platform_account_id":{"description":"Platform account ID","type":"integer"},"platform_video_id":{"description":"Platform video ID","type":"string"},"text":{"description":"Comment content","type":"string"}},"required":["platform_account_id","platform_video_id","text"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"comment":{"properties":{"author":{"properties":{"display_name":{"type":"string"},"username":{"type":"string"}},"type":"object"},"like_count":{"description":"Likes","type":"integer"},"platform":{"description":"Platform","type":"string"},"platform_comment_id":{"type":"string"},"platform_video_id":{"description":"Platform video ID","type":"string"},"published_at":{"type":"integer"},"reply_count":{"description":"Reply count","type":"integer"},"text":{"type":"string"}},"type":"object"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Create Comment","tags":["Social/4.Comment Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.write"}},"/open/v1/social/comments/delete":{"post":{"description":"Delete a comment on the platform and update local state.","operationId":"trenz-social-comments-delete","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"platform_account_id":{"description":"Platform account ID","type":"integer"},"platform_comment_id":{"description":"Comment ID","type":"string"},"platform_video_id":{"description":"Platform video ID","type":"string"}},"required":["platform_account_id","platform_video_id","platform_comment_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"comment":{"properties":{"is_deleted":{"type":"boolean"},"platform":{"description":"Platform","type":"string"},"platform_comment_id":{"type":"string"},"text":{"description":"Comment content","type":"string"}},"type":"object"},"success":{"type":"boolean"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Delete Comment","tags":["Social/4.Comment Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.write"}},"/open/v1/social/comments/like":{"post":{"description":"Like or unlike a comment on the platform.","operationId":"trenz-social-comments-like","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"action":{"description":"Action: like/unlike","type":"string"},"platform_account_id":{"description":"Platform account ID","type":"integer"},"platform_comment_id":{"description":"Comment ID","type":"string"},"platform_video_id":{"description":"Platform video ID","type":"string"}},"required":["platform_account_id","platform_video_id","platform_comment_id","action"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"comment":{"properties":{"is_liked":{"type":"boolean"},"like_count":{"type":"integer"},"platform":{"description":"Platform","type":"string"},"platform_comment_id":{"type":"string"},"text":{"description":"Comment content","type":"string"}},"type":"object"},"success":{"type":"boolean"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Like Comment","tags":["Social/4.Comment Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.write"}},"/open/v1/social/comments/managed":{"post":{"description":"Query synced comments from the local database with multi-dimensional filters.","operationId":"trenz-social-comments-managed-list","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"ai_intent":{"description":"AI intent filter: purchase/support/feedback/general","type":"string"},"ai_priority":{"description":"AI priority filter: high/medium/low","type":"string"},"engaged":{"description":"Whether interacted","type":"boolean"},"include_replies":{"description":"Whether to include replies","type":"boolean"},"is_deleted":{"description":"Whether deleted","type":"boolean"},"is_hidden":{"description":"Whether hidden","type":"boolean"},"is_read":{"description":"Whether read","type":"boolean"},"keyword":{"description":"Search keyword","type":"string"},"limit":{"default":20,"description":"Page size","type":"integer"},"max_replies":{"description":"Max replies returned per comment","type":"integer"},"page":{"default":1,"description":"Page number","type":"integer"},"platform_account_ids":{"description":"Account ID list","items":{"type":"integer"},"type":"array"},"platform_video_id":{"description":"Video ID (filter comments for a specific video)","type":"string"},"platforms":{"description":"Platform list","items":{"type":"string"},"type":"array"},"published_after":{"description":"Publish time start (Unix timestamp)","type":"integer"},"published_before":{"description":"Publish time end (Unix timestamp)","type":"integer"},"sort_by":{"description":"Sort field","type":"string"},"sort_order":{"description":"Sort direction asc/desc","type":"string"},"view_mode":{"description":"View mode","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"comments":{"items":{"properties":{"ai_intent":{"description":"AI intent classification","type":"string"},"ai_priority":{"description":"AI priority classification","type":"string"},"author":{"properties":{"avatar_url":{"type":"string"},"display_name":{"type":"string"},"username":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"is_deleted":{"description":"Whether deleted","type":"boolean"},"is_liked":{"description":"Whether liked","type":"boolean"},"is_owner_replied":{"description":"Whether replied","type":"boolean"},"is_read":{"type":"boolean"},"is_self_comment":{"description":"Whether it is the user's own comment","type":"boolean"},"like_count":{"type":"integer"},"platform":{"description":"Platform","type":"string"},"platform_comment_id":{"type":"string"},"platform_video_id":{"type":"string"},"published_at":{"type":"integer"},"reply_count":{"type":"integer"},"text":{"type":"string"}},"type":"object"},"type":"array"},"limit":{"type":"integer"},"page":{"type":"integer"},"total_count":{"type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Managed Comment List","tags":["Social/4.Comment Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/comments/managed/replies":{"post":{"description":"List synced replies for a comment.","operationId":"trenz-social-comments-managed-replies","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"is_deleted":{"description":"Whether deleted","type":"boolean"},"is_hidden":{"description":"Whether hidden","type":"boolean"},"limit":{"description":"Page size","type":"integer"},"page":{"description":"Page number","type":"integer"},"platform_account_id":{"description":"Platform account ID","type":"integer"},"platform_comment_id":{"description":"Parent comment ID","type":"string"}},"required":["platform_account_id","platform_comment_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"limit":{"type":"integer"},"page":{"type":"integer"},"replies":{"items":{"properties":{"author":{"properties":{"avatar_url":{"type":"string"},"display_name":{"type":"string"},"username":{"type":"string"}},"type":"object"},"id":{"type":"integer"},"is_deleted":{"description":"Whether deleted","type":"boolean"},"is_liked":{"description":"Whether liked","type":"boolean"},"like_count":{"type":"integer"},"platform":{"description":"Platform","type":"string"},"platform_comment_id":{"type":"string"},"published_at":{"type":"integer"},"text":{"type":"string"}},"type":"object"},"type":"array"},"total_count":{"type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Managed Reply List","tags":["Social/4.Comment Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/comments/query":{"post":{"description":"Query a video's comments in real time.","operationId":"trenz-social-comments-query","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"cursor":{"description":"Pagination cursor","type":"string"},"limit":{"description":"Page size, max 50","type":"integer"},"platform_account_id":{"description":"Platform account ID","type":"integer"},"platform_video_id":{"description":"Platform video ID","type":"string"},"sort_by":{"description":"Sort: published_at/like_count","type":"string"},"sort_order":{"description":"Sort direction: asc/desc","type":"string"}},"required":["platform_account_id","platform_video_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"comments":{"items":{"properties":{"ai_intent":{"description":"AI intent classification","type":"string"},"ai_priority":{"description":"AI priority classification","type":"string"},"author":{"properties":{"avatar_url":{"type":"string"},"display_name":{"type":"string"},"username":{"type":"string"}},"type":"object"},"is_deleted":{"description":"Whether deleted","type":"boolean"},"is_hidden":{"type":"boolean"},"is_liked":{"description":"Whether liked","type":"boolean"},"is_owner_replied":{"description":"Whether replied","type":"boolean"},"is_read":{"description":"Whether read","type":"boolean"},"is_self_comment":{"description":"Whether it is the user's own comment","type":"boolean"},"like_count":{"type":"integer"},"platform":{"description":"Platform","type":"string"},"platform_comment_id":{"type":"string"},"published_at":{"type":"integer"},"reply_count":{"type":"integer"},"text":{"type":"string"}},"type":"object"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"type":"string"},"total_count":{"type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Real-time Comment Query","tags":["Social/4.Comment Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/comments/replies":{"post":{"description":"List replies under a specific comment.","operationId":"trenz-social-comments-replies","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"cursor":{"description":"Pagination cursor","type":"string"},"limit":{"description":"Page size","type":"integer"},"page":{"description":"Page number","type":"integer"},"platform":{"description":"Platform: tiktok/youtube/instagram","type":"string"},"platform_account_id":{"description":"Platform account ID","type":"integer"},"platform_comment_id":{"description":"Parent comment ID","type":"string"}},"required":["platform_account_id","platform_comment_id","platform"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"has_more":{"type":"boolean"},"limit":{"type":"integer"},"next_cursor":{"type":"string"},"page":{"type":"integer"},"replies":{"items":{"properties":{"author":{"properties":{"avatar_url":{"type":"string"},"display_name":{"type":"string"},"username":{"type":"string"}},"type":"object"},"is_deleted":{"description":"Whether deleted","type":"boolean"},"is_liked":{"description":"Whether liked","type":"boolean"},"is_self_comment":{"description":"Whether it is the user's own comment","type":"boolean"},"like_count":{"type":"integer"},"platform":{"description":"Platform","type":"string"},"platform_comment_id":{"type":"string"},"published_at":{"type":"integer"},"text":{"type":"string"}},"type":"object"},"type":"array"},"total_count":{"type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Comment Replies","tags":["Social/4.Comment Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/comments/reply":{"post":{"description":"Reply to a comment as the bound account.","operationId":"trenz-social-comments-reply","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"platform_account_id":{"description":"Platform account ID","type":"integer"},"platform_comment_id":{"description":"Comment ID","type":"string"},"platform_video_id":{"description":"Platform video ID","type":"string"},"text":{"description":"Reply content","type":"string"}},"required":["platform_account_id","platform_video_id","platform_comment_id","text"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"reply":{"properties":{"author":{"properties":{"display_name":{"type":"string"},"username":{"type":"string"}},"type":"object"},"like_count":{"description":"Likes","type":"integer"},"platform":{"description":"Platform","type":"string"},"platform_comment_id":{"type":"string"},"published_at":{"type":"integer"},"text":{"type":"string"}},"type":"object"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Reply to Comment","tags":["Social/4.Comment Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.write"}},"/open/v1/social/comments/sync":{"post":{"description":"Sync comments from the platform into the local database.","operationId":"trenz-social-comments-sync","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"platform_account_id":{"description":"Platform account ID","type":"integer"},"platform_video_id":{"description":"Optional: sync a specific video only","type":"string"}},"required":["platform_account_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"comments_synced":{"type":"integer"},"errors":{"type":"integer"},"replies_synced":{"type":"integer"},"videos_processed":{"type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Sync Comments","tags":["Social/4.Comment Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.write"}},"/open/v1/social/hashtag/suggestions":{"post":{"description":"Get popular TikTok hashtag suggestions for a given keyword.","operationId":"trenz-social-hashtag-suggestions","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"keyword":{"description":"Search keyword (word)","type":"string"},"language":{"description":"Language code, default en","type":"string"}},"required":["keyword"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"from_cache":{"type":"boolean"},"suggestions":{"items":{"properties":{"name":{"description":"Hashtag name","type":"string"},"view_count":{"description":"Views","type":"integer"}},"type":"object"},"type":"array"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Hashtag Suggestions","tags":["Social/6.Creation Tools"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/music/recently-used":{"post":{"description":"List recently used music tracks.","operationId":"trenz-social-music-recently-used","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"keyword":{"description":"Search keyword","type":"string"},"limit":{"description":"Page size","type":"integer"},"page":{"description":"Page number","type":"integer"},"platform_account_id":{"description":"Filter account","type":"integer"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"limit":{"type":"integer"},"music_list":{"items":{"properties":{"artist":{"type":"string"},"commercial_music_id":{"description":"Commercial music ID","type":"string"},"commercial_music_name":{"type":"string"},"duration":{"type":"integer"},"genres":{"items":{"type":"string"},"type":"array"},"id":{"type":"integer"},"platform_account_id":{"description":"Account ID that uses this music","type":"integer"},"preview_url":{"type":"string"},"song_clip_id":{"type":"string"},"thumbnail_url":{"type":"string"},"used_at":{"type":"integer"}},"type":"object"},"type":"array"},"page":{"type":"integer"},"total_count":{"type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Recently Used Music","tags":["Social/6.Creation Tools"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/music/search":{"post":{"description":"Search popular TikTok music with filters on keyword and type.","operationId":"trenz-social-music-search","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"country_code":{"description":"Country code, default US","type":"string"},"date_range":{"description":"Time range: 1DAY/7DAY/30DAY","type":"string"},"genre":{"description":"Music type","type":"string"},"keyword":{"description":"Search keyword","type":"string"},"limit":{"description":"Page size, max 100","type":"integer"},"page":{"description":"Page number","type":"integer"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"limit":{"type":"integer"},"music_list":{"items":{"properties":{"artist":{"type":"string"},"commercial_music_id":{"description":"Commercial music ID","type":"string"},"commercial_music_name":{"type":"string"},"country_code":{"description":"Country code","type":"string"},"duration":{"type":"integer"},"genres":{"items":{"type":"string"},"type":"array"},"id":{"type":"integer"},"preview_url":{"type":"string"},"rank_position":{"type":"integer"},"song_clip_id":{"type":"string"},"thumbnail_url":{"type":"string"}},"type":"object"},"type":"array"},"page":{"type":"integer"},"total_count":{"type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Popular Music Search","tags":["Social/6.Creation Tools"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/plans/precheck":{"post":{"description":"Trigger a TikTok Shop quality precheck for a publish plan.","operationId":"trenz-social-plans-precheck","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"publication_id":{"description":"Plan ID","type":"integer"}},"required":["publication_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"record":{"properties":{"created_at":{"type":"integer"},"id":{"type":"integer"},"publication_id":{"type":"integer"},"status":{"type":"string"}},"type":"object"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Trigger Quality Precheck","tags":["Social/2.Video Publishing"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.write"}},"/open/v1/social/plans/precheck-records":{"post":{"description":"Get the quality-precheck history for a publish plan.","operationId":"trenz-social-plans-precheck-records","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"publication_id":{"description":"Publish plan ID","type":"integer"}},"required":["publication_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"records":{"items":{"properties":{"created_at":{"type":"integer"},"error_message":{"type":"string"},"id":{"type":"integer"},"publication_id":{"type":"integer"},"result":{"description":"JSON: {issues, quality_score}","type":"string"},"status":{"description":"pending/processing/passed/failed/error/timeout","type":"string"},"updated_at":{"type":"integer"}},"type":"object"},"type":"array"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Precheck Record List","tags":["Social/2.Video Publishing"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/platform-accounts/detail":{"post":{"description":"Get details for a single social platform account.","operationId":"trenz-social-platform-account-detail","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Platform account ID","type":"integer"}},"required":["account_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"account":{"properties":{"account_type":{"type":"string"},"avatar_url":{"type":"string"},"created_at":{"type":"integer"},"display_name":{"type":"string"},"id":{"type":"integer"},"platform":{"type":"string"},"platform_account_id":{"type":"string"},"region":{"description":"Account region","type":"string"},"remark":{"type":"string"},"scopes":{"items":{"type":"string"},"type":"array"},"status":{"type":"string"},"updated_at":{"type":"integer"},"username":{"type":"string"}},"type":"object"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Social Account Detail","tags":["Social/1.Account Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/platform-accounts/disconnect":{"post":{"description":"Disconnect a social platform account.","operationId":"trenz-social-platform-account-disconnect","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"ID of the account to disconnect","format":"int32","type":"integer"}},"required":["account_id"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Disconnect Social Account","tags":["Social/1.Account Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.write"}},"/open/v1/social/platform-accounts/update-remark":{"post":{"description":"Update the user-defined remark on a social platform account.","operationId":"trenz-social-platform-account-update-remark","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Platform account ID","type":"integer"},"remark":{"description":"Remark content, max 500 characters","type":"string"}},"required":["account_id","remark"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"account":{"properties":{"display_name":{"type":"string"},"id":{"type":"integer"},"remark":{"type":"string"}},"type":"object"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Update Account Remark","tags":["Social/1.Account Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.write"}},"/open/v1/social/publish/cancel":{"post":{"description":"Cancel a specific publish task.","operationId":"trenz-social-publish-cancel","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"publication_id":{"description":"Publish task ID","type":"integer"}},"required":["publication_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Cancel Individual Publish","tags":["Social/2.Video Publishing"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.write"}},"/open/v1/social/publish/session":{"post":{"description":"Query the progress of a video publish session.","operationId":"trenz-social-publish-session","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"session_token":{"description":"Publish session token","type":"string"}},"required":["session_token"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"publications":{"items":{"properties":{"id":{"type":"integer"},"platform_url":{"type":"string"},"platform_video_id":{"type":"string"},"progress_percentage":{"type":"integer"},"stage":{"type":"string"},"status":{"type":"string"}},"type":"object"},"type":"array"},"session":{"properties":{"completed_at":{"description":"Completed at (Unix timestamp)","type":"integer"},"completed_publications":{"type":"integer"},"failed_publications":{"type":"integer"},"id":{"type":"integer"},"session_token":{"type":"string"},"started_at":{"type":"integer"},"status":{"type":"string"},"total_publications":{"type":"integer"},"video_id":{"type":"integer"}},"type":"object"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Publish Session Status","tags":["Social/2.Video Publishing"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/publish/session/cancel":{"post":{"description":"Cancel an entire video publish session.","operationId":"trenz-social-publish-session-cancel","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"session_token":{"description":"Publish session token","type":"string"}},"required":["session_token"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Cancel Publish Session","tags":["Social/2.Video Publishing"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.write"}},"/open/v1/social/publish/upload-and-publish":{"post":{"description":"One-step upload-and-publish a video to multiple social platforms.","operationId":"trenz-social-publish-upload","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bucket_key":{"description":"Object key (the `object_key` returned by 'Generate Presigned Upload URL' under the 'General' category)","type":"string"},"bucket_name":{"description":"Bucket name (the `s3_bucket` returned by 'Generate Presigned Upload URL' under the 'General' category)","type":"string"},"content_type":{"default":"video","description":"Content type: video or image","type":"string"},"cover_bucket_key":{"description":"Cover image object key (the `object_key` returned by 'Generate Presigned Upload URL' under the 'General' category, optional)","type":"string"},"cover_bucket_name":{"description":"Cover image bucket name (the `s3_bucket` returned by 'Generate Presigned Upload URL' under the 'General' category, optional)","type":"string"},"dry_run":{"default":false,"description":"Dry-run publish (does not actually publish to the platform)","type":"boolean"},"duration":{"description":"Video duration (seconds, optional)","type":"number"},"file_size":{"description":"File size (bytes, optional)","type":"integer"},"media_items":{"description":"Media item list (for carousel and other multi-file publishing scenarios. When `media_items` is set, `bucket_name`/`bucket_key` are not required)","items":{"properties":{"bucket_key":{"description":"Object key","type":"string"},"bucket_name":{"description":"Bucket name","type":"string"},"order":{"description":"Sort index","type":"integer"}},"required":["bucket_name","bucket_key","order"],"type":"object"},"type":"array"},"publications":{"description":"Publish target list (can publish to multiple accounts at once)","items":{"properties":{"description":{"description":"Video description","type":"string"},"platform_account_id":{"description":"Target social account ID","type":"integer"},"platform_config":{"description":"Platform-specific publishing config (click to expand for details)","properties":{"privacy":{"description":"Privacy setting. TikTok: PUBLIC_TO_EVERYONE (default) / MUTUAL_FOLLOW_FRIENDS / FOLLOWER_OF_CREATOR / SELF_ONLY; YouTube: public / private (default) / unlisted","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY","public","private","unlisted"],"type":"string"},"product_id":{"description":"Linked product ID","type":"string"},"product_title":{"description":"Linked product name","type":"string"}},"title":"Platform publishing config","type":"object"},"scheduled_at":{"description":"Scheduled publish timestamp (Unix seconds)","type":"integer"},"tags":{"description":"Tag list","items":{"type":"string"},"type":"array"},"title":{"description":"Video title","type":"string"}},"required":["platform_account_id","title"],"type":"object"},"type":"array"},"source_id":{"description":"Source ID","type":"string"},"source_type":{"description":"Source type","type":"string"},"video_description":{"description":"Video description","type":"string"},"video_title":{"description":"Video title","type":"string"}},"required":["video_title","publications"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"session_token":{"type":"string"},"skipped_accounts":{"items":{"type":"string"},"type":"array"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Upload and Publish Video","tags":["Social/2.Video Publishing"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.write"}},"/open/v1/social/tiktok-shop/products":{"post":{"description":"Get the unified TikTok Shop product list, auto-routing between showcase and shop sources.","operationId":"trenz-social-tiktok-shop-products","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Platform account ID","type":"integer"},"data_source":{"description":"Data source: shop/showcase","type":"string"},"origin":{"description":"Source: LIVE/SHOWCASE","type":"string"},"page_size":{"description":"Page size, 1-20","type":"integer"},"page_token":{"description":"Pagination token","type":"string"},"sort_field":{"description":"Sort field: PRODUCT_ID/PRICE/SALE","type":"string"},"sort_order":{"description":"Sort direction: DESC/ASC","type":"string"},"title_keyword":{"description":"Product title search","type":"string"}},"required":["account_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"creator_type":{"type":"string"},"data_source":{"type":"string"},"next_page_token":{"type":"string"},"products":{"items":{"properties":{"added_status":{"type":"string"},"brand_name":{"description":"Brand name","type":"string"},"commission":{"description":"Commission info","properties":{"amount":{"type":"string"},"rate":{"type":"number"}},"type":"object"},"detail_link":{"description":"Product detail URL","type":"string"},"id":{"type":"string"},"images":{"items":{"properties":{"height":{"type":"integer"},"url":{"type":"string"},"width":{"type":"integer"}},"type":"object"},"type":"array"},"inventory_status":{"description":"Stock status","type":"string"},"is_hidden":{"description":"Whether hidden","type":"boolean"},"price":{"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"type":"object"},"review_status":{"description":"Review status","type":"string"},"sale_regions":{"description":"Sales region","items":{"type":"string"},"type":"array"},"sales_count":{"description":"Sales","type":"integer"},"shop_name":{"description":"Seller name","type":"string"},"source":{"description":"Product source","type":"string"},"title":{"type":"string"}},"type":"object"},"type":"array"},"total_count":{"type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"TikTok Shop Product List","tags":["Social/7.TikTok Shop"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/tiktok-shop/showcase/add":{"post":{"description":"Add a product to the TikTok Shop creator showcase.","operationId":"trenz-social-tiktok-shop-showcase-add","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Platform account ID","type":"integer"},"add_type":{"description":"Add mode: PRODUCT_ID/PRODUCT_LINK","type":"string"},"product_ids":{"description":"Product ID list, max 20","items":{"type":"string"},"type":"array"},"product_link":{"description":"Product URL","type":"string"}},"required":["account_id","add_type"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"errors":{"items":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"product_id":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Add Product to Showcase","tags":["Social/7.TikTok Shop"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.write"}},"/open/v1/social/tiktok/qrcode":{"post":{"description":"Get a TikTok QR code for login. After scanning and authorizing, you must poll the \"TikTok QR Code Status Check\" endpoint every 2-3 seconds until it returns status=confirmed to complete binding.","operationId":"trenz-social-tiktok-qrcode","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"connector":{"description":"Must be trenz","enum":["trenz"],"type":"string"},"state":{"description":"CSRF protection state parameter","type":"string"}},"required":["connector"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"scan_qrcode_url":{"type":"string"},"token":{"type":"string"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"TikTok QR Code Login","tags":["Social/1.Account Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.write"}},"/open/v1/social/tiktok/qrcode/check":{"post":{"description":"Poll the TikTok QR code login status.","operationId":"trenz-social-tiktok-qrcode-check","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"connector":{"description":"Must be trenz","enum":["trenz"],"type":"string"},"token":{"description":"Token obtained from 'TikTok QR Code Login'","type":"string"}},"required":["connector","token"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"account":{"description":"Account info returned on successful binding (when `status=confirmed` and connection succeeds)","properties":{"account_type":{"description":"Account type: business/creator","type":"string"},"avatar_url":{"description":"Avatar URL","type":"string"},"created_at":{"description":"Bound at (Unix timestamp)","type":"integer"},"display_name":{"description":"Display name","type":"string"},"id":{"description":"Account ID","type":"integer"},"platform":{"description":"Platform","type":"string"},"platform_account_id":{"description":"Platform-side account ID","type":"string"},"region":{"description":"TikTok Shop region","type":"string"},"scopes":{"description":"OAuth scope","items":{"type":"string"},"type":"array"},"status":{"description":"Account status: active/expired/revoked","type":"string"},"username":{"description":"Username","type":"string"}},"type":"object"},"client_ticket":{"description":"Client ticket string","type":"string"},"code":{"type":"string"},"redirect_uri":{"type":"string"},"state":{"description":"CSRF state parameter (returned when `status=confirmed`)","type":"string"},"status":{"description":"new/expired/scanned/confirmed/utilised","type":"string"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"TikTok QR Code Status Check","tags":["Social/1.Account Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.write"}},"/open/v1/social/upload/presigned-url":{"post":{"description":"Generate an S3 presigned upload URL for direct client-side file upload.","operationId":"trenz-social-upload-presigned-url","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"content_type":{"description":"MIME type, e.g. image/jpeg","type":"string"},"expires_in":{"description":"Expiration time (seconds), default 3600","type":"integer"},"file_name":{"description":"File name (with extension)","type":"string"},"region":{"description":"Storage region: tos or aws, default tos","type":"string"}},"required":["file_name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"cdn_url":{"description":"CDN URL","type":"string"},"object_key":{"description":"S3 object key","type":"string"},"presigned_url":{"description":"Presigned upload URL","type":"string"},"s3_bucket":{"description":"S3 bucket name","type":"string"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Generate Presigned Upload URL","tags":["File Upload"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/videos":{"post":{"description":"List a user's videos with pagination and status filtering.","operationId":"trenz-social-videos-list","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"content_type":{"description":"Content type: video/image","type":"string"},"include_details":{"description":"Whether to include publishing details","type":"boolean"},"include_presigned_urls":{"description":"Whether to include presigned URL","type":"boolean"},"limit":{"description":"Page size","type":"integer"},"page":{"description":"Page number","type":"integer"},"publish_time_after":{"description":"Publish time start (Unix timestamp)","type":"integer"},"publish_time_before":{"description":"Publish time end (Unix timestamp)","type":"integer"},"status":{"description":"Status filter","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"limit":{"type":"integer"},"page":{"type":"integer"},"total_count":{"type":"integer"},"videos":{"items":{"properties":{"aspect_ratio":{"type":"string"},"content_type":{"type":"string"},"cover_url":{"description":"Cover image URL","type":"string"},"created_at":{"type":"integer"},"description":{"type":"string"},"duration":{"type":"number"},"id":{"type":"integer"},"media_items":{"description":"Media item list","items":{"properties":{"bucket_key":{"type":"string"},"bucket_name":{"type":"string"},"order":{"type":"integer"}},"type":"object"},"type":"array"},"publications":{"description":"Publishing details list","items":{"properties":{"error_message":{"type":"string"},"id":{"type":"integer"},"platform":{"type":"string"},"platform_account_id":{"type":"integer"},"platform_url":{"type":"string"},"platform_video_id":{"type":"string"},"published_at":{"type":"integer"},"status":{"type":"string"}},"type":"object"},"type":"array"},"source_type":{"description":"Source type","type":"string"},"status":{"type":"string"},"title":{"type":"string"},"updated_at":{"type":"integer"}},"type":"object"},"type":"array"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Publishing Record List","tags":["Social/3.Video Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/videos/check-info":{"post":{"description":"Validate a video against the rules of each target platform before publishing.","operationId":"trenz-social-video-check-info","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"bucket_name":{"description":"Bucket name (the `s3_bucket` returned by 'Generate Presigned Upload URL' under the 'General' category)","type":"string"},"object_key":{"description":"Object key (the `object_key` returned by 'Generate Presigned Upload URL' under the 'General' category)","type":"string"}},"required":["bucket_name","object_key"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"platform_rules":{"additionalProperties":{"type":"object"},"description":"Per-platform video rule info","type":"object"},"validation_results":{"additionalProperties":{"properties":{"errors":{"items":{"properties":{"field":{"type":"string"},"reason":{"type":"string"}},"type":"object"},"type":"array"},"is_valid":{"type":"boolean"}},"type":"object"},"description":"Per-platform validation result","type":"object"},"video_metadata":{"properties":{"bit_rate":{"description":"Bitrate (bps)","type":"integer"},"codec_name":{"type":"string"},"duration":{"type":"number"},"file_size":{"type":"integer"},"frame_rate":{"type":"number"},"height":{"type":"integer"},"width":{"type":"integer"}},"type":"object"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Validate Video Info","tags":["Social/3.Video Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/videos/detail":{"post":{"description":"Get details for a single video and its publishing records.","operationId":"trenz-social-video-detail","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"include_presigned_url":{"description":"Whether to include presigned URL","type":"boolean"},"video_id":{"description":"Video ID","type":"integer"}},"required":["video_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"presigned_url":{"type":"string"},"publications":{"items":{"properties":{"error_message":{"description":"Error message","type":"string"},"id":{"type":"integer"},"platform":{"description":"Platform","type":"string"},"platform_account_id":{"description":"Platform account ID","type":"integer"},"platform_url":{"type":"string"},"platform_video_id":{"type":"string"},"progress_percentage":{"description":"Progress percentage","type":"integer"},"published_at":{"type":"integer"},"stage":{"description":"Publishing stage","type":"string"},"status":{"type":"string"}},"type":"object"},"type":"array"},"video":{"properties":{"aspect_ratio":{"type":"string"},"content_type":{"type":"string"},"description":{"type":"string"},"duration":{"type":"number"},"file_size":{"type":"integer"},"id":{"type":"integer"},"status":{"type":"string"},"title":{"type":"string"}},"type":"object"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Publishing Record Detail","tags":["Social/3.Video Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/social/videos/platform":{"post":{"description":"List videos published to the platform along with their metrics.","operationId":"trenz-social-platform-videos","parameters":[{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"filter":{"description":"Filters (click to expand for details)","properties":{"published_after":{"description":"Publish time start (Unix timestamp)","type":"integer"},"published_before":{"description":"Publish time end (Unix timestamp)","type":"integer"},"search_keyword":{"description":"Search keyword","type":"string"},"sort_by":{"description":"Sort field","type":"string"},"sort_order":{"description":"Sort direction (asc/desc)","type":"string"}},"type":"object"},"include_presigned_urls":{"description":"Whether to include presigned URL","type":"boolean"},"limit":{"description":"Page size","type":"integer"},"page":{"description":"Page number","type":"integer"},"platform_account_id":{"description":"Platform account ID","type":"integer"}},"required":["platform_account_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"last_synced_at":{"type":"integer"},"limit":{"type":"integer"},"page":{"type":"integer"},"total_count":{"type":"integer"},"videos":{"items":{"properties":{"cover_url":{"type":"string"},"duration":{"description":"Video duration (seconds)","type":"number"},"media_type":{"description":"Media type","type":"string"},"metrics":{"properties":{"comment_count":{"type":"integer"},"like_count":{"type":"integer"},"play_count":{"type":"integer"},"share_count":{"type":"integer"}},"type":"object"},"metrics_updated_at":{"description":"Metric updated at (Unix timestamp)","type":"integer"},"platform":{"type":"string"},"platform_url":{"type":"string"},"platform_video_id":{"type":"string"},"publication_id":{"type":"integer"},"published_at":{"type":"integer"},"video_id":{"type":"integer"},"video_title":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Platform Video Metrics List","tags":["Social/3.Video Management"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.social.read"}},"/open/v1/tasks/{task_id}":{"get":{"description":"Query the status and result of an async task. Failed tasks are auto-refunded, status becomes refunded.","operationId":"task-status","parameters":[{"description":"Async task ID (returned by async endpoints)","in":"path","name":"task_id","required":true,"schema":{"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"status":"completed","task_id":"task_abc123"},"request_id":"req_abc123"},"schema":{"properties":{"data":{"properties":{"error_message":{"description":"Error message (only when refunded)","type":"string"},"result":{"description":"Task result (only when completed)","type":"object"},"status":{"description":"Task status","enum":["pending","running","completed","refunded"],"type":"string"},"task_id":{"description":"Task ID","type":"string"}},"required":["task_id","status"],"type":"object"},"request_id":{"type":"string"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Query async task status","tags":["Async Tasks"],"x-billing-mode":"free","x-coin-cost":0}},"/open/v1/videos/search":{"get":{"description":"Search TikTok shoppable videos with multi-dimensional filters on views, GMV, engagement rate, etc.","operationId":"trenz-videos-search","parameters":[{"description":"Search keyword","example":"phone case","in":"query","name":"keyword","required":false,"schema":{"type":"string"}},{"description":"Video category ID","example":"100001","in":"query","name":"category","required":false,"schema":{"type":"string"}},{"description":"Whether is a commerce video","example":false,"in":"query","name":"is_commercial","required":false,"schema":{"type":"boolean"}},{"description":"Min views","example":1000,"in":"query","name":"min_views","required":false,"schema":{"type":"number"}},{"description":"Max views","example":1000000,"in":"query","name":"max_views","required":false,"schema":{"type":"number"}},{"description":"Min likes","example":100,"in":"query","name":"min_likes","required":false,"schema":{"type":"number"}},{"description":"Max likes","example":100000,"in":"query","name":"max_likes","required":false,"schema":{"type":"number"}},{"description":"30-day min GMV (USD)","example":1000,"in":"query","name":"min_gmv_30d","required":false,"schema":{"type":"number"}},{"description":"30-day max GMV (USD)","example":100000,"in":"query","name":"max_gmv_30d","required":false,"schema":{"type":"number"}},{"description":"Min engagement rate (0-1)","example":0.01,"in":"query","name":"min_engagement","required":false,"schema":{"type":"number"}},{"description":"Max engagement rate (0-1)","example":0.1,"in":"query","name":"max_engagement","required":false,"schema":{"type":"number"}},{"description":"Sort, format: field:asc|desc. Allowed: engagement, gmv_30d, launch_time, likes, sold_30d, views. Default: views:desc","example":"views:desc","in":"query","name":"sort","required":false,"schema":{"default":"views:desc","enum":["engagement","gmv_30d","launch_time","likes","sold_30d","views"],"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"account_type":{"description":"Account type","type":"integer"},"author_category_label":{"description":"Author category label","type":"string"},"author_id":{"description":"Author user ID","type":"string"},"author_nickname":{"description":"Author name","type":"string"},"author_unique_id":{"description":"Author TikTok username","type":"string"},"country_code":{"description":"Country code","type":"string"},"follow_cnt":{"description":"Follower count","type":"integer"},"id":{"description":"Unique identifier","type":"string"},"is_ad":{"description":"Is advertisement","type":"boolean"},"is_aigc_video":{"description":"Is AI-generated video","type":"boolean"},"product_id":{"description":"Product ID","type":"string"},"product_l1_category":{"description":"Product L1 category","type":"string"},"product_l2_category":{"description":"Product L2 category","type":"string"},"product_l3_category":{"description":"Product L3 category","type":"string"},"product_title":{"description":"Product title","type":"string"},"share_url":{"description":"TikTok share URL","type":"string"},"video_30d_gmv":{"description":"30-day video GMV","type":"string"},"video_30d_gpm":{"description":"30-day video GPM","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"video_30d_sold_count":{"description":"30-day video sales","type":"string"},"video_ceiling_price":{"description":"Product max price","type":"string"},"video_collect_count":{"description":"Save count","type":"integer"},"video_comment_count":{"description":"Comment count","type":"integer"},"video_commission_rate":{"description":"Product commission rate","type":"string"},"video_desc":{"description":"Video description","type":"string"},"video_duration":{"description":"Duration (ms)","type":"integer"},"video_engagement_rate":{"description":"Engagement rate (0-1)","type":"number"},"video_floor_price":{"description":"Product min price","type":"string"},"video_launch_time":{"description":"Published at (ms timestamp)","type":"integer"},"video_like_count":{"description":"Like count","type":"integer"},"video_play_count":{"description":"View count","type":"integer"},"video_product_total_gmv":{"description":"Product total GMV","type":"string"},"video_product_total_sold_count":{"description":"Product total sales","type":"string"},"video_share_count":{"description":"Share count","type":"integer"},"video_total_like_count_to_follower_count_ratio":{"description":"Likes to followers ratio","type":"number"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Video Search","tags":["Data/Videos"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.videos.read"}},"/open/v1/videos/{id}":{"get":{"description":"Get TikTok video details with linked products.","operationId":"trenz-videos-detail","parameters":[{"description":"Video ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Include related resources, comma-separated (values: core(Core Metrics))","in":"query","name":"include","required":false,"schema":{"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"account_type":{"description":"Account type","type":"integer"},"author_avg_engagement_rate":{"description":"Avg engagement rate","type":"number"},"country_code":{"description":"Country code","type":"string"},"follower_count":{"description":"Follower count","type":"integer"},"had_product":{"description":"Has linked product","type":"boolean"},"has_comment":{"description":"Has comments","type":"boolean"},"id":{"description":"Unique identifier","type":"string"},"is_ad":{"description":"Is advertisement","type":"boolean"},"is_aigc_video":{"description":"Is AI-generated video","type":"boolean"},"last_update_time":{"description":"Last updated (ms timestamp)","type":"integer"},"nickname":{"description":"Display name","type":"string"},"product_category_label_list":{"description":"Product category labels","type":"string"},"share_url":{"description":"TikTok share URL","type":"string"},"uid":{"description":"User ID","type":"string"},"unique_id":{"description":"TikTok username","type":"string"},"user_avatar":{"description":"User avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"video_avg_like_count":{"description":"Avg video likes","type":"number"},"video_avg_play_count":{"description":"Avg video views","type":"number"},"video_count":{"description":"Video count","type":"integer"},"video_cover":{"description":"Video cover","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"video_desc":{"description":"Video description","type":"string"},"video_duration":{"description":"Duration (ms)","type":"integer"},"video_launch_time":{"description":"Published at (ms timestamp)","type":"integer"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Video Detail","tags":["Data/Videos"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.videos.read"}},"/open/v1/videos/{id}/products":{"get":{"description":"","operationId":"trenz-videos-products","parameters":[{"description":"Video ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_product_detail_ceiling_price":{"description":"Max price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_product_detail_commission_rate":{"description":"Commission rate","type":"number"},"tiktok_product_detail_floor_price":{"description":"Min price","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_product_detail_l1_category":{"description":"Level-1 category","type":"string"},"tiktok_product_detail_l2_category":{"description":"Level-2 category","type":"string"},"tiktok_product_detail_l3_category":{"description":"Level-3 category","type":"string"},"tiktok_product_detail_product_images":{"description":"Product images","items":{"properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"type":"array"},"tiktok_product_detail_product_name":{"description":"Product name","type":"string"},"tiktok_product_detail_product_rating":{"description":"Product rating (0-5)","type":"number"},"tiktok_product_detail_product_sku_props":{"description":"SKU properties","items":{"properties":{"has_image":{"description":"Has image","type":"boolean"},"prop_id":{"description":"Property ID","type":"string"},"prop_name":{"description":"Property name","type":"string"},"sale_prop_values":{"description":"Property values","items":{"properties":{"image":{"properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"prop_value":{"description":"Property value","type":"string"},"prop_value_id":{"description":"Property value ID","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"},"tiktok_product_detail_product_skus":{"description":"SKU list","items":{"properties":{"is_hot":{"description":"Is hot selling","type":"boolean"},"price":{"properties":{"discount":{"description":"Discount info","type":"string"},"original_price":{"description":"Original price","type":"string"},"original_price_value":{"description":"Original price value","type":"string"},"real_price":{"description":"Actual price","type":"number"},"unit_price_desc":{"description":"Unit price description","type":"string"}},"type":"object"},"sale_prop_value_ids":{"description":"Property value ID combination","type":"string"},"sku_id":{"description":"SKU ID","type":"string"},"sku_sale_props":{"description":"SKU properties","items":{"properties":{"prop_id":{"description":"Property ID","type":"string"},"prop_name":{"description":"Property name (e.g. Color)","type":"string"},"prop_value":{"description":"Property value","type":"string"},"prop_value_id":{"description":"Property value ID","type":"string"}},"type":"object"},"type":"array"},"status":{"description":"Status (1=active)","type":"integer"},"stock":{"description":"Stock","type":"integer"}},"type":"object"},"type":"array"},"tiktok_product_detail_product_status":{"description":"Product status","type":"integer"},"tiktok_product_detail_region":{"description":"Region code","type":"string"},"tiktok_video_detail_product_country_code":{"description":"Product country","type":"string"},"tiktok_video_detail_product_id":{"description":"Product ID","type":"string"},"tiktok_video_detail_product_launch_time":{"description":"Product listing time (ms timestamp)","type":"integer"},"tiktok_video_detail_product_total_gmv":{"description":"Product total GMV","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_video_detail_product_total_sold_count":{"description":"Product total sales","type":"integer"},"tiktok_video_detail_video_30d_gmv":{"description":"Video 30D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_video_detail_video_30d_sold_count":{"description":"Video 30D Sold Count","type":"integer"},"tiktok_video_detail_video_id":{"description":"Video ID","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Video Products","tags":["Data/Videos"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.videos.read"}},"/open/v1/videos/{id}/reviews":{"get":{"description":"","operationId":"trenz-videos-reviews","parameters":[{"description":"Video ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_video_detail_comment_create_time":{"description":"Listing time","type":"integer"},"tiktok_video_detail_comment_id":{"description":"Unique identifier","type":"string"},"tiktok_video_detail_comment_like_count":{"description":"Like count","type":"integer"},"tiktok_video_detail_comment_nickname":{"description":"Display name","type":"string"},"tiktok_video_detail_comment_reply_count":{"description":"Reply count","type":"integer"},"tiktok_video_detail_comment_text":{"description":"Text content","type":"string"},"tiktok_video_detail_comment_unique_id":{"description":"TikTok username","type":"string"},"tiktok_video_detail_comment_user_avatar":{"description":"User avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_video_detail_video_id":{"description":"Video ID","type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Video Reviews","tags":["Data/Videos"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.videos.read"}},"/open/v1/videos/{id}/similar":{"get":{"description":"","operationId":"trenz-videos-similar","parameters":[{"description":"Video ID","example":"1234567890","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Page number, default 1","in":"query","name":"page","required":false,"schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Page size, default 20, max 20","in":"query","name":"page_size","required":false,"schema":{"default":20,"maximum":20,"type":"integer"}},{"description":"Routing parameter: routes to different backends by country value","in":"query","name":"country","required":true,"schema":{"enum":["br","de","es","fr","gb","id","it","jp","mx","my","ph","sg","th","us","vn"],"type":"string"}},{"description":"Your API Key","in":"header","name":"X-API-Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{},"request_id":"req_abc123","usage":{"credits_balance":9999,"credits_cost":1}},"schema":{"properties":{"data":{"properties":{"items":{"items":{"properties":{"id":{"description":"Unique identifier","type":"string"},"tiktok_video_detail_similar_author_nickname":{"description":"Author display name","type":"string"},"tiktok_video_detail_similar_author_uid":{"description":"Author user ID","type":"string"},"tiktok_video_detail_similar_author_unique_id":{"description":"Author TikTok username","type":"string"},"tiktok_video_detail_similar_category_label":{"description":"Creator category label","type":"string"},"tiktok_video_detail_similar_country_code":{"description":"Country code","type":"string"},"tiktok_video_detail_similar_follower_cnt":{"description":"Follower count","type":"integer"},"tiktok_video_detail_similar_is_aigc_video":{"description":"Is AI-generated video","type":"boolean"},"tiktok_video_detail_similar_product_id":{"description":"Product ID","type":"string"},"tiktok_video_detail_similar_product_images":{"description":"Product images","type":"string"},"tiktok_video_detail_similar_product_l1_category":{"description":"Product L1 Category","type":"string"},"tiktok_video_detail_similar_product_l2_category":{"description":"Product L2 Category","type":"string"},"tiktok_video_detail_similar_product_l3_category":{"description":"Product L3 Category","type":"string"},"tiktok_video_detail_similar_product_title":{"description":"Product title","type":"string"},"tiktok_video_detail_similar_share_url":{"description":"TikTok share URL","type":"string"},"tiktok_video_detail_similar_user_avatar":{"description":"User avatar","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_video_detail_similar_video_30d_gmv":{"description":"Video 30D Gmv","properties":{"unit":{"description":"Currency code (e.g. US)","type":"string"},"value":{"description":"Amount","type":"number"}},"type":"object"},"tiktok_video_detail_similar_video_comment_count":{"description":"Comment count","type":"integer"},"tiktok_video_detail_similar_video_cover":{"description":"Video cover","properties":{"thumb_url":{"description":"Thumbnail URL","type":"string"},"url":{"description":"Image URL","type":"string"}},"type":"object"},"tiktok_video_detail_similar_video_desc":{"description":"Video description","type":"string"},"tiktok_video_detail_similar_video_duration":{"description":"Duration (ms)","type":"integer"},"tiktok_video_detail_similar_video_id":{"description":"Video ID","type":"string"},"tiktok_video_detail_similar_video_launch_time":{"description":"Published at (ms timestamp)","type":"integer"},"tiktok_video_detail_similar_video_like_count":{"description":"Like count","type":"integer"},"tiktok_video_detail_similar_video_play_count":{"description":"View count","type":"integer"},"tiktok_video_detail_similar_video_share_count":{"description":"Share count","type":"integer"}},"type":"object"},"type":"array"},"total_count":{"description":"Total result count","type":"integer"}},"type":"object"},"request_id":{"type":"string"},"usage":{"$ref":"#/components/schemas/UsageInfo"}},"required":["data","request_id"],"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"example":{"code":"BAD_REQUEST","message":"Invalid request parameters","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"example":{"code":"AUTH_INVALID_KEY","message":"The API key provided is invalid or has been revoked","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Unauthorized"},"402":{"content":{"application/json":{"example":{"code":"INSUFFICIENT_CREDITS","message":"Your account has insufficient credits for this request","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Insufficient credits"},"403":{"content":{"application/json":{"example":{"code":"FORBIDDEN_SCOPE","message":"Your API key does not have permission to access this resource","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"example":{"code":"ROUTE_NOT_FOUND","message":"The requested resource was not found","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Not found"},"429":{"content":{"application/json":{"example":{"code":"RATE_LIMITED","message":"Too many requests, please try again later","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"example":{"code":"INTERNAL_ERROR","message":"An unexpected error occurred on the server","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Internal server error"},"502":{"content":{"application/json":{"example":{"code":"BACKEND_ERROR","message":"The upstream service returned an invalid response","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Bad gateway"},"503":{"content":{"application/json":{"example":{"code":"BACKEND_UNAVAILABLE","message":"The upstream service is temporarily unavailable","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Service unavailable"},"504":{"content":{"application/json":{"example":{"code":"BACKEND_TIMEOUT","message":"The upstream service did not respond in time","request_id":"req_example"},"schema":{"$ref":"#/components/schemas/APIError"}}},"description":"Gateway timeout"}},"summary":"Similar Videos","tags":["Data/Videos"],"x-billing-mode":"per_call","x-coin-cost":1,"x-scope":"trenz.videos.read"}}},"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"servers":[{"description":"Production","url":"https://openapi.gateway.trenz.ai"}],"tags":[{"description":"## Product Category ID Reference\n\nThe `category` parameter in search endpoints takes a numeric category ID. Below is the TikTok Level-1 category list:\n\n| Category ID | Category |\n|-------------|----------|\n| 601450 | Beauty \u0026 Personal Care |\n| 601152 | Womenswear \u0026 Underwear |\n| 700645 | Health |\n| 603014 | Sports \u0026 Outdoor |\n| 601739 | Phones \u0026 Electronics |\n| 600942 | Home Appliances |\n| 824328 | Menswear \u0026 Underwear |\n| 605248 | Fashion Accessories |\n| 700437 | Food \u0026 Beverages |\n| 600001 | Household Products |\n| 604453 | Furniture |\n| 600024 | Kitchenware |\n| 600154 | Home Textiles |\n| 824584 | Luggage \u0026 Bags |\n| 604206 | Toys \u0026 Hobbies |\n| 601352 | Shoes |\n| 604579 | Tools \u0026 Hardware |\n| 604968 | Home Improvement |\n| 602118 | Pet Supplies |\n| 601755 | Computers \u0026 Office |\n| 602284 | Baby \u0026 Maternity |\n| 605196 | Automotive \u0026 Motorcycle |\n| 951432 | Collectibles |\n| 801928 | Books, Magazines \u0026 Audio/Video |\n| 953224 | Jewelry \u0026 Accessories |\n| 856720 | Pre-Owned Goods |\n| 802184 | Kids' Fashion |\n\n\u003e These are Level-1 categories. Passing a Level-1 ID filters all products under that category.","name":"Data/Products"},{"description":"## Parameters\n\n- `seller_type`: Seller type (1=Overseas Non-Brand, 2=Local, 3=Brand, 4=Non-Brand)\n\n## Product Category ID Reference\n\nThe `category` parameter is the seller's primary product category ID; it uses the same taxonomy as product search:\n\n| Category ID | Category |\n|-------------|----------|\n| 601450 | Beauty \u0026 Personal Care |\n| 601152 | Womenswear \u0026 Underwear |\n| 700645 | Health |\n| 603014 | Sports \u0026 Outdoor |\n| 601739 | Phones \u0026 Electronics |\n| 600942 | Home Appliances |\n| 824328 | Menswear \u0026 Underwear |\n| 605248 | Fashion Accessories |\n| 700437 | Food \u0026 Beverages |\n| 600001 | Household Products |\n| 604453 | Furniture |\n| 600024 | Kitchenware |\n| 600154 | Home Textiles |\n| 824584 | Luggage \u0026 Bags |\n| 604206 | Toys \u0026 Hobbies |\n| 601352 | Shoes |\n| 604579 | Tools \u0026 Hardware |\n| 604968 | Home Improvement |\n| 602118 | Pet Supplies |\n| 601755 | Computers \u0026 Office |\n| 602284 | Baby \u0026 Maternity |\n| 605196 | Automotive \u0026 Motorcycle |\n| 951432 | Collectibles |\n| 801928 | Books, Magazines \u0026 Audio/Video |\n| 953224 | Jewelry \u0026 Accessories |\n| 856720 | Pre-Owned Goods |\n| 802184 | Kids' Fashion |\n\n\u003e These are Level-1 categories. Passing a Level-1 ID filters all sellers primarily in that category.","name":"Data/Sellers"},{"description":"## Parameters\n\n- `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.\n- `has_contact`: Whether the creator has public contact info (true/false), filters creators with public email or social handles.\n\n## Creator Category ID Reference\n\n| Category ID | Category |\n|-------------|----------|\n| creator_category_v20240616_8 | Shopping \u0026 Retail |\n| creator_category_v20240616_15 | Media \u0026 Entertainment |\n| creator_category_v20240616_10 | Beauty \u0026 Fashion |\n| creator_category_v20240616_14 | Personal Blog |\n| creator_category_v20240616_12 | Clothing \u0026 Accessories |\n| creator_category_v20240616_32 | Public Figure |\n| creator_category_v20240616_23 | Art \u0026 Crafts |\n| creator_category_v20240616_17 | Sports \u0026 Fitness |\n| creator_category_v20240616_24 | Health \u0026 Wellness |\n| creator_category_v20240616_13 | Music \u0026 Dance |\n| creator_category_v20240616_9 | Home, Furniture \u0026 Appliances |\n| creator_category_v20240616_19 | Pets \u0026 Animals |\n| creator_category_v20240616_18 | Education |\n| creator_category_v20240616_11 | Food \u0026 Drink |\n| creator_category_v20240616_31 | Automotive \u0026 transportation |\n| creator_category_v20240616_5 | Electronics |\n| creator_category_v20240616_29 | Gaming |\n| creator_category_v20240616_30 | Professional Services |\n| creator_category_v20240616_16 | Baby |\n| creator_category_v20240616_33 | Food \u0026 Cooking |\n| creator_category_v20240616_20 | Travel \u0026 Tourism |\n| creator_category_v20240616_27 | Finance \u0026 Investing |\n| creator_category_v20240616_2 | Machinery \u0026 Equipment |\n| creator_category_v20240616_21 | Brand |\n| creator_category_v20240616_25 | Consultant \u0026 Service |\n| creator_category_v20240616_4 | Property |\n| creator_category_v20240616_28 | Government \u0026 Politics |\n| creator_category_v20240616_6 | Restaurants \u0026 Bars |\n| creator_category_v20240616_26 | IT \u0026 High Tech |\n| creator_category_v20240616_22 | Software \u0026 Apps |\n| creator_category_v20240616_3 | LIVE Creator Networks |\n| creator_category_v20240616_7 | Movie, TV \u0026 Studio |\n| creator_category_v20240616_34 | Others |\n\n\u003e Creator and streamer (live) categories share the same taxonomy; this table also applies to the `category` parameter of \"Data/Lives\".","name":"Data/Creators"},{"description":"## Parameters\n\n- `is_commercial`: Whether this is a commerce video (true/false)\n\n## Product Category ID Reference\n\nThe `category` parameter is the video's associated product category ID:\n\n| Category ID | Category |\n|-------------|----------|\n| 601450 | Beauty \u0026 Personal Care |\n| 601152 | Womenswear \u0026 Underwear |\n| 700645 | Health |\n| 603014 | Sports \u0026 Outdoor |\n| 601739 | Phones \u0026 Electronics |\n| 600942 | Home Appliances |\n| 824328 | Menswear \u0026 Underwear |\n| 605248 | Fashion Accessories |\n| 700437 | Food \u0026 Beverages |\n| 600001 | Household Products |\n| 604453 | Furniture |\n| 600024 | Kitchenware |\n| 600154 | Home Textiles |\n| 824584 | Luggage \u0026 Bags |\n| 604206 | Toys \u0026 Hobbies |\n| 601352 | Shoes |\n| 604579 | Tools \u0026 Hardware |\n| 604968 | Home Improvement |\n| 602118 | Pet Supplies |\n| 601755 | Computers \u0026 Office |\n| 602284 | Baby \u0026 Maternity |\n| 605196 | Automotive \u0026 Motorcycle |\n| 951432 | Collectibles |\n| 801928 | Books, Magazines \u0026 Audio/Video |\n| 953224 | Jewelry \u0026 Accessories |\n| 856720 | Pre-Owned Goods |\n| 802184 | Kids' Fashion |\n\n\u003e These are Level-1 categories. Passing a Level-1 ID filters all videos in that category.","name":"Data/Videos"},{"description":"## Parameters\n\n- `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.\n- `is_living`: Whether currently live-streaming (true/false)\n- `is_commercial`: Whether this is a commerce live stream (true/false)\n\n## Streamer Category ID Reference\n\n| Category ID | Category |\n|-------------|----------|\n| creator_category_v20240616_8 | Shopping \u0026 Retail |\n| creator_category_v20240616_15 | Media \u0026 Entertainment |\n| creator_category_v20240616_10 | Beauty \u0026 Fashion |\n| creator_category_v20240616_14 | Personal Blog |\n| creator_category_v20240616_12 | Clothing \u0026 Accessories |\n| creator_category_v20240616_32 | Public Figure |\n| creator_category_v20240616_23 | Art \u0026 Crafts |\n| creator_category_v20240616_17 | Sports \u0026 Fitness |\n| creator_category_v20240616_24 | Health \u0026 Wellness |\n| creator_category_v20240616_13 | Music \u0026 Dance |\n| creator_category_v20240616_9 | Home, Furniture \u0026 Appliances |\n| creator_category_v20240616_19 | Pets \u0026 Animals |\n| creator_category_v20240616_18 | Education |\n| creator_category_v20240616_11 | Food \u0026 Drink |\n| creator_category_v20240616_31 | Automotive \u0026 transportation |\n| creator_category_v20240616_5 | Electronics |\n| creator_category_v20240616_29 | Gaming |\n| creator_category_v20240616_30 | Professional Services |\n| creator_category_v20240616_16 | Baby |\n| creator_category_v20240616_33 | Food \u0026 Cooking |\n| creator_category_v20240616_20 | Travel \u0026 Tourism |\n| creator_category_v20240616_27 | Finance \u0026 Investing |\n| creator_category_v20240616_2 | Machinery \u0026 Equipment |\n| creator_category_v20240616_21 | Brand |\n| creator_category_v20240616_25 | Consultant \u0026 Service |\n| creator_category_v20240616_4 | Property |\n| creator_category_v20240616_28 | Government \u0026 Politics |\n| creator_category_v20240616_6 | Restaurants \u0026 Bars |\n| creator_category_v20240616_26 | IT \u0026 High Tech |\n| creator_category_v20240616_22 | Software \u0026 Apps |\n| creator_category_v20240616_3 | LIVE Creator Networks |\n| creator_category_v20240616_7 | Movie, TV \u0026 Studio |\n| creator_category_v20240616_34 | Others |\n\n\u003e `category` (streamer category) and `product_category` (commerce product category) are two different taxonomies — do not mix them up.\n\n## Product Category ID Reference\n\nThe `product_category` parameter is the product category ID for commerce lives:\n\n| Category ID | Category |\n|-------------|----------|\n| 601450 | Beauty \u0026 Personal Care |\n| 601152 | Womenswear \u0026 Underwear |\n| 700645 | Health |\n| 603014 | Sports \u0026 Outdoor |\n| 601739 | Phones \u0026 Electronics |\n| 600942 | Home Appliances |\n| 824328 | Menswear \u0026 Underwear |\n| 605248 | Fashion Accessories |\n| 700437 | Food \u0026 Beverages |\n| 600001 | Household Products |\n| 604453 | Furniture |\n| 600024 | Kitchenware |\n| 600154 | Home Textiles |\n| 824584 | Luggage \u0026 Bags |\n| 604206 | Toys \u0026 Hobbies |\n| 601352 | Shoes |\n| 604579 | Tools \u0026 Hardware |\n| 604968 | Home Improvement |\n| 602118 | Pet Supplies |\n| 601755 | Computers \u0026 Office |\n| 602284 | Baby \u0026 Maternity |\n| 605196 | Automotive \u0026 Motorcycle |\n| 951432 | Collectibles |\n| 801928 | Books, Magazines \u0026 Audio/Video |\n| 953224 | Jewelry \u0026 Accessories |\n| 856720 | Pre-Owned Goods |\n| 802184 | Kids' Fashion |\n\n\u003e These are Level-1 categories. Passing a Level-1 ID filters all lives in that category.","name":"Data/Lives"},{"description":"## Parameters\n\n### Ad Type Reference\n\nAllowed values for `ad_type`:\n\n| Value | Ad Type |\n|-------|---------|\n| 1 | TikTok Shop Ads |\n| 2 | Independent Site Ads |\n| 3 | App Ads |\n| 4 | Game Ads |\n| 5 | Brand Ads |\n| 6 | Lead Ads |\n| 7 | Engagement Ads |\n\n## Product Category ID Reference\n\nThe `category` parameter is the ad's associated product category ID:\n\n| Category ID | Category |\n|-------------|----------|\n| 601450 | Beauty \u0026 Personal Care |\n| 601152 | Womenswear \u0026 Underwear |\n| 700645 | Health |\n| 603014 | Sports \u0026 Outdoor |\n| 601739 | Phones \u0026 Electronics |\n| 600942 | Home Appliances |\n| 824328 | Menswear \u0026 Underwear |\n| 605248 | Fashion Accessories |\n| 700437 | Food \u0026 Beverages |\n| 600001 | Household Products |\n| 604453 | Furniture |\n| 600024 | Kitchenware |\n| 600154 | Home Textiles |\n| 824584 | Luggage \u0026 Bags |\n| 604206 | Toys \u0026 Hobbies |\n| 601352 | Shoes |\n| 604579 | Tools \u0026 Hardware |\n| 604968 | Home Improvement |\n| 602118 | Pet Supplies |\n| 601755 | Computers \u0026 Office |\n| 602284 | Baby \u0026 Maternity |\n| 605196 | Automotive \u0026 Motorcycle |\n| 951432 | Collectibles |\n| 801928 | Books, Magazines \u0026 Audio/Video |\n| 953224 | Jewelry \u0026 Accessories |\n| 856720 | Pre-Owned Goods |\n| 802184 | Kids' Fashion |\n\n\u003e These are Level-1 categories. Passing a Level-1 ID filters all ads in that category.","name":"Data/Ads"},{"description":"## Parameters\n\n- `country`: Country code. Allowed values: us, th, my, vn, mx, de, fr, it, es, jp, br, gb, ph, sg, id\n\n## Product Category ID Reference\n\nThe `category` parameter is the creative's associated product category ID:\n\n| Category ID | Category |\n|-------------|----------|\n| 601450 | Beauty \u0026 Personal Care |\n| 601152 | Womenswear \u0026 Underwear |\n| 700645 | Health |\n| 603014 | Sports \u0026 Outdoor |\n| 601739 | Phones \u0026 Electronics |\n| 600942 | Home Appliances |\n| 824328 | Menswear \u0026 Underwear |\n| 605248 | Fashion Accessories |\n| 700437 | Food \u0026 Beverages |\n| 600001 | Household Products |\n| 604453 | Furniture |\n| 600024 | Kitchenware |\n| 600154 | Home Textiles |\n| 824584 | Luggage \u0026 Bags |\n| 604206 | Toys \u0026 Hobbies |\n| 601352 | Shoes |\n| 604579 | Tools \u0026 Hardware |\n| 604968 | Home Improvement |\n| 602118 | Pet Supplies |\n| 601755 | Computers \u0026 Office |\n| 602284 | Baby \u0026 Maternity |\n| 605196 | Automotive \u0026 Motorcycle |\n| 951432 | Collectibles |\n| 801928 | Books, Magazines \u0026 Audio/Video |\n| 953224 | Jewelry \u0026 Accessories |\n| 856720 | Pre-Owned Goods |\n| 802184 | Kids' Fashion |\n\n\u003e These are Level-1 categories. Passing a Level-1 ID filters all creatives in that category.","name":"Data/Creatives"},{"description":"Query account status, tier and credits balance.","name":"Account"},{"name":"Ads/Accounts"},{"name":"Ads/Campaigns"},{"name":"Ads/Landing Pages"},{"name":"Ads/Leads \u0026 Reports"},{"description":"## Async Task Workflow\n\n1. Submit the task (e.g. POST /open/v1/ai/videos/content-analysis) → returns `task_id`\n2. Poll status: GET /open/v1/tasks/{task_id}\n   - status=\"running\" → keep polling (recommended interval 3-5 sec)\n   - status=\"success\" → the `result` field contains the full result\n   - status=\"failed\" → the `error_message` field contains the error details\n3. Successful task results are persisted and can be retrieved again at any time\n\n\u003e All AI analysis and AI generation endpoints are async.\n\u003e They return `task_id` immediately without blocking.","name":"Async Tasks"},{"name":"Content/AI Analysis"},{"name":"Content/AI Copywriting"},{"description":"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'.","name":"Content/AI Image"},{"description":"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'.","name":"Content/AI Video"},{"name":"Content/Material Search"},{"name":"File Upload"},{"description":"You must bind at least one social account before using any social media feature. TikTok QR-code login is currently supported.\n\nOnce bound, call 'Social Account List' to view all connected accounts with their status and metrics.","name":"Social/1.Account Management"},{"description":"One-step publishing via 'Upload and Publish Video', with support for immediate and scheduled publishing across multiple accounts.\n\n## Prerequisite: Bind a Social Account\n\nYou 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.\n\nOnce bound, retrieve the `id` field from 'Social Account List' — this is the `platform_account_id` required by the publishing endpoint below.\n\n---\n\n## Step 1: Upload File\n\n### 1.1 Call 'Generate Presigned Upload URL' to get a temporary upload URL (this endpoint is under 'File Upload')\n\n```bash\ncurl -X POST \"https://openapi.gateway.trenz.com/open/v1/social/upload/presigned-url\" \\\n  -H \"X-API-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"file_name\": \"my_video.mp4\"}'\n```\n\nResponse example:\n```json\n{\n  \"data\": {\n    \"presigned_url\": \"https://data-datanebula-object.tos-ap-southeast-1.volces.com/upload/my_video.mp4_xxx?...\",\n    \"object_key\": \"upload/my_video.mp4_xxx\",\n    \"s3_bucket\": \"data-datanebula-object\",\n    \"cdn_url\": \"https://oss-data.trenz.ai/upload%2Fmy_video.mp4_xxx?...\"\n  }\n}\n```\n\n\u003e Record the returned `object_key` and `s3_bucket` — they are needed in the following steps.\n\n### 1.2 Upload the file to presigned_url via PUT\n\n```bash\ncurl -X PUT \"{presigned_url}\" \\\n  -H \"Content-Type: video/mp4\" \\\n  --data-binary @my_video.mp4\n```\n\n\u003e 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).\n\n---\n\n## Step 2: Validate Video Info (Recommended)\n\nAfter upload, call 'Validate Video Info' to check that the video matches the target platform's spec (resolution, duration, bitrate, etc.) and avoid publishing failures:\n\n```bash\ncurl -X POST \"https://openapi.gateway.trenz.com/open/v1/social/videos/check-info\" \\\n  -H \"X-API-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"bucket_name\": \"data-datanebula-object\", \"bucket_key\": \"upload/my_video.mp4_xxx\"}'\n```\n\n\u003e This endpoint checks encoding, resolution, duration, etc. against the requirements of TikTok, YouTube, Instagram and other platforms.\n\n---\n\n## Step 3: Call 'Upload and Publish Video'\n\n```bash\ncurl -X POST \"https://openapi.gateway.trenz.com/open/v1/social/publish/upload-and-publish\" \\\n  -H \"X-API-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"video_title\": \"My Video\",\n    \"video_description\": \"Check this out!\",\n    \"bucket_name\": \"data-datanebula-object\",\n    \"bucket_key\": \"upload/my_video.mp4_xxx\",\n    \"publications\": [\n      {\n        \"platform_account_id\": 4687,\n        \"title\": \"Check out this video!\",\n        \"platform_config\": \"{\\\"privacy\\\":\\\"PUBLIC_TO_EVERYONE\\\"}\"\n      }\n    ]\n  }'\n```\n\n\u003e `bucket_name` = the `s3_bucket` returned in Step 1, `bucket_key` = the `object_key` returned in Step 1.\n\u003e Supports publishing to multiple accounts in parallel via the `publications` array. The returned `session_token` is used to poll publishing progress.\n\n### Scheduled Publishing\n\nSet `scheduled_at` (Unix seconds) in each `publications` entry to schedule publishing. Each account can have its own schedule:\n\n```json\n{\n  \"video_title\": \"My Video\",\n  \"bucket_name\": \"data-datanebula-object\",\n  \"bucket_key\": \"upload/my_video.mp4_xxx\",\n  \"publications\": [\n    {\n      \"platform_account_id\": 4687,\n      \"title\": \"Publish now\",\n      \"platform_config\": \"{\\\"privacy\\\":\\\"PUBLIC_TO_EVERYONE\\\"}\"\n    },\n    {\n      \"platform_account_id\": 5678,\n      \"title\": \"Publish tomorrow\",\n      \"scheduled_at\": 1774100400,\n      \"platform_config\": \"{\\\"share_to_feed\\\":true}\"\n    }\n  ]\n}\n```\n\n\u003e `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.\n\u003e Scheduled publications can be rescheduled via the 'Reschedule' endpoint.\n\n---\n\n## Step 4: Poll 'Publish Session Status'\n\n```bash\ncurl -X POST \"https://openapi.gateway.trenz.com/open/v1/social/publish/session\" \\\n  -H \"X-API-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"session_token\": \"127169e7-35e3-40...\"}'\n```\n\n\u003e Recommended poll interval: 3–5 seconds. Repeat until status is completed or failed.\n\n### Cancel Publishing (Optional)\n\n- 'Cancel Publish Session' cancels an in-progress session: `POST /open/v1/social/publish/session/cancel`\n- 'Cancel Individual Publish' cancels a submitted publication: `POST /open/v1/social/publish/cancel`","name":"Social/2.Video Publishing"},{"name":"Social/3.Video Management"},{"name":"Social/4.Comment Management"},{"name":"Social/5.Analytics"},{"name":"Social/6.Creation Tools"},{"name":"Social/7.TikTok Shop"},{"description":"AI conversational agent endpoint (streaming Server-Sent Events response).","name":"Trenz Agent/Chat"},{"description":"Read-only sessions \u0026 reports: list sessions, get session messages, get session reports, get a single report. Free endpoints.","name":"Trenz Agent/Sessions \u0026 Reports"}],"x-tagGroups":[{"name":"Data","tags":["Data/Products","Data/Sellers","Data/Creators","Data/Videos","Data/Lives","Data/Ads","Data/Creatives"]},{"name":"Content","tags":["Content/AI Analysis","Content/AI Copywriting","Content/AI Image","Content/AI Video","Content/Material Search"]},{"name":"Social","tags":["Social/1.Account Management","Social/2.Video Publishing","Social/3.Video Management","Social/4.Comment Management","Social/5.Analytics","Social/6.Creation Tools","Social/7.TikTok Shop"]},{"name":"Ads","tags":["Ads/Accounts","Ads/Campaigns","Ads/Landing Pages","Ads/Leads \u0026 Reports"]},{"name":"Trenz Agent","tags":["Trenz Agent/Chat","Trenz Agent/Sessions \u0026 Reports"]},{"name":"General","tags":["Account","Async Tasks","File Upload"]}]}