Semilattice User Models API

A user model is a simulated version of a specific group of people, built from real human data. Every simulation runs against one or more. A segment is a user model cut from another by its simulated users' attributes.

GitHub OpenAPI

Operations 4

GET /v1/user-models List user models #
GET /v1/user-models/{user_model_id}/attributes List a user model's attributes #
POST /v1/user-models/{user_model_id}/segments Create a segment #
PATCH /v1/user-models/{segment_id} Edit a segment #

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-user-models-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-user-models-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Semilattice User Models 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: User Models
  description: A user model is a simulated version of a specific group of people, built from real human data. Every simulation runs against one or more. A segment is a user model cut from another by its simulated users' attributes.
paths:
  /v1/user-models:
    get:
      tags:
      - User Models
      summary: List user models
      description: 'List user models available to run simulations against, with accuracy

        and metadata. Use the ids as `user_model_ids`. owned_by_org is true for

        your organisation''s own models and false for public ones.'
      operationId: list_user_models_route_v1_user_models_get
      parameters:
      - 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/user-models/{user_model_id}/attributes:
    get:
      tags:
      - User Models
      summary: List a user model's attributes
      description: 'List the attributes a user model''s simulated users carry (age, location,

        income...) with every stored value and how many simulated users hold it.

        Values are fixed tokens such as `east_midlands`, so read them here before

        creating a segment. Only user models built with Anacreon can be segmented,

        and a segment can''t be segmented again.'
      operationId: list_attributes_route_v1_user_models__user_model_id__attributes_get
      parameters:
      - name: user_model_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: User Model 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/user-models/{user_model_id}/segments:
    post:
      tags:
      - User Models
      summary: Create a segment
      description: 'Cut a segment out of a user model: the simulated users whose attributes

        match every filter. It joins your user models and runs like any other. A

        segment needs at least 100 simulated users; when the filters match fewer,

        the 400 says how many matched and nothing is created. It is shared with

        your organisation, or only you without one.'
      operationId: create_segment_route_v1_user_models__user_model_id__segments_post
      parameters:
      - name: user_model_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: User Model Id
      - name: authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSegmentBody'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/user-models/{segment_id}:
    patch:
      tags:
      - User Models
      summary: Edit a segment
      description: 'Change a segment you created: its name, description or filters. Leave

        out what stays the same. New filters replace the old ones whole and still

        need at least 100 simulated users. Once a simulation has used the segment

        its filters are locked, so that simulation''s results still describe the

        same people; you can still rename it.'
      operationId: edit_segment_route_v1_user_models__segment_id__patch
      parameters:
      - name: segment_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Segment Id
      - name: authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditSegmentBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    EditSegmentBody:
      properties:
        name:
          anyOf:
          - type: string
            maxLength: 200
          - type: 'null'
          title: Name
        description:
          anyOf:
          - type: string
            maxLength: 2000
          - type: 'null'
          title: Description
        filters:
          anyOf:
          - additionalProperties:
              items:
                type: string
              type: array
            type: object
          - type: 'null'
          title: Filters
          description: Replaces the segment's filters whole. Leave it out to keep them. Locked once a simulation has used the segment.
      type: object
      title: EditSegmentBody
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CreateSegmentBody:
      properties:
        name:
          type: string
          maxLength: 200
          minLength: 1
          title: Name
          description: A short name, e.g. 'Londoners 45-64'
        description:
          type: string
          maxLength: 2000
          title: Description
          default: ''
        filters:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
          title: Filters
          description: 'Each attribute mapped to the values to keep, using exact values from /v1/user-models/{id}/attributes, e.g. {"age": ["45-54", "55-64"], "location": ["london"]}. A simulated user is in the segment when their value is one of the listed values for every attribute given.'
      type: object
      required:
      - name
      - filters
      title: CreateSegmentBody
    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
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer