Semilattice Simulations API

A simulation asks one or more user models questions (User Research) or sends their simulated users through a page or a flow (User Journey). It is planned first, then run once you have checked the plan.

GitHub OpenAPI

Operations 8

GET /v1/simulations List simulations #
POST /v1/simulations Create a simulation #
GET /v1/simulations/{simulation_id} Get a simulation #
PATCH /v1/simulations/{simulation_id} Move a simulation into a project #
DELETE /v1/simulations/{simulation_id} Delete a simulation #
PATCH /v1/simulations/{simulation_id}/plan Edit the plan #
POST /v1/simulations/{simulation_id}/run Run a simulation #
POST /v1/simulations/{simulation_id}/share Make a simulation public #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/semilattice-ai:semilattice-ai-simulations-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

semilattice-ai-simulations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Semilattice Simulations API
  description: 'Plan and run simulations of how your users will react to your work, and read the results. Everything you create is saved in your Semilattice account, so it also appears in the app.


    Authenticate with an API key from **Settings → API Keys** in the app, sent as `Authorization: Bearer `.'
  contact:
    name: Semilattice API
    url: https://semilattice.ai/
    email: support@semilattice.ai
  version: v1.0.0
servers:
- url: https://api.semilattice.ai
security:
- BearerAuth: []
tags:
- name: Simulations
  description: A simulation asks one or more user models questions (User Research) or sends their simulated users through a page or a flow (User Journey). It is planned first, then run once you have checked the plan.
