validate_and_prepare_tiktok_assets

TikTok Ads Write

User provides image URLs to validate BEFORE creating TikTok image campaign

Endpoint

POST https://api.adspirer.ai/api/v1/tools/validate_and_prepare_tiktok_assets/execute

Headers

Description

User provides image URLs to validate BEFORE creating TikTok image campaign. Validate and prepare new image assets for TikTok ad campaigns. IMPORTANT: Call this tool BEFORE create_tiktok_campaign if uploading NEW images. TikTok Image Requirements: - Aspect ratio: 9:16 (vertical, e.g., 1080x1920 or 540x960) - Maximum file size: 10MB - Formats: JPEG, PNG, WEBP - Minimum size: 540x960px - Recommended: 1080x1920px Parameters: - image_urls: List of public image URLs (e.g., from postimages.org, imgbb.com) Returns: - Validation results for each image - asset_bundle_id (valid for 60 minutes) - Use this bundle ID in create_tiktok_campaign Execution time: 5-15 seconds (downloads and validates images) Use this tool to: - Upload new images you haven't used before - Validate images meet TikTok's specifications - Get detailed error messages if images don't meet requirements After validation, use the returned `asset_bundle_id` in `create_tiktok_campaign`.

Request body

All tool arguments are wrapped in an arguments object.

FieldTypeDescription
image_urlsarray requiredList of public image URLs to validate (e.g., from postimages.org). Must be publicly accessible HTTPS URLs. Images will be validated against TikTok specs: 9:16 aspect ratio, max 10MB.
advertiser_idstring optionalTikTok advertiser ID. Required for multi-account users. Get from list_connected_accounts.

Example request

{
  "arguments": {
    "image_urls": [
      "string"
    ],
    "advertiser_id": "string"
  }
}

Example responses

200 — Success

{
  "success": true,
  "data": {
    "text": "(tool-specific textual output for validate_and_prepare_tiktok_assets)",
    "quota": {
      "used": 42,
      "limit": 150,
      "tier": "plus",
      "period_end": "2026-05-01"
    }
  },
  "tool": "validate_and_prepare_tiktok_assets"
}

400 — Tool-level error (bad arguments / multi-account selection)

{
  "success": false,
  "error": "You have 25 meta_ads accounts connected. Please specify which account to use by passing the ad_account_id parameter:\n  - Acme Holdings (ad_account_id=\"act_123456789\")\n  - Acme EU (ad_account_id=\"act_987654321\")",
  "is_error": true,
  "tool": "validate_and_prepare_tiktok_assets"
}

402 — Quota exhausted

{
  "success": false,
  "error": "\ud83d\udea8 Monthly limit reached (150/150 tool calls on Plus tier).\nUpgrade to Pro at https://adspirer.ai to keep building.",
  "is_error": true,
  "tool": "validate_and_prepare_tiktok_assets",
  "quota": {
    "used": 150,
    "limit": 150,
    "tier": "plus",
    "period_end": "2026-05-01",
    "upgrade_url": "https://adspirer.ai"
  }
}

Try it live


Adspirer REST API — get an API key at adspirer.ai/keys · adspirer.ai