> ## 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 a running Simulation at head or at a step

> Creates a new Simulation from the current head or a recorded step. The source Simulation keeps running.



## 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: Read deployment metadata for the public API.
    name: meta
    x-group: API metadata
  - description: Create and control isolated runtime instances of ready Simulators.
    name: simulations
    x-group: Simulations
  - description: Build, inspect, tag, publish, and delete reusable Simulator artifacts.
    name: simulators
    x-group: Simulators
  - description: Upload and publish Simulator artifacts.
    name: uploads
    x-group: Artifact uploads
  - description: Create and control coordinated groups of Simulations.
    name: worlds
    x-group: Worlds
paths:
  /v1/simulations/{id}/fork:
    post:
      tags:
        - simulations
      summary: Fork a running Simulation at head or at a step
      description: >-
        Creates a new Simulation from the current head or a recorded step. The
        source Simulation keeps running.
      operationId: fork-simulation
      parameters:
        - in: header
          name: X-Forwarded-Proto
          schema:
            type: string
        - in: path
          name: id
          required: true
          schema:
            type: string
        - description: >-
            Required with a sealed session on workspace-scoped routes. API keys
            carry their workspace.
          in: header
          name: X-Workspace-Id
          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
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '408':
          $ref: '#/components/responses/RequestTimeout'
        '409':
          $ref: '#/components/responses/Conflict'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      security:
        - apiKeyAuth: []
        - sessionBearerAuth: []
        - sessionCookie: []
components:
  schemas:
    ForkSimulationRequest:
      additionalProperties: false
      examples:
        - at_step: 42
          name: billing-fork
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/ForkSimulationRequest.json
          format: uri
          readOnly: true
          type: string
        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:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - https://example.com/schemas/Simulation.json
          format: uri
          readOnly: true
          type: string
        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
      examples:
        - code: simulator_not_ready
          detail: simulator is not ready
      properties:
        code:
          minLength: 1
          type: string
        detail:
          minLength: 1
          type: string
      required:
        - code
        - detail
      type: object
  responses:
    BadRequest:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Bad Request
    Unauthorized:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Unauthorized
    Forbidden:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Forbidden
    NotFound:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Not Found
    RequestTimeout:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Request Timeout
    Conflict:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Conflict
    PayloadTooLarge:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Request Entity Too Large
    UnsupportedMediaType:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Unsupported Media Type
    UnprocessableEntity:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Unprocessable Entity
    TooManyRequests:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Too Many Requests
    InternalServerError:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Internal Server Error
    ServiceUnavailable:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Service Unavailable
    GatewayTimeout:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Gateway Timeout
  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
    sessionBearerAuth:
      bearerFormat: sealed session
      description: >-
        Use a sealed user session Bearer token. This method supports browser and
        session-only operations.
      scheme: bearer
      type: http
    sessionCookie:
      description: >-
        Use the sealed browser session cookie. This method supports browser and
        session-only operations.
      in: cookie
      name: wos-session
      type: apiKey

````