您的浏览器不支持JavaScript,请启用JavaScript以获得最佳体验。
LINGTU AI OpenAPI v1.2.0

LINGTU AI OpenAPI

Connect LINGTU AI capabilities for creators, products, file uploads, content publishing, AI media generation, and public content data through stable APIs.

Last updated 2026-08-11

Publishing flow

https://api.ailingtu.com

01

Find a creator

id + creatorId
02

Select a product

SHOP / SHOWCASE
03

Upload media

presign → PUT → confirm
04

Create a post

VIDEO / PHOTO
Authentication
x-api-key: <YOUR_API_KEY>

Keep API keys on your server. Never expose them in browser code or logs.

Success condition
HTTP 2xx && response.code === 0

Treat non-2xx responses, invalid JSON, or a non-zero business code as failures.

Machine-readable API descriptions

Use the OpenAPI description as the source for agents, SDK generation, and contract validation.

Commerce publishing

Commerce publishing

Resolve creators and products before creating TikTok Shop publishing tasks.

GET/v1/creatorAccount/pageListAvailable

operationId: listCreatorAccounts

List authorized creators

List authorized TikTok Shop creators, regions, and posting permissions. Use id for product queries and creatorId when creating a post.

Query parameters

FieldTypeRequiredDescription
pageSizeintegerYesItems per page, up to 200
pageNumberintegerYesPage number, starting at 1
validbooleanNoReturn valid authorizations only; defaults to true
authSourcestringNoUse TIKTOK_SHOP_CREATOR for commerce posts
usernamesstring[]NoRepeat the query parameter for multiple usernames
selectionRegionstringNoTarget region, such as US
hasPhotoPermissionbooleanNoReturn accounts with shoppable photo permission only
Photo posts require PHOTO_SHOPPABLE_PERMISSION_PRODUCT in permissions.
Success response
{
  "code": 0,
  "data": {
    "list": [
      {
        "id": 12345,
        "creatorId": "2077242233106595840",
        "username": "shop_creator",
        "authSource": "TIKTOK_SHOP_CREATOR",
        "oauthRegion": "USA",
        "registerRegion": "US",
        "selectionRegion": "US",
        "targetMarket": "US",
        "valid": true,
        "tagNames": [
          "top-tier"
        ],
        "permissions": [
          "VIDEO_SHOPPABLE_PERMISSION",
          "PHOTO_SHOPPABLE_PERMISSION_PRODUCT"
        ]
      }
    ],
    "total": 1,
    "pageNumber": 1,
    "pageSize": 200,
    "totalPages": 1
  },
  "message": "success"
}
GET/v1/creator/tiktokshop/product/listByShowcaseAvailable

operationId: listTikTokShowcaseProducts

List showcase products

List products in a creator showcase. Use SHOWCASE as the product source when creating a post.

Query parameters

FieldTypeRequiredDescription
idintegerYesCreator account id
originTIKTOKYesAlways TIKTOK
pageSizeintegerYesItems per page
pageTokenstringNoPagination token from the previous response
This endpoint does not accept titleKeyword. Filter by title on the client when needed.
Success response
{
  "code": 0,
  "data": {
    "products": [
      {
        "id": "1732280564607717841",
        "title": "Summer Vibes Cord",
        "price": {
          "amount": "19.99",
          "currency": "USD"
        },
        "images": [
          {
            "url": "https://cdn.example.com/product.jpg",
            "width": 800,
            "height": 800
          }
        ]
      }
    ],
    "nextPageToken": "",
    "totalCount": 1
  },
  "message": "success"
}
POST/v1/creator/tiktokshop/product/addToShowcaseAvailable

operationId: addTikTokShowcaseProducts

Creator TTS - Add showcase products

Add TikTok Shop products to an authorized creator showcase by product IDs or a product link.

Request fields

FieldTypeRequiredDescription
idintegerYesCreator account id
addTypePRODUCT_ID | PRODUCT_LINKYesHow products are identified
productIdsstring[]ConditionalRequired for PRODUCT_ID; 1–20 product IDs
productLinkstring(uri)ConditionalRequired for PRODUCT_LINK
Required scopes: creator.showcase.write and creator.video.write.
A request can contain at most 20 product IDs.
Check data.errors even when code is 0; entries identify products that failed.
An expired creator authorization returns the business error “授权过期,请重新授权”.
Request body
{
  "id": 12345,
  "addType": "PRODUCT_ID",
  "productIds": [
    "1732280564607717841",
    "1732280564607717842"
  ]
}
Success response
{
  "code": 0,
  "data": {
    "errors": [
      {
        "code": 16001001,
        "message": "Product is unavailable for this creator",
        "detail": {
          "productId": "1732280564607717842"
        }
      }
    ]
  },
  "message": "success",
  "timestamp": 1786406400000
}

