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

# Cancel World Build

> Cancels an active World build. Repeated cancellation returns the current World.



## OpenAPI

````yaml /openapi/simulation.yaml post /v1/worlds/{id}/cancel
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, and delete reusable Simulator artifacts.
    name: simulators
    x-group: Simulators
  - description: Build and control coordinated groups of Simulations.
    name: worlds
    x-group: Worlds
paths:
  /v1/worlds/{id}/cancel:
    post:
      tags:
        - worlds
      summary: Cancel World Build
      description: >-
        Cancels an active World build. Repeated cancellation returns the current
        World.
      operationId: cancel-world-build
      parameters:
        - description: Stable World ID.
          in: path
          name: id
          required: true
          schema:
            description: Stable World ID.
            pattern: ^wld_[0-9A-HJKMNP-TV-Z]{26}$
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/World'
          description: OK
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          content:
            application/problem+json:
              examples:
                world_not_found:
                  $ref: '#/components/examples/world_not_found'
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - apiKeyAuth: []
components:
  schemas:
    World:
      additionalProperties: false
      examples:
        - created_at: '2026-01-15T12:00:00Z'
          error: null
          id: wld_01J8Z5X4K7M2N9P0Q1R2S3T4V7
          instructions: Use stable example data for each Simulator.
          simulations: []
          simulators:
            - smr_01J8Z5X4K7M2N9P0Q1R2S3T4V5
          status: building
      properties:
        created_at:
          description: Time when the World build started.
          format: date-time
          type: string
        error:
          $ref: '#/components/schemas/ResourceError'
          description: Safe failure information, or null when no failure exists.
        id:
          description: Stable World ID.
          pattern: ^wld_[0-9A-HJKMNP-TV-Z]{26}$
          type: string
        instructions:
          description: Build guidance stored with the World.
          type: string
        simulations:
          description: Created member Simulations. This list is empty before first start.
          items:
            $ref: '#/components/schemas/WorldSimulation'
          type: array
        simulators:
          description: Stable Simulator IDs in member order.
          items:
            pattern: ^smr_[0-9A-HJKMNP-TV-Z]{26}$
            type: string
          type: array
        status:
          description: Current World lifecycle status.
          enum:
            - building
            - ready
            - running
            - stopped
            - failed
            - canceled
          type: string
      required:
        - id
        - status
        - simulators
        - instructions
        - simulations
        - error
        - created_at
      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
      required:
        - code
        - detail
      type: object
    ResourceError:
      additionalProperties: false
      properties:
        code:
          description: Stable machine-readable error code.
          type: string
        detail:
          description: Safe human-readable error detail.
          type: string
      required:
        - code
        - detail
      type:
        - object
        - 'null'
    WorldSimulation:
      additionalProperties: false
      properties:
        id:
          description: Stable ID of the created Simulation.
          pattern: ^sim_[0-9A-HJKMNP-TV-Z]{26}$
          type: string
        simulator_id:
          description: Stable ID of the Simulator that this Simulation runs.
          pattern: ^smr_[0-9A-HJKMNP-TV-Z]{26}$
          type: string
      required:
        - id
        - simulator_id
      type: object
  responses:
    BadRequest:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Bad Request
    Unauthorized:
      content:
        application/problem+json:
          examples:
            auth_invalid:
              $ref: '#/components/examples/auth_invalid'
          schema:
            $ref: '#/components/schemas/Error'
      description: Unauthorized
    Forbidden:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Forbidden
    Conflict:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Conflict
    InternalServerError:
      content:
        application/problem+json:
          examples:
            internal:
              $ref: '#/components/examples/internal'
          schema:
            $ref: '#/components/schemas/Error'
      description: Internal Server Error
    ServiceUnavailable:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Service Unavailable
  examples:
    world_not_found:
      value:
        code: world_not_found
        detail: No World was found with ID "wld_01J8Z5X4K7M2N9P0Q1R2S3T4V7".
    auth_invalid:
      value:
        code: auth_invalid
        detail: The API key is missing or invalid.
    internal:
      value:
        code: internal
        detail: The server encountered an unexpected 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

````