POST /v1/projects/:projectId/content/slideshow-remix
Generate an image slideshow remixed from a discovered TikTok slideshow source.
POST
/v1/projects/:projectId/content/slideshow-remixPhase 1stableidempotent
- Auth
- Bearer
- Scope
- content:write
Starts a content-generate job. Returns 202
with containerIds (single-element array — the partner surface never
fans out variants) and jobId.
The source slideshow's per-slide text is extracted internally and adapted to the project's brand voice and language. Partners do not supply a hook for this format — to use a different hook, pick a different source via /content/source-recommendations.
Path parameters
projectIdstring (uuid)requiredThe project to generate content for.
Body
Body
tiktokVideoIdstringrequiredSource TikTok slideshow id (the post-id field is named `tiktokVideoId` for shape consistency with `video-remix`). Typically pulled from `/content/source-recommendations` with `kind=slideshow`.socialAccountIdstringoptionalConnected social-account id. Walks the wiring chain.influencerIdstringoptionalExplicit influencer override. One of socialAccountId or influencerId is required — the influencer face is used to regenerate slides.
Request
curl -X POST https://api.layers.com/v1/projects/{projectId}/content/slideshow-remix \
-H "Authorization: Bearer $LAYERS_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"tiktokVideoId": "7234567890987654321",
"influencerId": "inf_4a8e1bc2..."
}'const res = await fetch(
`https://api.layers.com/v1/projects/${projectId}/content/slideshow-remix`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.LAYERS_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
tiktokVideoId: '7234567890987654321',
socialAccountId: 'sac_...',
}),
},
);
const { jobId, containerIds } = await res.json();
const [containerId] = containerIds;import os, uuid, httpx
r = httpx.post(
f"https://api.layers.com/v1/projects/{project_id}/content/slideshow-remix",
headers={
"Authorization": f"Bearer {os.environ['LAYERS_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"tiktokVideoId": "7234567890987654321",
"influencerId": "inf_4a8e1bc2...",
},
)
job = r.json()Responses
202Job accepted.
{
"jobId": "job_01HZX3...",
"kind": "content_generate",
"status": "running",
"containerIds": ["cnt_7d18b9a1..."],
"locationUrl": "/v1/jobs/job_01HZX3..."
}422Influencer required, source id invalid, or wiring resolution failed.
| Code | Cause |
|---|---|
INFLUENCER_REQUIRED | Neither socialAccountId (with wired influencer) nor influencerId provided. |
INVALID_TIKTOK_ID | tiktokVideoId doesn't resolve to a fetchable source. |
NOT_A_SLIDESHOW | The id resolves to a video, not a slideshow. |
ACCOUNT_NOT_WIRED / NO_CONTENT_LAYER_WIRED / INFLUENCER_NOT_WIRED | Wiring chain resolution failed mid-step. |
Errors
| Code | When |
|---|---|
VALIDATION | Body shape invalid. |
NOT_FOUND | socialAccountId / influencerId not on this project. |
INFLUENCER_REQUIRED | No influencer resolvable from either path. |
INVALID_TIKTOK_ID / NOT_A_SLIDESHOW | Source resolution failure. |
IDEMPOTENCY_CONFLICT | Same Idempotency-Key reused with different body. |
BILLING_EXHAUSTED | Org wallet at zero. |