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

# Create Job

> Compile one public job definition into a durable computation graph.



## OpenAPI

````yaml https://api.outerproduct.com/openapi.json post /v1/jobs
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/jobs:
    post:
      tags:
        - jobs
      summary: Create Job
      description: Compile one public job definition into a durable computation graph.
      operationId: create_job_v1_jobs_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateJobRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobSubmissionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    CreateJobRequest:
      properties:
        definition:
          $ref: '#/components/schemas/JobDefinition'
      type: object
      required:
        - definition
      title: CreateJobRequest
      description: Submit a user graph or a managed workflow through one jobs surface.
    JobSubmissionResponse:
      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: JobSubmissionResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    JobDefinition:
      oneOf:
        - $ref: '#/components/schemas/ComputationGraphDefinition'
        - $ref: '#/components/schemas/ReasoningDefinition'
      discriminator:
        propertyName: kind
        mapping:
          computation_graph:
            $ref: '#/components/schemas/ComputationGraphDefinition'
          reasoning:
            $ref: '#/components/schemas/ReasoningDefinition'
    ID:
      anyOf:
        - type: string
          format: uuid
        - type: string
    JobStatus:
      type: string
      enum:
        - pending
        - running
        - completed
        - failed
        - cancelled
      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
    ComputationGraphDefinition:
      properties:
        kind:
          type: string
          const: computation_graph
          title: Kind
          default: computation_graph
        graph:
          $ref: '#/components/schemas/ComputationGraphSpec'
      additionalProperties: false
      type: object
      required:
        - graph
      title: ComputationGraphDefinition
      description: A complete declarative computation graph.
    ReasoningDefinition:
      properties:
        kind:
          type: string
          const: reasoning
          title: Kind
          default: reasoning
        model_id:
          $ref: '#/components/schemas/ID'
          description: >-
            Existing trained model to equip with reasoning capabilities. The
            model must satisfy the DiffModel contract and retain its training
            data provenance.
        random_state:
          type: integer
          title: Random State
          description: Seed controlling reproducible reasoning-model fitting.
          default: 42
      additionalProperties: false
      type: object
      required:
        - model_id
      title: ReasoningDefinition
      description: Build a reasoning model from one existing trained model.
    ComputationGraphSpec:
      properties:
        inputs:
          items:
            $ref: '#/components/schemas/ComputationGraphInput'
          type: array
          title: Inputs
          default: []
        nodes:
          items:
            $ref: '#/components/schemas/ComputationGraphNodeSpec'
          type: array
          title: Nodes
        outputs:
          items:
            $ref: '#/components/schemas/ComputationGraphOutput'
          type: array
          title: Outputs
      additionalProperties: false
      type: object
      required:
        - nodes
        - outputs
      title: ComputationGraphSpec
      description: A complete, static, topologically ordered computation graph.
    ComputationGraphInput:
      properties:
        module:
          type: string
          minLength: 1
          title: Module
        qualname:
          type: string
          minLength: 1
          title: Qualname
        serialized_value:
          type: string
          contentEncoding: base64
          contentMediaType: application/octet-stream
          title: Serialized Value
        name:
          type: string
          minLength: 1
          title: Name
      additionalProperties: false
      type: object
      required:
        - module
        - qualname
        - serialized_value
        - name
      title: ComputationGraphInput
      description: A named value supplied once and bindable by root or downstream nodes.
    ComputationGraphNodeSpec:
      oneOf:
        - $ref: '#/components/schemas/ComputationGraphNode'
        - $ref: '#/components/schemas/PlatformComputationGraphNode'
      discriminator:
        propertyName: kind
        mapping:
          platform:
            $ref: '#/components/schemas/PlatformComputationGraphNode'
          python:
            $ref: '#/components/schemas/ComputationGraphNode'
    ComputationGraphOutput:
      properties:
        name:
          type: string
          minLength: 1
          title: Name
        node_key:
          type: string
          minLength: 1
          title: Node Key
        output_name:
          type: string
          const: result
          title: Output Name
          default: result
      additionalProperties: false
      type: object
      required:
        - name
        - node_key
      title: ComputationGraphOutput
      description: One named job result projected from a graph node.
    ComputationGraphNode:
      properties:
        kind:
          type: string
          const: python
          title: Kind
          default: python
        key:
          type: string
          minLength: 1
          title: Key
        node_type:
          type: string
          maxLength: 128
          minLength: 1
          title: Node Type
          default: python/run
        serialized_function:
          type: string
          minLength: 1
          contentEncoding: base64
          contentMediaType: application/octet-stream
          title: Serialized Function
        serialization_python_version:
          $ref: '#/components/schemas/PythonVersion'
        arguments:
          $ref: '#/components/schemas/ComputationGraphArguments'
        environment:
          $ref: '#/components/schemas/Environment'
        resources:
          $ref: '#/components/schemas/Resources'
        depends_on:
          items:
            type: string
          type: array
          title: Depends On
          default: []
      additionalProperties: false
      type: object
      required:
        - key
        - serialized_function
        - serialization_python_version
        - environment
      title: ComputationGraphNode
      description: One user-owned Python task in a topologically ordered graph.
    PlatformComputationGraphNode:
      properties:
        kind:
          type: string
          const: platform
          title: Kind
          default: platform
        key:
          type: string
          minLength: 1
          title: Key
        operation:
          $ref: '#/components/schemas/PlatformOperation'
        arguments:
          $ref: '#/components/schemas/ComputationGraphArguments'
        depends_on:
          items:
            type: string
          type: array
          title: Depends On
          default: []
      additionalProperties: false
      type: object
      required:
        - key
        - operation
      title: PlatformComputationGraphNode
      description: One deployment-owned operation in an otherwise ordinary graph.
    PythonVersion:
      type: string
      enum:
        - '3.12'
        - '3.13'
        - '3.14'
    ComputationGraphArguments:
      properties:
        positional:
          items:
            $ref: '#/components/schemas/ComputationGraphArgument'
          type: array
          title: Positional
          default: []
        keyword:
          additionalProperties:
            $ref: '#/components/schemas/ComputationGraphArgument'
          type: object
          title: Keyword
      additionalProperties: false
      type: object
      title: ComputationGraphArguments
    Environment:
      properties:
        python_version:
          $ref: '#/components/schemas/PythonVersion'
          default: '3.12'
        pypi_dependencies:
          items:
            type: string
          type: array
          title: Pypi Dependencies
          default: []
        environment_variables:
          additionalProperties:
            type: string
          type: object
          title: Environment Variables
      additionalProperties: false
      type: object
      title: Environment
      description: >-
        A reproducible Python runtime for an execution.


        Cloudpickle, PyArrow, Pydantic, ``outerproduct-dataframe``,

        ``outerproduct-hpo``, and ``outerproduct-serialization`` are supplied
        and

        versioned by the execution runtime. Environment variables are invocation

        inputs rather than image inputs, so changing one does not invalidate the

        dependency image cache. They are ordinary, non-secret values; secret

        injection is a separate runtime capability.
    Resources:
      properties:
        cpu:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: 'null'
          title: Cpu
        memory_mib:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
            - type: 'null'
          title: Memory Mib
        gpu:
          anyOf:
            - type: string
            - type: 'null'
          title: Gpu
        timeout_seconds:
          type: integer
          maximum: 3600
          minimum: 1
          title: Timeout Seconds
          default: 300
      additionalProperties: false
      type: object
      title: Resources
      description: Compute capacity and deadline requested for one execution.
    PlatformOperation:
      type: string
      enum:
        - training.initialize
        - training.fit
        - training.prepare_trial
        - training.reduce
        - training.publish
    ComputationGraphArgument:
      oneOf:
        - $ref: '#/components/schemas/GraphInputArgument'
        - $ref: '#/components/schemas/SerializableValue'
        - $ref: '#/components/schemas/LiteralValue'
        - $ref: '#/components/schemas/ComputationNodeOutputArgument'
      discriminator:
        propertyName: kind
        mapping:
          graph_input:
            $ref: '#/components/schemas/GraphInputArgument'
          literal:
            $ref: '#/components/schemas/LiteralValue'
          node_output:
            $ref: '#/components/schemas/ComputationNodeOutputArgument'
          serialized:
            $ref: '#/components/schemas/SerializableValue'
    GraphInputArgument:
      properties:
        kind:
          type: string
          const: graph_input
          title: Kind
          default: graph_input
        input_name:
          type: string
          minLength: 1
          title: Input Name
      additionalProperties: false
      type: object
      required:
        - input_name
      title: GraphInputArgument
    SerializableValue:
      properties:
        module:
          type: string
          minLength: 1
          title: Module
        qualname:
          type: string
          minLength: 1
          title: Qualname
        serialized_value:
          type: string
          contentEncoding: base64
          contentMediaType: application/octet-stream
          title: Serialized Value
        kind:
          type: string
          const: serialized
          title: Kind
          default: serialized
      additionalProperties: false
      type: object
      required:
        - module
        - qualname
        - serialized_value
      title: SerializableValue
      description: One value reconstructed by its owning type inside compute.
    LiteralValue:
      properties:
        kind:
          type: string
          const: literal
          title: Kind
          default: literal
        value:
          $ref: '#/components/schemas/JsonValue'
      additionalProperties: false
      type: object
      required:
        - value
      title: LiteralValue
      description: A JSON literal passed through the computation boundary unchanged.
    ComputationNodeOutputArgument:
      properties:
        kind:
          type: string
          const: node_output
          title: Kind
          default: node_output
        node_key:
          type: string
          minLength: 1
          title: Node Key
        output_name:
          type: string
          const: result
          title: Output Name
          default: result
      additionalProperties: false
      type: object
      required:
        - node_key
      title: ComputationNodeOutputArgument
    JsonValue: {}
  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>`.

````