Skip to main content
POST
https://api.u1.archetypeai.app/v0.5
/
lens
/
register
curl -X POST https://api.dev.u1.archetypeai.app/v0.5/lens/register \
  -H "Authorization: Bearer $ATAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lens_config": {
      "lens_name": "My Test Lens"
    }
  }'
{
  "lens_id": "lns-test-lens-176520-e7885b3f",
  "lens_name": "My Test Lens",
  "lens_status": "LENS_STATUS_MOUNTED",
  "lens_modifiable": true,
  "lens_config": {
    "model_pipeline": [
      {
        "processor_name": "lens_noop_processor",
        "processor_config": {}
      }
    ]
  }
}

Overview

Register a new lens by providing a configuration. The lens can be a minimal registration (just a name) or a full production lens with model pipeline and parameters.

Request Body

Authorization
string
required
Bearer token for authentication. Format: Bearer $ATAI_API_KEY
lens_config
object
required
Configuration object for the lens

Response

lens_id
string
Unique identifier for the registered lens (format: “lns-…”)
lens_name
string
Name of the registered lens
lens_modifiable
boolean
Whether the lens can be modified or deleted
lens_status
string
Current status of the lens (“LENS_STATUS_MOUNTED” or “LENS_STATUS_REGISTERED”)
is_valid
boolean
If false, indicates an error occurred. Check error_messages for details.
error_messages
array
Array of error messages if registration failed
curl -X POST https://api.dev.u1.archetypeai.app/v0.5/lens/register \
  -H "Authorization: Bearer $ATAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lens_config": {
      "lens_name": "My Test Lens"
    }
  }'
{
  "lens_id": "lns-test-lens-176520-e7885b3f",
  "lens_name": "My Test Lens",
  "lens_status": "LENS_STATUS_MOUNTED",
  "lens_modifiable": true,
  "lens_config": {
    "model_pipeline": [
      {
        "processor_name": "lens_noop_processor",
        "processor_config": {}
      }
    ]
  }
}