> ## 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.

# Predict With Drivers

> Predict and return per-sample drivers in one call.



## OpenAPI

````yaml https://api.outerproduct.com/openapi.json post /v1/models/{model_id}/predict_with_drivers
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}/predict_with_drivers:
    post:
      tags:
        - inference
      summary: Predict With Drivers
      description: Predict and return per-sample drivers in one call.
      operationId: predict_with_drivers_v1_models__model_id__predict_with_drivers_post
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Model Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PredictWithDriversRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    PredictWithDriversRequest:
      properties:
        dataframe:
          $ref: '#/components/schemas/WireDataFrame-Input'
          description: Inline dataset spec; rows are materialized inside the worker.
        include_rules:
          type: boolean
          title: Include Rules
          description: >-
            When True, attach per-sample rule explanations to the response. Each
            rule is a small set of feature conditions that together characterize
            the model's prediction for that sample. When False, rules are
            skipped and the optional knobs below are inert.
          default: false
        max_rules:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Max Rules
          description: >-
            Maximum number of rules returned per sample. Optional; the service
            default applies when unset.
        max_depth:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Max Depth
          description: >-
            Maximum number of feature conditions allowed in a single rule.
            Optional; the service default applies when unset.
        min_support:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Min Support
          description: >-
            Minimum fraction of the reference dataset a rule must match.
            Optional; the service default applies when unset.
        max_features_considered:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Max Features Considered
          description: >-
            Maximum number of input features available to the rule computation
            per sample. Optional; the service default applies when unset.
      type: object
      required:
        - dataframe
      title: PredictWithDriversRequest
    JobResponse:
      properties:
        job_id:
          $ref: '#/components/schemas/ID'
          description: Server-assigned id of the submitted job
        status:
          $ref: '#/components/schemas/JobStatus'
        message:
          type: string
          title: Message
      type: object
      required:
        - job_id
        - status
        - message
      title: JobResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WireDataFrame-Input:
      properties:
        version:
          type: integer
          const: 1
          title: Version
          default: 1
        plan:
          additionalProperties: true
          type: object
          title: Plan
        columns:
          items:
            $ref: '#/components/schemas/FieldDef-Input'
          type: array
          title: Columns
      additionalProperties: false
      type: object
      required:
        - plan
        - columns
      title: WireDataFrame
    ID:
      anyOf:
        - type: string
          format: uuid
        - type: string
    JobStatus:
      type: string
      enum:
        - pending
        - running
        - completed
        - failed
      title: JobStatus
    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
    FieldDef-Input:
      properties:
        name:
          type: string
          title: Name
        datatype:
          $ref: '#/components/schemas/DataType-Input'
      additionalProperties: false
      type: object
      required:
        - name
        - datatype
      title: FieldDef
    DataType-Input:
      oneOf:
        - $ref: '#/components/schemas/String'
        - $ref: '#/components/schemas/Boolean'
        - $ref: '#/components/schemas/CategoricalString'
        - $ref: '#/components/schemas/CategoricalInteger'
        - $ref: '#/components/schemas/Integer'
        - $ref: '#/components/schemas/Real'
        - $ref: '#/components/schemas/Datetime-Input'
      discriminator:
        propertyName: kind
        mapping:
          boolean:
            $ref: '#/components/schemas/Boolean'
          categorical_integer:
            $ref: '#/components/schemas/CategoricalInteger'
          categorical_string:
            $ref: '#/components/schemas/CategoricalString'
          datetime:
            $ref: '#/components/schemas/Datetime-Input'
          integer:
            $ref: '#/components/schemas/Integer'
          real:
            $ref: '#/components/schemas/Real'
          string:
            $ref: '#/components/schemas/String'
    String:
      properties:
        kind:
          type: string
          const: string
          title: Kind
          default: string
      additionalProperties: false
      type: object
      title: String
    Boolean:
      properties:
        kind:
          type: string
          const: boolean
          title: Kind
          default: boolean
      additionalProperties: false
      type: object
      title: Boolean
    CategoricalString:
      properties:
        kind:
          type: string
          const: categorical_string
          title: Kind
          default: categorical_string
        values:
          items:
            type: string
          type: array
          title: Values
      additionalProperties: false
      type: object
      required:
        - values
      title: CategoricalString
    CategoricalInteger:
      properties:
        kind:
          type: string
          const: categorical_integer
          title: Kind
          default: categorical_integer
        values:
          items:
            type: integer
          type: array
          title: Values
      additionalProperties: false
      type: object
      required:
        - values
      title: CategoricalInteger
    Integer:
      properties:
        kind:
          type: string
          const: integer
          title: Kind
          default: integer
        bits:
          type: integer
          enum:
            - 8
            - 16
            - 32
            - 64
          title: Bits
        signed:
          type: boolean
          title: Signed
          default: true
        range:
          anyOf:
            - $ref: '#/components/schemas/Range_int_'
            - type: 'null'
      additionalProperties: false
      type: object
      required:
        - bits
      title: Integer
    Real:
      properties:
        kind:
          type: string
          const: real
          title: Kind
          default: real
        bits:
          type: integer
          enum:
            - 16
            - 32
            - 64
          title: Bits
        range:
          anyOf:
            - $ref: '#/components/schemas/Range_float_'
            - type: 'null'
      additionalProperties: false
      type: object
      required:
        - bits
      title: Real
    Datetime-Input:
      properties:
        kind:
          type: string
          const: datetime
          title: Kind
          default: datetime
      additionalProperties: false
      type: object
      title: Datetime
    Range_int_:
      properties:
        min:
          anyOf:
            - type: integer
            - type: 'null'
          title: Min
        max:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max
      additionalProperties: false
      type: object
      title: Range[int]
    Range_float_:
      properties:
        min:
          anyOf:
            - type: number
            - type: 'null'
          title: Min
        max:
          anyOf:
            - type: number
            - type: 'null'
          title: Max
      additionalProperties: false
      type: object
      title: Range[float]
  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>`.

````