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

# Clone Simulator

> Creates a ready copy of a ready Simulator in another workspace. The clone has a new ID and the source's image digest; the source is unchanged. The source is the caller's workspace: an API key's own workspace, or X-Workspace-Id for a session. An API key may clone into any other workspace of its organization.



## OpenAPI

````yaml /openapi/simulation.yaml post /v1/simulators/{id}/clone
openapi: 3.1.0
info:
  description: >-
    Build Simulators from OpenAPI or WSDL documents, create Simulations from
    them, and build Worlds that run Simulations together. Authenticate every
    request with an API key sent as a Bearer token.
  title: Continuous Simulation API
  version: v1
servers:
  - description: Continuous production API.
    url: https://api.continuouslabs.ai
security: []
tags:
  - description: >-
      Build Simulators from OpenAPI or WSDL documents, check or cancel a build,
      clone Simulators into other workspaces, and delete Simulators.
    name: simulators
    x-group: Simulators
  - description: >-
      Create Simulations from ready Simulators, then fork, stop, start, and
      delete them.
    name: simulations
    x-group: Simulations
  - description: >-
      Build Worlds from one or more Simulators and start or stop their
      Simulations together.
    name: worlds
    x-group: Worlds
paths:
  /v1/simulators/{id}/clone:
    post:
      tags:
        - simulators
      summary: Clone Simulator
      description: >-
        Creates a ready copy of a ready Simulator in another workspace. The
        clone has a new ID and the source's image digest; the source is
        unchanged. The source is the caller's workspace: an API key's own
        workspace, or X-Workspace-Id for a session. An API key may clone into
        any other workspace of its organization.
      operationId: clone-simulator
      parameters:
        - description: Source Simulator ID.
          in: path
          name: id
          required: true
          schema:
            pattern: ^smr_[0-9A-HJKMNP-TV-Z]{26}$
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloneSimulatorRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloneSimulatorResponse'
          description: Created
        '400':
          content:
            application/problem+json:
              examples:
                bad_request_body:
                  $ref: '#/components/examples/bad_request_body'
                bad_request_clone_target:
                  $ref: '#/components/examples/bad_request_clone_target'
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          content:
            application/problem+json:
              examples:
                auth_forbidden_clone:
                  $ref: '#/components/examples/auth_forbidden_clone'
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden
        '404':
          content:
            application/problem+json:
              examples:
                image_unavailable:
                  $ref: '#/components/examples/image_unavailable'
                simulator_not_found_clone:
                  $ref: '#/components/examples/simulator_not_found_clone'
                workspace_not_found:
                  $ref: '#/components/examples/workspace_not_found'
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found
        '408':
          $ref: '#/components/responses/RequestTimeout'
        '409':
          content:
            application/problem+json:
              examples:
                simulator_import_conflict:
                  $ref: '#/components/examples/simulator_import_conflict'
                simulator_not_ready_clone:
                  $ref: '#/components/examples/simulator_not_ready_clone'
              schema:
                $ref: '#/components/schemas/Error'
          description: Conflict
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '422':
          content:
            application/problem+json:
              examples:
                artifact_invalid:
                  $ref: '#/components/examples/artifact_invalid'
                validation_simulator_id:
                  $ref: '#/components/examples/validation_simulator_id'
              schema:
                $ref: '#/components/schemas/Error'
          description: Unprocessable Entity
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          content:
            application/problem+json:
              examples:
                auth_provider_unavailable:
                  $ref: '#/components/examples/auth_provider_unavailable'
                internal_unavailable:
                  $ref: '#/components/examples/internal_unavailable'
                registry_unavailable:
                  $ref: '#/components/examples/registry_unavailable'
              schema:
                $ref: '#/components/schemas/Error'
          description: Service Unavailable
      security:
        - apiKeyAuth: []
