Layers

POST /v1/influencers/:influencerId/clone

Duplicate an influencer. Returns 202 with a job envelope.

View as Markdown
POST/v1/influencers/:influencerId/clone
Phase 1stableidempotent
Auth
Bearer
Scope
influencers:write

Clones an existing influencer. The source's identity fields and reference images are copied into a new row (same project), and an influencer_create job re-renders the reference image set. Async — poll the returned job.

The source id is a path parameter, not a body field. There's no "clone from image URL" mode — to seed an identity from a photo, call create with referenceImages.assetIds.

Path parameters

  • influencerId
    string (uuid)required
    The source influencer. Must belong to your org.

Body

Body
  • name
    stringrequired
    Display name for the clone (1-128).
  • newInfluencerId
    string (uuid)optional
    Your id for idempotency. Omit to let us generate one.
  • overrides
    objectoptional
    Partial identity fields applied on top of the source. Same shape as the create body (excluding `name`, `influencerId`, `referenceImages`).

Body is strict — unknown fields return VALIDATION.

Request

terminal
curl -X POST https://api.layers.com/v1/influencers/{influencerId}/clone \
  -H "X-Api-Key: $LAYERS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Ava Chen (EU)",
    "overrides": { "vibe": "sharper, more deadpan" }
  }'
clone-influencer.ts
const res = await fetch(
  `https://api.layers.com/v1/influencers/${influencerId}/clone`,
  {
    method: 'POST',
    headers: {
      'X-Api-Key': process.env.LAYERS_API_KEY!,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      name: 'Ava Chen (EU)',
      overrides: { style: 'European minimalist' },
    }),
  },
);
const { jobId, influencerId: cloneId } = await res.json();
clone_influencer.py
import os, httpx

r = httpx.post(
    f"https://api.layers.com/v1/influencers/{influencer_id}/clone",
    headers={
        "X-Api-Key": os.environ["LAYERS_API_KEY"],
        "Content-Type": "application/json",
    },
    json={"name": "Ava Chen (UK)"},
)
job = r.json()

Responses

202Clone accepted. The new row exists with status=pending; poll the job.
{
  "jobId": "job_01HY0AB...",
  "kind": "influencer_create",
  "status": "running",
  "influencerId": "inf_01HY0AB...",
  "locationUrl": "/v1/jobs/job_01HY0AB..."
}
404Source influencer not in this org.
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Influencer not found.",
    "requestId": "req_..."
  }
}
409newInfluencerId already exists.
{
  "error": {
    "code": "CONFLICT",
    "message": "Influencer with this id already exists.",
    "requestId": "req_..."
  }
}

Notes

  • Clone lives in the source's project. The clone inherits projectId from the source. To move an identity across projects, create a new influencer in the target project.
  • Async, not sync. The job envelope is identical to create — the workflow re-renders the identity.
  • Reference images come along. Existing reference image metadata is copied to the clone's attributes as a starting set; the rendered images on the clone are produced by the job.

Errors

CodeWhen
VALIDATIONMissing name, unknown field in overrides, bad types.
NOT_FOUNDSource influencer not in this org.
CONFLICTnewInfluencerId collides.
FORBIDDEN_SCOPEKey lacks influencers:write.

See also

On this page