Skip to main content
POST
https://api.u1.archetypeai.app/v0.5
/
lens
/
clone
curl -X POST https://api.dev.u1.archetypeai.app/v0.5/lens/clone \
  -H "Authorization: Bearer $ATAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lens_id": "lns-test-lens-93812264"
  }'
{
  "lens_id": "lns-test-lens-b2ba0058",
  "lens_name": "Test Lens",
  "lens_status": "LENS_STATUS_MOUNTED",
  "lens_modifiable": true,
  "lens_config": {
    "model_pipeline": [
      {
        "processor_name": "lens_noop_processor",
        "processor_config": {}
      }
    ],
    "origin_lens_id": "34fa1b8f-6d4c-42da-b9c3-b8d66bed8fa2"
  }
}

Overview

This endpoint creates a copy of a lens template, registering the lens and returning the new lens_id. Note that once a lens is cloned, any modifications to the original lens template will not be propagated to any cloned templates.

Request

Authorization
string
required
Bearer token for authentication. Format: Bearer $ATAI_API_KEY
lens_id
string
required
The lens ID to clone.

Response

lens_id
string
The ID of the new cloned lens.
lens_name
string
Name of the cloned lens.
lens_status
string
Status of the new lens.
lens_modifiable
boolean
Whether the cloned lens can be modified.
lens_config
object
Configuration of the cloned lens, including origin_lens_id reference.
curl -X POST https://api.dev.u1.archetypeai.app/v0.5/lens/clone \
  -H "Authorization: Bearer $ATAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lens_id": "lns-test-lens-93812264"
  }'
{
  "lens_id": "lns-test-lens-b2ba0058",
  "lens_name": "Test Lens",
  "lens_status": "LENS_STATUS_MOUNTED",
  "lens_modifiable": true,
  "lens_config": {
    "model_pipeline": [
      {
        "processor_name": "lens_noop_processor",
        "processor_config": {}
      }
    ],
    "origin_lens_id": "34fa1b8f-6d4c-42da-b9c3-b8d66bed8fa2"
  }
}