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 (gender, ageRange, brandVoice, language, plus the internal persona attributes) is carried forward into a new influencer in the same project. An influencer_create job then renders a new portrait conditioned on the source's identity — so the clone looks like the source unless your overrides push it elsewhere. Async — poll the returned job.

The source id is a path parameter, not a body field.

Clones are partner-API only. There is no UI clone button — the workflow is designed for programmatic fan-out (e.g. Maria-EN + Maria-ES + Maria-PT sharing the same identity with locale tweaks via overrides).

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).
  • overrides
    objectoptional
    Partial identity fields applied on top of the source. Accepts `gender`, `ageRange`, `brandVoice`, `language`.

Body is strict - unknown fields return VALIDATION.

Request

terminal
curl -X POST https://api.layers.com/v1/influencers/{influencerId}/clone \
  -H "Authorization: Bearer $LAYERS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Maria (ES)",
    "overrides": { "language": "es-MX" }
  }'
clone-influencer.ts
const res = await fetch(
  `https://api.layers.com/v1/influencers/${influencerId}/clone`,
  {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.LAYERS_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      name: 'Maria (ES)',
      overrides: { language: 'es-MX' },
    }),
  },
);
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={
        "Authorization": f"Bearer {os.environ[\'LAYERS_API_KEY\']}",
        "Content-Type": "application/json",
    },
    json={"name": "Maria (PT)", "overrides": {"language": "pt-BR"}},
)
job = r.json()

Responses

202Clone accepted. The new influencer exists with status=pending; poll the job.
{
  "jobId": "job_01HY0AB...",
  "kind": "influencer_create",
  "status": "running",
  "influencerId": "inf_4a8e1bc2...",
  "locationUrl": "/v1/jobs/job_01HY0AB..."
}
404Source influencer not in this org.
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Influencer not found.",
    "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.
  • Identity preserved. The job loads the source's gender, ageRange, brandVoice, language, and internal persona attributes server-side, applies your overrides on top, then renders a new portrait conditioned on the source's appearance.
  • Overrides win. Anything you pass in overrides shadows the source for that field on the new row. Unspecified fields fall through to the source.

Errors

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

See also

On this page