live-mode.md 2.9 KB

# Live Mode

Endpoint

https://server.fmode.cn/api/voc-e-commerce

Business path pattern:

/api/voc-e-commerce/{upstreamPath}

Current creator upstream paths:

xiaohongshu-pgy/api/solar/cooperator/blogger/v2/v1
douyin-xingtu/gw/api/gsearch/search_for_author_square/v1

Auth

Use Parse sessionToken:

Authorization: Bearer <Parse sessionToken>

Optional query:

  • keyword
  • page
  • searchType
  • fansNumberLower / fansNumberUpper for Xiaohongshu
  • followerRange for Douyin
  • company
  • isRefresh

Live Acceptance

Use the package command when a safe test token and company are available:

$env:TIHAO_SESSION_TOKEN="<Parse sessionToken>"
$env:TIHAO_COMPANY="<Company objectId>"
npm run live:acceptance

The script runs keywordLimit=1 and pagesPerKeyword=1, writes output to a temporary directory, verifies that at least one candidate and one client-ready shortlist item were produced, and checks that the token is not present in the returned result or generated files.

Reference Video Live Gate

When the brief includes a reference Xiaohongshu video, use the company VOC social proxy before Doubao analysis:

https://server.fmode.cn/api/voc-social/xiaohongshu/app_v2/get_video_note_detail

Auth:

Authorization: Bearer <Parse sessionToken>

The detail response should provide at least one usable resource:

  • videoUrl or playable .mp4 stream;
  • cover or first-frame URL;
  • title/body text;
  • author/account info;
  • subtitle or transcript URL when available.

Run the A/B gate only with explicit test credentials because it consumes real quota:

$env:TIHAO_SESSION_TOKEN="<Parse sessionToken>"
$env:TIHAO_COMPANY="<Company objectId>"
$env:VOC_SOCIAL_TOKEN="<Parse sessionToken>"
$env:VIDEO_ANALYSIS_BASE_URL="https://api.fmode.cn"
$env:VIDEO_ANALYSIS_MODEL="doubao-seed-2-0-pro"
$env:VIDEO_ANALYSIS_TOKEN="<runtime model token>"
npm run acceptance:video-ab

The gate runs the same brief twice:

  • A: live sourcing without VOC social video detail.
  • B: live sourcing with VOC social video detail and Doubao video analysis.

Pass criteria:

  • B has referenceResources > 0.
  • B evidence provider status is ok.
  • B has at least one evidence card or reference fingerprint from real video resources.
  • B top-10 candidates have more evidence-backed hit points, or higher average score/reference-style score, than A.
  • No Parse token, model token, or Authorization header appears in output files.

Billing

The service maps to APIG path:

/apig/voc-e-commerce

APIG objectId:

objectId: G0vmsUI44d

The business service should handle:

  • successful upstream request: count - 1, used + 1
  • cache hit: count - 1, used + 1
  • not opened / insufficient balance: 403
  • auth failure: 401

The skill must hide raw 401/403/upstream bodies from business users and return friendly states with a payment link.