client.media.matchTextStyle with ugcinc 5.1.0. Restricted
API keys need content:analyze. The image URL must be publicly downloadable.
Coordinates refer to the displayed image in pixels, after EXIF orientation.
Match a TikTok caption
tiktok-classic-ios-47 profile: white letters with a dark outline,
including supported emoji. It can fit captions over photographs. Other colors,
unoutlined text, ambiguous backgrounds, or unsupported scripts can return
unavailable. This is a bounded profile matcher, not a universal font identifier.
Inputs
image-editor fits the existing image-editor text settings on a plain,
approximately uniform background. It returns up to three candidates containing
an element and previewConfig. auto tries that path for ASCII and falls back
to native fitting when it is unavailable; Unicode text goes directly to native.
Interpret the result
Native results useversion: 2, surface: 'native-text-sticker', and an empty
candidates array. A fitted result contains nativeResult:
stickerUrl: clean native RGBA PNG, without pixels copied from the reference.settings: native points and renderer profile; the native output uses three pixels per point.composition: top-leftx,y, displayedwidth,height, andscale. Scale applies to the PNG’s intrinsic pixel dimensions. Place the whole PNG at these coordinates; do not trim its transparent margins without adjusting them.maskIoU: white letter-fill overlap, separately from outline overlap indiagnostics.outlineIoU.foregroundMae: residual against an estimated background composite.quality:closeorapproximate;fontIdentityremainsunverified.
version: 1 and surface: 'image-editor-element'.
Both paths include renders, fitAttempted, reasonCode, and nextActions.
renders: 0 means a preprocessing or support check rejected the input before
any candidate was fitted. Follow the suggested action rather than repeatedly
resubmitting smaller crops that clip the caption.
HTTP and agent tools
Send the same input JSON toPOST /media/analysis/match-text-style at
https://api.ugc.inc. Poll POST /media/analysis/status with { "jobId": "…" }
until completed or failed. Responses use the standard { code, data }
envelope. Use your API key as a bearer token and provide your organization in the
orgId query parameter. The agent tools are match_text_style and
get_media_analysis; the matching tool accepts the same input fields.