> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reilabs.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Cloning

> Clone an existing Rei Agent using the user's secret token.



## OpenAPI

````yaml /openapi.json post /accounts/units/clone
openapi: 3.0.3
info:
  title: Reigent API
  version: 1.0.0
  description: API for managing Rei Agents and chat completions.
servers:
  - url: https://api.reilabs.org/v1
  - url: https://rei-api.reilabs.org/v1
security: []
paths:
  /accounts/units/clone:
    servers:
      - url: https://api.reilabs.org/v1
    post:
      tags:
        - Agent Management
      summary: Agent Cloning
      description: Clone an existing Rei Agent using the user's secret token.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - agentId
              properties:
                agentId:
                  type: string
                  description: rei_agent_id from the Get Agent API
      responses:
        '200':
          description: Agent cloned successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  isCloneSuccess:
                    type: boolean
                  secretToken:
                    type: string
        '401':
          description: Unauthorized
        '404':
          description: User Agent not found
      security:
        - UserSecretToken: []
components:
  securitySchemes:
    UserSecretToken:
      type: http
      scheme: bearer
      description: Account API Key from Rei Portal

````