File upload

File upload

Request a presigned URL, upload media directly to object storage, then confirm new files.

POST/v1/file/presignAvailable

operationId: createFileUpload

Create a presigned upload

Submit file metadata and the compatible hash to receive a fileId and object-storage URL. Skip upload and confirmation when isNew is false.

Request fields

FieldTypeRequiredDescription
fileNamestringYesFile name including extension
contentTypestringYesFile MIME type
sizeintegerYesFile size in bytes
hashstringYesSHA-256 of the UTF-8 encoded lowercase hex representation of the file bytes
When isNew is true, PUT the raw file to uploadUrl with the same Content-Type, then call confirm.
Do not send x-api-key to the object-storage PUT URL.
Request body
{
  "fileName": "video.mp4",
  "contentType": "video/mp4",
  "size": 12345678,
  "hash": "3786a02b..."
}
Success response
{
  "code": 0,
  "data": {
    "fileId": 591,
    "uploadUrl": "https://object-storage.example.com/presigned-url",
    "url": "https://cdn.ailingtu.com/media/video.mp4",
    "isNew": true,
    "expiresAt": "2026-07-29T12:00:00Z"
  },
  "message": "success"
}
POST/v1/file/confirmAvailable

operationId: confirmFileUpload

Confirm an uploaded file

Call only after a new file is successfully PUT to its presigned URL. Deduplicated files do not require confirmation.

Request fields

FieldTypeRequiredDescription
fileIdinteger | stringYesFile ID returned by the presign endpoint
Request body
{
  "fileId": 591
}
Success response
{
  "code": 0,
  "data": {
    "fileId": 591,
    "confirmed": true
  },
  "message": "success"
}
POST/v1/creator/post/createAvailable

operationId: createCreatorPost

Create a publishing task

Create a TikTok Shop commerce video or photo publishing task. A successful response means the task was accepted; verify the final result in publishing records.

Request fields

FieldTypeRequiredDescription
businessIdstringYesVideo fileId; first image fileId for photo posts
businessTypeFILEYesUse FILE for uploaded media
creatorIdstringYescreatorId returned by the creator endpoint
titlestringYesPost caption, up to 4,000 characters
platformTIKTOK_SHOPYesUse TIKTOK_SHOP for commerce posts
mediaTypeVIDEO | PHOTOYesExplicitly select video or photo
scheduledAtintegerNoUnix epoch in milliseconds
scheduledTzstringNoIANA timezone
oauthRegionstringNoCreator OAuth authorization region
coverFileIdinteger | stringNoCustom video cover file ID; pass together with tiktokShop.coverUri and omit for photo posts
tiktokShopobjectConditionalRequired for VIDEO; contains product, cover, pre-check, music, and AI label options
tiktokShop.preCheckbooleanNoWhether to submit a pre-check before publishing; defaults to false
tiktokShop.isAiGeneratedbooleanNoWhether to label the video as AI-generated; TikTok adds an AI-generated label when true
tiktokShop.coverUristringNoURI returned by the cover upload endpoint; pass coverFileId with it
tiktokShop.coverTimestampMsintegerNoVideo timestamp in milliseconds to use as the cover frame; omit when coverUri is present
tiktokShop.musicInfoobjectNoVideo background music; omit when no music is needed
tiktokShop.musicInfo.idstringConditionalMusic ID, required when musicInfo is provided
tiktokShop.productInfo.productIdstringConditionalRequired for VIDEO; product ID returned by the product endpoint
tiktokShop.productInfo.titlestringConditionalRequired for VIDEO; product anchor title, up to 30 characters
tiktokShop.productInfo.sourceSHOP | SHOWCASEConditionalRequired for VIDEO; SHOP for shop products or SHOWCASE for showcase products
tiktokShopPhotoobjectConditionalRequired for PHOTO
tiktokShopPhoto.postTypeMULTI_PHOTO_ONE_ANCHORConditionalUse MULTI_PHOTO_ONE_ANCHOR for PHOTO
tiktokShopPhoto.businessIdsstring[]ConditionalRequired for PHOTO; 1–15 image fileIds in final display order
tiktokShopPhoto.productLinks[0].productIdstringConditionalRequired for PHOTO; product ID for the single product anchor
tiktokShopPhoto.productLinks[0].titlestringConditionalRequired for PHOTO; product anchor title, up to 30 characters
tiktokShopPhoto.productLinks[0].sourceSHOP | SHOWCASEConditionalRequired for PHOTO; product source
tiktokShopPhoto.musicInfoobjectNoPhoto post background music; omit when no music is needed
tiktokShopPhoto.musicInfo.idstringConditionalMusic ID, required when musicInfo is provided
For a video cover, use tiktokShop.coverTimestampMs for a frame or pass coverFileId together with tiktokShop.coverUri for a custom cover; do not mix the two methods.
Photo posts support 1–15 images and one product; businessId must equal businessIds[0], and the first image is the cover.
Persist postId and status, then verify the final state in publishing records.
Success response
{
  "code": 0,
  "data": {
    "id": 100,
    "postId": "post_xxx",
    "platform": "TIKTOK_SHOP",
    "title": "Summer Sale 2026 #summer",
    "videoUrl": "https://cdn.ailingtu.com/media/video.mp4",
    "status": "SCHEDULED"
  },
  "message": "success"
}
Commerce video
{
  "businessId": "591",
  "businessType": "FILE",
  "creatorId": "2077242233106595840",
  "title": "Summer Sale 2026 #summer",
  "platform": "TIKTOK_SHOP",
  "mediaType": "VIDEO",
  "scheduledAt": 1784896665989,
  "scheduledTz": "America/New_York",
  "oauthRegion": "USA",
  "tiktokShop": {
    "preCheck": false,
    "isAiGenerated": true,
    "coverTimestampMs": 1500,
    "musicInfo": {
      "id": "7567668059796720391",
      "title": "original sound",
      "author": "Ivan",
      "duration": "15"
    },
    "productInfo": {
      "productId": "1732280564607717841",
      "title": "Summer Vibes Cord",
      "source": "SHOP"
    }
  }
}
Commerce photo post
{
  "businessId": "591",
  "businessType": "FILE",
  "creatorId": "2077242233106595840",
  "title": "Summer Sale 2026 #summer",
  "platform": "TIKTOK_SHOP",
  "mediaType": "PHOTO",
  "scheduledAt": 1784896665989,
  "scheduledTz": "America/New_York",
  "oauthRegion": "USA",
  "tiktokShopPhoto": {
    "postType": "MULTI_PHOTO_ONE_ANCHOR",
    "businessIds": [
      "591",
      "592"
    ],
    "productLinks": [
      {
        "productId": "1732280564607717841",
        "title": "Summer Vibes Cord",
        "source": "SHOP"
      }
    ],
    "musicInfo": {
      "id": "7567668059796720391",
      "title": "original sound",
      "author": "Ivan",
      "duration": "15"
    }
  }
}

