Base URL
https://tiktok-ruler.com
Generate account-specific TikTok slideshows, retrieve rendered slide assets, and start TikTok publication workflows from your own backend.
export TIKTOK_RULER_API_KEY="user_api_key_from_clerk"
curl -s https://tiktok-ruler.com/api/v1/accounts \
-H "Authorization: Bearer $TIKTOK_RULER_API_KEY"https://tiktok-ruler.com
Bearer token from a Clerk user API key.
Create 3-12 slide TikTok photo-mode concepts.
Post generated slideshows to connected TikTok accounts.
Authentication
Public API routes accept Clerk user API keys through the Authorization header. Keep keys on your server, never ship them to browsers, mobile clients, or public repositories.
Authorization: Bearer $TIKTOK_RULER_API_KEYaccounts:read, slideshows:generate, slideshows:publishcurl -s https://tiktok-ruler.com/api/v1/accounts \
-H "Authorization: Bearer $TIKTOK_RULER_API_KEY"Request fields
These fields are accepted by slideshow generation endpoints.
accountRequired. Account id, account name, or normalized handle.promptRequired for generation. The creative direction for the slideshow.contextOptional. Extra audience, product, or campaign context up to 10,000 characters.contextImagesOptional. Up to 12 image URLs with optional title and description.referenceImageUrlsOptional legacy shortcut for reference image URLs.slideCountOptional integer from 3 to 12. Defaults to 6.imageGenerationEnabledOptional boolean. When true, generated image credits are checked per slide.qualityOptional. low costs 1 slideshow credit, medium costs 2, high costs 3.model / models.plannerOptional custom planner model. Do not combine with quality.idempotencyKeyOptional retry key. The Idempotency-Key and X-Idempotency-Key headers also work.Endpoints
All endpoints return JSON. Examples use the production base URL.
/api/v1/accountsReturns the TikTok Ruler content creator accounts available to the authenticated API key.
curl -s https://tiktok-ruler.com/api/v1/accounts \
-H "Authorization: Bearer $TIKTOK_RULER_API_KEY"{
"apiVersion": "v1",
"accounts": [
{
"id": "8a7f7d4c-2d4f-4cc3-9f8d-11a8f8c9d3e0",
"name": "Daily Finds",
"handle": "dailyfinds",
"niche": "shopping",
"tiktok": {
"connected": true,
"status": "connected",
"username": "dailyfinds",
"displayName": "Daily Finds",
"avatarUrl": "https://example.com/avatar.jpg"
}
}
]
}/api/v1/slideshows/generateCreates a saved TikTok slideshow for an account and returns the rendered slide images plus caption, hashtags, music, and usage data.
{
"account": "dailyfinds",
"prompt": "Create an 8-slide TikTok slideshow about desk upgrades under $50.",
"context": "Audience: remote workers who like clean setups. Style: practical, fast, slightly dramatic.",
"contextImages": [
{
"url": "https://example.com/desk-lamp.jpg",
"title": "Desk lamp",
"description": "Warm adjustable lamp with a small footprint."
}
],
"slideCount": 8,
"quality": "medium",
"imageGenerationEnabled": true,
"idempotencyKey": "dailyfinds-desk-upgrades-001"
}curl -s https://tiktok-ruler.com/api/v1/slideshows/generate \
-H "Authorization: Bearer $TIKTOK_RULER_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: dailyfinds-desk-upgrades-001" \
-d '{
"account": "dailyfinds",
"prompt": "Create an 8-slide TikTok slideshow about desk upgrades under $50.",
"slideCount": 8,
"quality": "medium",
"imageGenerationEnabled": true
}'{
"apiVersion": "v1",
"generatedSlideshowId": "5f7d3cb0-2b3f-4d79-97ff-ec75d1dd0932",
"account": {
"id": "8a7f7d4c-2d4f-4cc3-9f8d-11a8f8c9d3e0",
"handle": "dailyfinds",
"name": "Daily Finds"
},
"creditsCharged": 2,
"credits": {
"slideshow": 2,
"imageGeneration": 8,
"total": 10
},
"quality": "medium",
"title": "Desk Upgrades That Feel Expensive",
"caption": "Tiny desk changes that make work feel upgraded.",
"description": "A short product-led slideshow for remote workers.",
"hashtags": ["desksetup", "remotework", "amazonfinds"],
"slides": [
{
"slideNumber": 1,
"onScreenText": "Your desk feels cheap because of this one thing",
"imageDescription": "Clean desk setup with warm lighting",
"imageSource": "ai_generated",
"image": {
"imageUrl": "https://signed-image-url.example",
"urlKind": "signed",
"urlExpiresAt": "2026-06-23T12:15:00.000Z",
"assetId": "image_asset_id",
"bucket": "media-bucket",
"objectKey": "rendered-slides/example.png"
}
}
],
"music": {
"mood": "confident",
"style": "upbeat lifestyle",
"reason": "Matches fast product reveal pacing."
},
"debug": {
"embeddingDim": 3072,
"idempotencyKey": "api:user_123:dailyfinds-desk-upgrades-001"
}
}/api/v1/slideshows/generate-and-postGenerates a slideshow, then starts the TikTok publication workflow for the connected account.
{
"account": "dailyfinds",
"prompt": "Create a 6-slide TikTok slideshow about travel organizers.",
"slideCount": 6,
"quality": "medium",
"publish": {
"privacyLevel": "SELF_ONLY",
"disableComment": false,
"autoAddMusic": true
},
"idempotencyKey": "dailyfinds-travel-organizers-001"
}curl -s https://tiktok-ruler.com/api/v1/slideshows/generate-and-post \
-H "Authorization: Bearer $TIKTOK_RULER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"account": "dailyfinds",
"prompt": "Create a 6-slide TikTok slideshow about travel organizers.",
"slideCount": 6,
"publish": {
"privacyLevel": "SELF_ONLY",
"disableComment": false,
"autoAddMusic": true
},
"idempotencyKey": "dailyfinds-travel-organizers-001"
}'{
"apiVersion": "v1",
"slideshow": {
"apiVersion": "v1",
"generatedSlideshowId": "5f7d3cb0-2b3f-4d79-97ff-ec75d1dd0932",
"title": "Travel Organizers That Save Your Trip",
"slides": []
},
"publication": {
"id": "publication_id",
"generatedSlideshowId": "5f7d3cb0-2b3f-4d79-97ff-ec75d1dd0932",
"accountId": "8a7f7d4c-2d4f-4cc3-9f8d-11a8f8c9d3e0",
"provider": "tiktok",
"postMode": "photo_mode",
"status": "pending",
"publishId": null,
"privacyLevel": "SELF_ONLY",
"errorMessage": null,
"createdAt": "2026-06-23T12:00:00.000Z",
"updatedAt": "2026-06-23T12:00:00.000Z",
"publishedAt": null
}
}/api/v1/slideshows/{generatedSlideshowId}/postStarts the TikTok publication workflow for a slideshow that was already generated and saved.
{
"privacyLevel": "SELF_ONLY",
"disableComment": false,
"autoAddMusic": true,
"idempotencyKey": "post-existing-slideshow-001"
}curl -s https://tiktok-ruler.com/api/v1/slideshows/5f7d3cb0-2b3f-4d79-97ff-ec75d1dd0932/post \
-H "Authorization: Bearer $TIKTOK_RULER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"privacyLevel": "SELF_ONLY",
"disableComment": false,
"autoAddMusic": true,
"idempotencyKey": "post-existing-slideshow-001"
}'{
"apiVersion": "v1",
"publication": {
"id": "publication_id",
"generatedSlideshowId": "5f7d3cb0-2b3f-4d79-97ff-ec75d1dd0932",
"accountId": "8a7f7d4c-2d4f-4cc3-9f8d-11a8f8c9d3e0",
"provider": "tiktok",
"postMode": "photo_mode",
"status": "pending",
"publishId": null,
"privacyLevel": "SELF_ONLY",
"errorMessage": null,
"createdAt": "2026-06-23T12:00:00.000Z",
"updatedAt": "2026-06-23T12:00:00.000Z",
"publishedAt": null
}
}Errors
Error responses use a small JSON shape: { "error": "Unauthorized" }.