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

# Get Schema

> Return the persisted schema manifest for a model.

Served directly from S3 (``orgs/{org_id}/models/{model_id}/schema.json``) --
no model load required. Raises if the manifest is missing, since every
persisted model writes one.



## OpenAPI

````yaml https://api.outerproduct.com/openapi.json get /v1/models/{model_id}/schema
openapi: 3.1.0
info:
  title: OuterProduct API
  description: >-
    Public-facing REST API for OuterProduct model distillation, prediction, and
    explanation.
  version: 0.1.8
servers: []
security: []
paths:
  /v1/models/{model_id}/schema:
    get:
      tags:
        - inference
      summary: Get Schema
      description: >-
        Return the persisted schema manifest for a model.


        Served directly from S3
        (``orgs/{org_id}/models/{model_id}/schema.json``) --

        no model load required. Raises if the manifest is missing, since every

        persisted model writes one.
      operationId: get_schema_v1_models__model_id__schema_get
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Model Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaManifest'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    SchemaManifest:
      properties:
        feature_names:
          items:
            type: string
          type: array
          title: Feature Names
        columns:
          additionalProperties:
            $ref: '#/components/schemas/SchemaColumn'
          type: object
          title: Columns
        target:
          $ref: '#/components/schemas/SchemaTarget'
        is_sequence:
          type: boolean
          title: Is Sequence
          default: false
        id_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Id Column
        timestamp_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Timestamp Column
      additionalProperties: false
      type: object
      required:
        - feature_names
        - columns
        - target
      title: SchemaManifest
      description: >-
        Sidecar at ``traces/{org}/{model}/schema.json``.


        Written by ``api.schemas.builder.build_schema_manifest_from_schema``

        after training; read by the inference server when materializing a
        request

        DataFrame so categorical codes line up with what the model was trained
        on.

        The public HTTP response for GET /schema is served from this type
        directly

        — the on-disk sidecar and HTTP shape share one definition because
        they're

        identical.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SchemaColumn:
      properties:
        dtype:
          type: string
          enum:
            - float
            - int
            - bool
            - categorical
          title: Dtype
        categories:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Categories
        unknown_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Unknown Code
      additionalProperties: false
      type: object
      required:
        - dtype
      title: SchemaColumn
      description: |-
        Per-feature dtype plus, for categoricals, the learned codebook.

        ``categories`` is the sorted unique-value list the model was trained on.
        ``unknown_code`` is the sentinel integer used for values not seen at
        training time (defaults to -1 in the training).
    SchemaTarget:
      properties:
        dtype:
          type: string
          enum:
            - float
            - int
            - bool
          title: Dtype
      additionalProperties: false
      type: object
      required:
        - dtype
      title: SchemaTarget
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key or OAuth2/OIDC access token
      description: >-
        An API key or OAuth2/OIDC access token sent as `Authorization: Bearer
        <token>`.

````