paths:
  /v1/simulations:
    get:
      tags:
      - Simulations
      summary: List simulations
      description: 'List the caller''s simulations, newest first. Optionally filter by status

        or by project_id (projects group related simulations).'
      operationId: list_simulations_route_v1_simulations_get
      parameters:
      - name: status_filter
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Status Filter
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 20
          title: Limit
      - name: project_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Project Id
      - name: authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    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 /v1/simulations/{id}` until status is `planned` or

        `failed`.


        With project_id it joins round_id, or the project''s latest round. Refused

        with 409 while the agent in the app is replying on that project.'
      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'
  /v1/simulations/{simulation_id}:
    get:
      tags:
      - Simulations
      summary: Get a simulation
      description: 'Fetch a simulation by id. Poll it while the simulation plans and runs:

        it returns progress while running, and the synthesis, a Markdown report

        and the results once completed.'
      operationId: get_simulation_route_v1_simulations__simulation_id__get
      parameters:
      - name: simulation_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Simulation Id
      - name: authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Simulations
      summary: Move a simulation into a project
      description: 'Move a simulation into a project. Allowed only when the simulation has no

        project yet; it joins the project''s latest round (a first round is created

        for an empty project). Anything else returns 409.'
      operationId: move_simulation_route_v1_simulations__simulation_id__patch
      parameters:
      - name: simulation_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Simulation Id
      - name: authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MoveSimulationBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Simulations
      summary: Delete a simulation
      description: 'Delete a simulation you own, with its plan and results. This cannot be

        undone and discards a run the user paid for, so only call it on the user''s

        explicit yes for this simulation. Refused with 409 while it is planning or

        running.'
      operationId: delete_simulation_route_v1_simulations__simulation_id__delete
      parameters:
      - name: simulation_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Simulation Id
      - name: authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/simulations/{simulation_id}/plan:
    patch:
      tags:
      - Simulations
      summary: Edit the plan
      description: 'Edit the generated plan while the simulation is in status `planned`.


        Either replace the whole question set with `survey_questions`, or change

        particular questions with `question_edits`, `add_questions` and

        `delete_question_ids`, not both in one call. A replace reissues every

        question id and the response says so with `question_ids_reissued`.'
      operationId: update_plan_route_v1_simulations__simulation_id__plan_patch
      parameters:
      - name: simulation_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Simulation Id
      - name: authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePlanBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/simulations/{simulation_id}/run:
    post:
      tags:
      - Simulations
      summary: Run a simulation
      description: 'Run a `planned` simulation. It moves to `running` and runs in the

        background, taking from a few minutes to around half an hour. Poll

        `GET /v1/simulations/{id}` until it is `completed` or `failed`.'
      operationId: run_simulation_route_v1_simulations__simulation_id__run_post
      parameters:
      - name: simulation_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Simulation Id
      - name: authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/simulations/{simulation_id}/share:
    post:
      tags:
      - Simulations
      summary: Make a simulation public
      description: Make a simulation publicly viewable and return its shareable URL.
      operationId: share_simulation_route_v1_simulations__simulation_id__share_post
      parameters:
      - name: simulation_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Simulation Id
      - name: authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DesignCustomQuestion:
      properties:
        question_text:
          type: string
          minLength: 1
          title: Question Text
          description: 'The question, asked exactly as written. Respondents see only this text, so name what it asks about: ''Would you pay £45 a week for this meal kit?'', not ''Would you buy this?''.'
        answer_options:
          anyOf:
          - items:
              type: string
              minLength: 1
            type: array
            maxItems: 10
            minItems: 2
          - type: 'null'
          title: Answer Options
          description: Answer options, used exactly as given. Leave out to let the question writer supply them.
      additionalProperties: false
      type: object
      required:
      - question_text
      title: DesignCustomQuestion
    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
    UpdatePlanBody:
      properties:
        question_text:
          anyOf:
          - type: string
          - type: 'null'
          title: Question Text
          description: The simulation's title
        hypothesis_text:
          anyOf:
          - type: string
          - type: 'null'
          title: Hypothesis Text
          description: What you expect the answers to show
        survey_questions:
          anyOf:
          - items:
              $ref: '#/components/schemas/SurveyQuestionIn'
            type: array
          - type: 'null'
          title: Survey Questions
          description: Replaces the whole question set. Every question gets a new id, so ids from an earlier read are stale afterwards. Cannot be combined with question_edits, add_questions or delete_question_ids.
        question_edits:
          anyOf:
          - items:
              $ref: '#/components/schemas/QuestionEditIn'
            type: array
          - type: 'null'
          title: Question Edits
          description: Change particular questions by id. Only the fields sent change; every other question keeps its id.
        add_questions:
          anyOf:
          - items:
              $ref: '#/components/schemas/SurveyQuestionIn'
            type: array
          - type: 'null'
          title: Add Questions
          description: Questions appended after the existing ones.
        delete_question_ids:
          anyOf:
          - items:
              type: string
              format: uuid
            type: array
          - type: 'null'
          title: Delete Question Ids
          description: Ids of questions to delete.
        journey_task:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Journey Task
          description: 'Replaces the journey task. Its shape depends on the goal: see journey_task_shape on the goal in /v1/simulation-schema.'
      type: object
      title: UpdatePlanBody
    QuestionEditIn:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: The question's id, from `GET /v1/simulations/{id}`
        question_text:
          anyOf:
          - type: string
          - type: 'null'
          title: Question Text
          description: The question, asked exactly as written
        question_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Question Type
          description: 'How the question is answered: ''single_choice'' picks one of answer_options'
        answer_options:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Answer Options
          description: The answers to choose from, in order, e.g. from 'Very unlikely' to 'Very likely'
        insight:
          anyOf:
          - type: string
          - type: 'null'
          title: Insight
          description: What the answers to this question tell you
        variable_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Variable Name
          description: A short snake_case name for the question, e.g. 'likelihood_to_switch'
        order:
          anyOf:
          - type: integer
          - type: 'null'
          title: Order
          description: The question's position in the plan, from 0
        question_text_local:
          anyOf:
          - type: string
          - type: 'null'
          title: Question Text Local
          description: The question in the user model's own language, for a non-English user model. This is what respondents are asked; the English is kept alongside. Sent without question_text, the English is translated from it.
        answer_options_local:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Answer Options Local
          description: The answer options in the user model's own language, in the same order and the same count as answer_options.
      type: object
      required:
      - id
      title: QuestionEditIn
    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: uuid
          type: array
          title: User Model Ids
          description: One or more user-model ids to simulate against
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
          description: A name for the simulation. Leave it out and it is named from what it asks.
        project_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Project Id
          description: Optional project to add this simulation to; it joins the project's latest round (round 1 is created if none exists)
        survey_design:
          anyOf:
          - $ref: '#/components/schemas/SurveyDesign'
          - type: 'null'
          description: 'Research mode only. Fixes which questions are asked: one per item in each item set plus one per custom question. The question writer only words them. Leave out to let it decide what to ask. A malformed survey_design is a 422 like any other malformed field; a well-formed one that cannot be used (journey mode, nothing to ask, too many questions) is a 400.'
        context_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Context Id
          description: Context to plan against (from /v1/contexts). Defaults to your most recently updated context, else your organisation's. A simulation in a project plans against the project's context, so leave this out when passing project_id unless it names that same context.
        round_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Round Id
          description: Round of project_id to put this simulation in. Defaults to the project's latest round.
      type: object
      required:
      - mode
      - goal
      - user_model_ids
      title: CreateSimulationBody
    SurveyQuestionIn:
      properties:
        question_text:
          type: string
          title: Question Text
          description: The question, asked exactly as written
        question_type:
          type: string
          title: Question Type
          description: 'How the question is answered: ''single_choice'' picks one of answer_options'
          default: single_choice
        answer_options:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Answer Options
          description: The answers to choose from, in order, e.g. from 'Very unlikely' to 'Very likely'
        insight:
          anyOf:
          - type: string
          - type: 'null'
          title: Insight
          description: What the answers to this question tell you
        variable_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Variable Name
          description: A short snake_case name for the question, e.g. 'likelihood_to_switch'
        question_text_local:
          anyOf:
          - type: string
          - type: 'null'
          title: Question Text Local
          description: The question in the user model's own language, for a non-English user model. This is what respondents are asked; the English is kept alongside.
        answer_options_local:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Answer Options Local
          description: The answer options in the user model's own language, in the same order and the same count as answer_options.
      type: object
      required:
      - question_text
      title: SurveyQuestionIn
    SurveyDesign:
      properties:
        stimulus:
          anyOf:
          - type: string
          - type: 'null'
          title: Stimulus
          description: 'What is being tested: a concept, a message, a price. The question writer states it in every item set question. Custom questions are used as written and do not get it added.'
        item_sets:
          items:
            $ref: '#/components/schemas/DesignItemSet'
          type: array
          title: Item Sets
          description: Groups of items that each get their own question on one shared scale, so the items can be compared with each other.
        custom_questions:
          items:
            $ref: '#/components/schemas/DesignCustomQuestion'
          type: array
          title: Custom Questions
          description: Individual questions asked as written.
      additionalProperties: false
      type: object
      title: SurveyDesign
    MoveSimulationBody:
      properties:
        project_id:
          type: string
          format: uuid
          title: Project Id
          description: Project to move this simulation into. Only allowed when the simulation has no project yet; it joins the project's latest round.
      type: object
      required:
      - project_id
      title: MoveSimulationBody
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DesignItemSet:
      properties:
        ask:
          type: string
          minLength: 1
          title: Ask
          description: What is asked about every item in the set, e.g. 'How valuable would this feature be to you?'
        items:
          items:
            type: string
            minLength: 1
          type: array
          minItems: 2
          title: Items
          description: The things being compared. Each one gets its own question.
        scale:
          anyOf:
          - items:
              type: string
              minLength: 1
            type: array
            maxItems: 7
            minItems: 2
          - type: 'null'
          title: Scale
          description: Answer labels every question in the set uses, ordered from least to most favourable. Leave out to let the question writer pick one scale for the whole set.
      additionalProperties: false
      type: object
      required:
      - ask
      - items
      title: DesignItemSet
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer