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

# Build Sip



## OpenAPI

````yaml post /api/v1/sip/build
openapi: 3.1.0
info:
  title: EDN Memory Engine
  version: 0.1.0
servers:
  - description: EDN evaluation endpoint
    url: https://api.tensorpro.ai
security:
  - EDNApiKey: []
paths:
  /api/v1/sip/build:
    post:
      summary: Build Sip
      operationId: build_sip_api_v1_sip_build_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuildSipRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuildSipResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    BuildSipRequest:
      properties:
        include_global:
          default: false
          title: Include Global
          type: boolean
        project_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Id
        query:
          anyOf:
            - type: string
            - type: 'null'
          title: Query
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
      title: BuildSipRequest
      type: object
    BuildSipResponse:
      properties:
        abstain:
          default: false
          title: Abstain
          type: boolean
        citations:
          default: []
          items:
            $ref: '#/components/schemas/SipCitation'
          title: Citations
          type: array
        grounded:
          default: false
          title: Grounded
          type: boolean
        records_used:
          title: Records Used
          type: integer
        sip:
          title: Sip
          type: string
        sip_sections:
          $ref: '#/components/schemas/SipSections'
        user_id:
          title: User Id
          type: string
      required:
        - sip
        - records_used
        - user_id
      title: BuildSipResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    SipCitation:
      description: >-
        One numbered, citable memory-context item (Stage 5).


        The index is 1-based and matches the [n] marker rendered into the SIP
        for

        project/grounded builds, so the console can resolve an inline [n] token
        in

        the model's answer back to its governed source and provenance. source_id

        and source_title are populated only when the record came from a project

        source document; general/global facts and pre-Stage-1 rows leave them
        null.
      properties:
        index:
          title: Index
          type: integer
        provenance:
          title: Provenance
          type: string
        record_id:
          title: Record Id
          type: string
        source_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Id
        source_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Title
        summary:
          title: Summary
          type: string
      required:
        - index
        - record_id
        - summary
        - provenance
      title: SipCitation
      type: object
    SipSections:
      description: >-
        The structured five-section SIP (Fix 3), additive to the flat `sip`
        string.


        Sections mirror ``services/sip/builder.build_sip``:
          - identity:          USER_STATED / USER_CONFIRMED records
          - active_context:    remaining FACTUAL records (DOCUMENT_VERIFIED,
                               AI_INFERRED marked inference_only, ROUND)
          - preferences:       PREFERENCE-type records
          - calibration_notes: empty passthrough owned by Track B (UCE); never
                               fabricated here
          - uncertain_facts:   AI_GENERATED records, marked uncertain

        Retrieval gates the live candidate set to FACTUAL + SIP_ELIGIBLE, so on
        the

        live path preferences and uncertain_facts are empty by construction.
        This is

        additive: existing consumers keep reading the flat `sip` string and may

        ignore this field entirely.
      properties:
        active_context:
          items:
            additionalProperties: true
            type: object
          title: Active Context
          type: array
        calibration_notes:
          additionalProperties: true
          title: Calibration Notes
          type: object
        identity:
          items:
            additionalProperties: true
            type: object
          title: Identity
          type: array
        preferences:
          items:
            additionalProperties: true
            type: object
          title: Preferences
          type: array
        uncertain_facts:
          items:
            additionalProperties: true
            type: object
          title: Uncertain Facts
          type: array
      title: SipSections
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    EDNApiKey:
      description: >-
        EDN API key presented as 'Bearer <key>' in the Authorization header.
        Create and manage keys from the Console.
      in: header
      name: Authorization
      type: apiKey

````