> ## 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.

# Fork Simulation

> Creates a Simulation from the current state or a recorded step. The source Simulation continues to run.



## OpenAPI

````yaml /openapi/simulation.yaml post /v1/simulations/{id}/fork
openapi: 3.1.0
info:
  description: >-
    The continuous-simulation API builds reusable Simulators and runs isolated
    Simulations and Worlds. This document describes the stable v1 public
    contract.
  title: continuous-simulation API
  version: v1
servers:
  - description: Continuous production API.
    url: https://api.continuouslabs.ai
security: []
tags:
  - description: Create and control isolated runtime instances of ready Simulators.
    name: simulations
    x-group: Simulations
  - description: Build, inspect, tag, and delete reusable Simulator artifacts.
    name: simulators
    x-group: Simulators
  - description: Create and control coordinated groups of Simulations.
    name: worlds
    x-group: Worlds
paths:
  /v1/simulations/{id}/fork:
    post:
      tags:
        - simulations
      summary: Fork Simulation
      description: >-
        Creates a Simulation from the current state or a recorded step. The
        source Simulation continues to run.
      operationId: fork-simulation
      parameters:
        - in: header
          name: X-Forwarded-Proto
          schema:
            type: string
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ForkSimulationRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Simulation'
          description: OK
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          content:
            application/problem+json:
              examples:
                simulation_not_found:
                  $ref: '#/components/examples/simulation_not_found'
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found
        '409':
          content:
            application/problem+json:
              examples:
                simulation_stopped:
                  $ref: '#/components/examples/simulation_stopped'
              schema:
                $ref: '#/components/schemas/Error'
          description: Conflict
        '422':
          content:
            application/problem+json:
              examples:
                validation:
                  $ref: '#/components/examples/validation'
              schema:
                $ref: '#/components/schemas/Error'
          description: Unprocessable Entity
        '429':
          content:
            application/problem+json:
              examples:
                simulation_capacity:
                  $ref: '#/components/examples/simulation_capacity'
                simulation_quota_exceeded:
                  $ref: '#/components/examples/simulation_quota_exceeded'
              schema:
                $ref: '#/components/schemas/Error'
          description: Too Many Requests
        '500':
          content:
            application/problem+json:
              examples:
                internal:
                  $ref: '#/components/examples/internal'
                simulation_template_missing:
                  $ref: '#/components/examples/simulation_template_missing'
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error
        '503':
          content:
            application/problem+json:
              examples:
                simulation_provider_unavailable:
                  $ref: '#/components/examples/simulation_provider_unavailable'
              schema:
                $ref: '#/components/schemas/Error'
          description: Service Unavailable
        '504':
          content:
            application/problem+json:
              examples:
                simulation_timeout:
                  $ref: '#/components/examples/simulation_timeout'
              schema:
                $ref: '#/components/schemas/Error'
          description: Gateway Timeout
      security:
        - apiKeyAuth: []
components:
  schemas:
    ForkSimulationRequest:
      additionalProperties: false
      examples:
        - at_step: 42
          name: billing-fork
      properties:
        at_step:
          format: int64
          maximum: 9007199254740991
          minimum: 0
          type: integer
        name:
          type: string
      type: object
    Simulation:
      additionalProperties: false
      examples:
        - clock_start: '2026-01-15T12:00:00Z'
          created_at: '2026-01-15T12:00:00Z'
          endpoint: https://api.continuouslabs.ai/sim/sim_01J8Z5X4K7M2N9P0Q1R2S3T4V6
          id: sim_01J8Z5X4K7M2N9P0Q1R2S3T4V6
          labels:
            environment: demo
          name: billing-sandbox
          parent: ''
          seed: demo-seed
          simulator_id: smr_01J8Z5X4K7M2N9P0Q1R2S3T4V5
          status: running
          token: <redacted>
      properties:
        clock_start:
          format: date-time
          type: string
        created_at:
          format: date-time
          type: string
        endpoint:
          type: string
        id:
          type: string
        labels:
          additionalProperties:
            type: string
          type: object
        name:
          type: string
        parent:
          type: string
        seed:
          type: string
        simulator_id:
          type: string
        status:
          enum:
            - running
            - paused
            - stopped
          type: string
        token:
          type: string
      required:
        - id
        - name
        - simulator_id
        - parent
        - seed
        - clock_start
        - status
        - endpoint
        - token
        - labels
        - created_at
      type: object
    Error:
      additionalProperties: false
      properties:
        code:
          minLength: 1
          type: string
        detail:
          minLength: 1
          type: string
      required:
        - code
        - detail
      type: object
  responses:
    Unauthorized:
      content:
        application/problem+json:
          examples:
            auth_invalid:
              $ref: '#/components/examples/auth_invalid'
          schema:
            $ref: '#/components/schemas/Error'
      description: Unauthorized
  examples:
    simulation_not_found:
      value:
        code: simulation_not_found
        detail: No Simulation was found with ID "sim_01J8Z5X4K7M2N9P0Q1R2S3T4V6".
    simulation_stopped:
      value:
        code: simulation_stopped
        detail: >-
          The Simulation with ID "sim_01J8Z5X4K7M2N9P0Q1R2S3T4V6" is stopped.
          Start it before you retry this request.
    validation:
      value:
        code: validation
        detail: The request does not satisfy the API contract.
    simulation_capacity:
      value:
        code: simulation_capacity
        detail: >-
          Continuous has no available Simulation capacity. Retry after a short
          delay.
    simulation_quota_exceeded:
      value:
        code: simulation_quota_exceeded
        detail: >-
          The workspace has 5 active Simulations, which is its limit. Stop a
          Simulation or wait for one to be deleted.
    internal:
      value:
        code: internal
        detail: The server encountered an unexpected error.
    simulation_template_missing:
      value:
        code: simulation_template_missing
        detail: >-
          The Simulation runtime template is unavailable. Contact Continuous
          support before you retry the request.
    simulation_provider_unavailable:
      value:
        code: simulation_provider_unavailable
        detail: >-
          The Simulation runtime provider is unavailable. Retry the request
          after a short delay.
    simulation_timeout:
      value:
        code: simulation_timeout
        detail: >-
          The Simulation runtime did not start before the timeout. Retry the
          request.
    auth_invalid:
      value:
        code: auth_invalid
        detail: The API key is missing or invalid.
  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

````