AI content generation

AI content generation

Create scheduled image or video generation tasks, then query the same schedule until generated assets are ready.

POST/v1/ai/schedule/createAvailable

operationId: createAiGenerationSchedule

Create an AI image or video schedule

Create scheduled AI image or video generation tasks with prompts, references, model options, dimensions, and output count. Use the returned scheduleId to query status and assets.

Request fields

FieldTypeRequiredDescription
taskIdstringNoCaller-generated task identifier; an 8-character lowercase alphanumeric value is recommended
typeIMAGE_GENERATION | VIDEO_GENERATIONYesMedia generation type
params.promptstringYesImage or video generation prompt
params.modelgpt-image-2 | nano-banana-2 | nano-banana-2-2k | nano-banana-2-4k | seedream5.0-lite | gemini-omni-video | veo3.1-lite-extend | veo3.1-extend | grok-imagine-1.5 | seedance2.0-mini | seedance2.0 | seedance2.0-fastYesSelect one of the image or video models listed below, matching type
params.aspectRatiostringConditionalRequired for images, for example 1:1 or 9:16
params.secondsintegerConditionalVideo duration; allowed values depend on the model
params.sizestringConditionalVideo dimensions, for example 720x1280
params.inputReferencestring(uri)NoOne remote reference image URL, primarily for video generation
params.inputReferencesstring(uri)[]NoOrdered remote reference image URLs; data URLs are not supported
params.watermarkbooleanNoWhether to add a video watermark; defaults to false
numsintegerYesNumber of outputs; use 1 unless multiple results are needed
businessIdstringNoOptional related business object ID
businessTypeMERCHANT_SKU | AI_PURCHASE_TASKNoRelated business object type
promptIdstringNoSaved prompt ID
execAtstring(date-time)NoISO 8601 execution time; omit to create immediately
namestringNoDisplay name for the generation schedule
Image models: gpt-image-2, nano-banana-2, nano-banana-2-2k, nano-banana-2-4k, seedream5.0-lite.
Video models: gemini-omni-video, veo3.1-lite-extend, veo3.1-extend, grok-imagine-1.5, seedance2.0-mini, seedance2.0, seedance2.0-fast.
Video durations: gemini-omni-video supports 6/8/10s; veo3.1-lite-extend and veo3.1-extend are fixed at 8s; grok-imagine-1.5 supports 6/10/15/20/25/30s; seedance2.0-mini, seedance2.0, and seedance2.0-fast support 4/8/10/12/15s.
For images, use IMAGE_GENERATION with params.aspectRatio. For videos, use VIDEO_GENERATION with params.seconds and params.size.
References must be accessible http/https URLs. Upload local files before passing their URLs.
scheduleId and taskId are different. Query the same scheduleId after creation and do not recreate a task only because polling was interrupted.
Success response
{
  "code": 0,
  "data": {
    "scheduleId": "schedule_01k1example",
    "taskIds": [
      "task_01k1example"
    ]
  },
  "message": "success"
}
Image generation
{
  "taskId": "img8a1b2",
  "type": "IMAGE_GENERATION",
  "params": {
    "prompt": "A clean product hero image on a bright studio background",
    "model": "gpt-image-2",
    "aspectRatio": "1:1",
    "inputReferences": [
      "https://static.ailingtu.com/ai-images/product-reference.jpg"
    ]
  },
  "nums": 1,
  "name": "Product hero image"
}
Video generation
{
  "taskId": "vid8c3d4",
  "type": "VIDEO_GENERATION",
  "params": {
    "prompt": "A clean 10-second product reveal video with a slow camera push-in",
    "model": "gemini-omni-video",
    "seconds": 10,
    "size": "720x1280",
    "inputReferences": [
      "https://static.ailingtu.com/ai-images/product-reference.jpg"
    ],
    "watermark": false
  },
  "nums": 1,
  "name": "Product reveal video"
}
GET/v1/ai/task/listByScheduleIdAvailable

operationId: listAiTasksByScheduleId

List AI generation tasks

List image or video generation tasks using the scheduleId returned at creation. Poll about every five seconds until tasks complete or explicitly fail.

Query parameters

FieldTypeRequiredDescription
scheduleIdstringYesscheduleId returned when the generation schedule was created
Waiting states include WAITING_SUBMIT, SUBMITTING, PENDING, and PROCESSING. COMPLETED is successful.
Retry only after an explicit failure, cancellation, or expiration. A network or polling-process error does not mean generation failed.
For videos, prefer customResult.videoUrl or result.url. Images usually use result.url or resultUrl.
Success response
{
  "code": 0,
  "data": {
    "list": [
      {
        "taskId": "task_01k1example",
        "scheduleId": "schedule_01k1example",
        "type": "VIDEO_GENERATION",
        "status": "COMPLETED",
        "model": "gemini-omni-video",
        "params": {
          "prompt": "A clean 10-second product reveal video with a slow camera push-in",
          "model": "gemini-omni-video",
          "seconds": 10,
          "size": "720x1280"
        },
        "result": {
          "url": "https://static.ailingtu.com/ai-videos/result.mp4",
          "thumbnailUrl": "https://static.ailingtu.com/ai-images/cover.jpg"
        },
        "customResult": {
          "videoUrl": "https://static.ailingtu.com/ai-videos/result.mp4",
          "coverUrl": "https://static.ailingtu.com/ai-images/cover.jpg"
        },
        "createdAt": "2026-08-10T10:00:00Z"
      }
    ],
    "total": 1,
    "pageNumber": 1,
    "pageSize": 20,
    "totalPages": 1
  },
  "message": "success"
}

Content data

Content data

POST/v1/material/fetchAvailable

operationId: fetchPublicVideoData

Video data sync

Fetch public video views and engagement metrics from TikTok, Instagram, Douyin, Xiaohongshu, WeChat Channels, and YouTube.

Request fields

FieldTypeRequiredDescription
videoUrlstring(uri)YesPublic http/https URL of the content
Request body
{
  "videoUrl": "https://www.tiktok.com/@creator/video/7123456789012345678"
}
Success response
{
  "code": 0,
  "data": {
    "videoId": "7624922739500993822",
    "uniqueId": "creator",
    "playCount": 2109422,
    "diggCount": 143027,
    "commentCount": 1320,
    "shareCount": 36150,
    "collectCount": 17710,
    "coverUrl": "https://cdn.example.com/cover.jpg",
    "videoDesc": "caption #tag",
    "releaseAt": 1775315687
  },
  "message": "success"
}

Integration checklist

Keep id and creatorId separate
Skip PUT and confirm when isNew is false
Keep photo businessIds in display order
Persist postId and verify the final status

Ready to integrate?

Create or manage an API key in the LINGTU AI workspace.

Manage API keys