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

# Build World

> Builds a World definition from stable Simulator IDs. Start the World to create its Simulations.



## OpenAPI

````yaml /openapi/simulation.yaml post /v1/worlds
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:
    post:
      tags:
        - worlds
      summary: Build World
      description: >-
        Builds a World definition from stable Simulator IDs. Start the World to
        create its Simulations.
      operationId: build-world
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuildWorldRequest'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/World'
          description: Accepted
        '400':
          content:
            application/problem+json:
              examples:
                simulator_unknown:
                  $ref: '#/components/examples/simulator_unknown'
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad Request
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '408':
          $ref: '#/components/responses/RequestTimeout'
        '409':
          content:
            application/problem+json:
              examples:
                simulator_not_ready:
                  $ref: '#/components/examples/simulator_not_ready'
              schema:
                $ref: '#/components/schemas/Error'
          description: Conflict
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '422':
          content:
            application/problem+json:
              examples:
                validation:
                  $ref: '#/components/examples/validation'
              schema:
                $ref: '#/components/schemas/Error'
          description: Unprocessable Entity
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - apiKeyAuth: []
components:
  schemas:
    BuildWorldRequest:
      additionalProperties: false
      examples:
        - instructions: Use stable example data for each Simulator.
          simulators:
            - smr_01J8Z5X4K7M2N9P0Q1R2S3T4V5
      properties:
        instructions:
          description: >-
            Build guidance. At most 16,384 characters and 65,536 UTF-8 bytes.
            U+0000 is not permitted.
          maxLength: 16384
          type: string
        simulators:
          description: Stable Simulator IDs for the World.
          items:
            pattern: ^smr_[0-9A-HJKMNP-TV-Z]{26}$
            type: string
          minItems: 1
          type: array
      required:
        - simulators
      type: object
    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
  examples:
    simulator_unknown:
      value:
        code: simulator_unknown
        detail: No Simulator was found with ID "smr_01J8Z5X4K7M2N9P0Q1R2S3T4V5".
    simulator_not_ready:
      value:
        code: simulator_not_ready
        detail: >-
          The Simulator with ID "smr_01J8Z5X4K7M2N9P0Q1R2S3T4V5" is not ready.
          Wait for its build to finish before you retry.
    validation:
      value:
        code: validation
        detail: The request does not satisfy the API contract.
    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.
  responses:
    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
    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
    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
    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
  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

````