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

# Create a simulation

> Create a simulation from mode + goal + inputs + user_model_ids.

Returns immediately in status `planning`; the plan is generated in the
background. Poll GET /{id} until status is `planned`.



## OpenAPI

````yaml https://api.semilattice.ai/openapi.json post /v1/simulations
openapi: 3.1.0
info:
  title: Semilattice API
  description: API for human behaviour simulation.
  contact:
    name: Semilattice API
    url: https://semilattice.ai/
    email: support@semilattice.ai
  version: v1.0.0
servers: []
security: []
paths:
  /v1/simulations:
    post:
      tags:
        - Simulations
      summary: Create a simulation
      description: |-
        Create a simulation from mode + goal + inputs + user_model_ids.

        Returns immediately in status `planning`; the plan is generated in the
        background. Poll GET /{id} until status is `planned`.
      operationId: create_simulation_route_v1_simulations_post
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            type: string
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSimulationBody'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreateSimulationBody:
      properties:
        mode:
          type: string
          title: Mode
          description: '''research'' or ''journey'''
        goal:
          type: string
          title: Goal
          description: Goal id within the mode (from /v1/simulation-schema)
        inputs:
          additionalProperties: true
          type: object
          title: Inputs
          description: Answers keyed by the goal's input ids (from /v1/simulation-schema)
        user_model_ids:
          items:
            type: string
            format: uuid4
          type: array
          title: User Model Ids
          description: One or more user-model ids to simulate against
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
      type: object
      required:
        - mode
        - goal
        - user_model_ids
      title: CreateSimulationBody
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````