components:
  schemas:
    CloneSimulatorRequest:
      additionalProperties: false
      properties:
        idempotency_key:
          description: Stable key for retrying this clone into the target workspace.
          maxLength: 128
          minLength: 1
          type: string
        name:
          description: Display name for the clone. Defaults to the source Simulator's name.
          maxLength: 128
          type: string
        target_workspace_id:
          description: >-
            Workspace that receives the clone. It must differ from the source
            workspace.
          minLength: 1
          type: string
      required:
        - target_workspace_id
        - idempotency_key
      type: object
    CloneSimulatorResponse:
      additionalProperties: false
      properties:
        digest:
          description: OCI manifest digest, unchanged from the source.
          type: string
        id:
          description: >-
            New Simulator ID in the target workspace, or the same ID on an
            idempotent retry.
          type: string
        name:
          description: Display name of the clone.
          type: string
        workspace_id:
          description: Target workspace.
          type: string
      required:
        - id
        - workspace_id
        - digest
        - name
      type: object
    Error:
      additionalProperties: false
      properties:
        code:
          description: Stable machine-readable error code.
          minLength: 1
          type: string
        detail:
          description: Safe human-readable error detail.
          minLength: 1
          type: string
        validation:
          $ref: '#/components/schemas/SpecificationValidation'
          description: >-
            Safe specification diagnostics for a rejected build request, when
            available.
      required:
        - validation
        - code
        - detail
      type: object
    SpecificationValidation:
      additionalProperties: false
      properties:
        issues:
          description: Specification validation problems. At most 20 are returned.
          items:
            $ref: '#/components/schemas/SpecificationIssue'
          maxItems: 20
          type: array
      required:
        - issues
      type:
        - object
        - 'null'
    SpecificationIssue:
      additionalProperties: false
      properties:
        code:
          description: Stable validation rule code.
          type: string
        kind:
          description: >-
            Whether the input is invalid, unsupported, incomplete, or has no
            specific diagnosis.
          enum:
            - invalid
            - unsupported
            - incomplete
            - unknown
          type: string
        location:
          description: Readable endpoint or field affected by this issue.
          maxLength: 512
          type: string
        message:
          description: What needs attention at this location.
          type: string
        operation:
          description: >-
            Affected operation ID or method and path, when available. Empty for
            document-level issues.
          maxLength: 243
          type: string
        suggestion:
          description: How to correct or address the problem.
          type: string
      required:
        - code
        - operation
        - location
        - kind
        - message
        - suggestion
      type: object
  examples:
    bad_request_body:
      value:
        code: bad_request
        detail: request body is invalid
        validation: null
    bad_request_clone_target:
      value:
        code: bad_request
        detail: target_workspace_id must differ from the source workspace
        validation: null
    auth_forbidden_clone:
      value:
        code: auth_forbidden
        detail: the API key's organization does not own workspace ws_target
        validation: null
    image_unavailable:
      value:
        code: image_unavailable
        detail: Simulator image unavailable
        validation: null
    simulator_not_found_clone:
      value:
        code: simulator_not_found
        detail: >-
          Simulator smr_01J8Z5X4K7M2N9P0Q1R2S3T4V5 not found in the source
          workspace
        validation: null
    workspace_not_found:
      value:
        code: workspace_not_found
        detail: workspace ws_target not found
        validation: null
    simulator_import_conflict:
      value:
        code: simulator_import_conflict
        detail: idempotency_key already belongs to another import
        validation: null
    simulator_not_ready_clone:
      value:
        code: simulator_not_ready
        detail: source Simulator has no ready image
        validation: null
    artifact_invalid:
      value:
        code: artifact_invalid
        detail: Simulator image is invalid
        validation: null
    validation_simulator_id:
      value:
        code: validation
        detail: The Simulator ID must be a stable smr_ ID.
        validation: null
    auth_provider_unavailable:
      value:
        code: auth_provider_unavailable
        detail: >-
          The authentication provider is unavailable. Retry the request after a
          short delay.
        validation: null
    internal_unavailable:
      value:
        code: internal_unavailable
        detail: >-
          The service is temporarily unavailable. Retry the request after a
          short delay.
        validation: null
    registry_unavailable:
      value:
        code: registry_unavailable
        detail: Simulator registry unavailable; retry later
        validation: null
    auth_invalid:
      value:
        code: auth_invalid
        detail: The authentication credential is invalid.
        validation: null
    auth_missing:
      value:
        code: auth_invalid
        detail: Authentication credentials are required.
        validation: null
    request_timeout:
      value:
        code: request_timeout
        detail: >-
          The request body was not received before the timeout. Retry the
          request.
        validation: null
    payload_too_large:
      value:
        code: payload_too_large
        detail: The request body exceeds the maximum allowed size.
        validation: null
    unsupported_media_type:
      value:
        code: unsupported_media_type
        detail: The request Content-Type is not supported.
        validation: null
    internal:
      value:
        code: internal
        detail: The server encountered an unexpected error.
        validation: null
  responses:
    Unauthorized:
      content:
        application/problem+json:
          examples:
            auth_invalid:
              $ref: '#/components/examples/auth_invalid'
            auth_missing:
              $ref: '#/components/examples/auth_missing'
          schema:
            $ref: '#/components/schemas/Error'
      description: Unauthorized
    RequestTimeout:
      content:
        application/problem+json:
          examples:
            request_timeout:
              $ref: '#/components/examples/request_timeout'
          schema:
            $ref: '#/components/schemas/Error'
      description: Request Timeout
    PayloadTooLarge:
      content:
        application/problem+json:
          examples:
            payload_too_large:
              $ref: '#/components/examples/payload_too_large'
          schema:
            $ref: '#/components/schemas/Error'
      description: Request Entity Too Large
    UnsupportedMediaType:
      content:
        application/problem+json:
          examples:
            unsupported_media_type:
              $ref: '#/components/examples/unsupported_media_type'
          schema:
            $ref: '#/components/schemas/Error'
      description: Unsupported Media Type
    InternalServerError:
      content:
        application/problem+json:
          examples:
            internal:
              $ref: '#/components/examples/internal'
          schema:
            $ref: '#/components/schemas/Error'
      description: Internal Server Error
  securitySchemes:
    apiKeyAuth:
      bearerFormat: Continuous API key
      description: >-
        Use a Continuous API key. Send it in the Authorization header as a
        Bearer token.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.