> ## 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 Execution Job

> Persist one Python function and its portable arguments as a job.



## OpenAPI

````yaml https://api.outerproduct.com/openapi.json post /v1/execution_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/execution_jobs:
    post:
      tags:
        - execution
      summary: Create Execution Job
      description: Persist one Python function and its portable arguments as a job.
      operationId: create_execution_job_v1_execution_jobs_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExecutionRequest'
      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:
    ExecutionRequest:
      properties:
        serialized_function:
          type: string
          minLength: 1
          contentEncoding: base64
          contentMediaType: application/octet-stream
          title: Serialized Function
        serialization_python_version:
          $ref: '#/components/schemas/PythonVersion'
        environment:
          $ref: '#/components/schemas/Environment'
        resources:
          $ref: '#/components/schemas/Resources'
        arguments:
          $ref: '#/components/schemas/ExecutionArguments'
      additionalProperties: false
      type: object
      required:
        - serialized_function
        - serialization_python_version
        - environment
      title: ExecutionRequest
      description: One Python function plus independently portable arguments.
    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
    PythonVersion:
      type: string
      enum:
        - '3.12'
        - '3.13'
        - '3.14'
    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.
    ExecutionArguments:
      properties:
        positional:
          items:
            $ref: '#/components/schemas/ExecutionValue'
          type: array
          title: Positional
          default: []
        keyword:
          additionalProperties:
            $ref: '#/components/schemas/ExecutionValue'
          type: object
          title: Keyword
      additionalProperties: false
      type: object
      title: ExecutionArguments
    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
    ExecutionValue:
      oneOf:
        - $ref: '#/components/schemas/SerializableValue'
        - $ref: '#/components/schemas/LiteralValue'
      discriminator:
        propertyName: kind
        mapping:
          literal:
            $ref: '#/components/schemas/LiteralValue'
          serialized:
            $ref: '#/components/schemas/SerializableValue'
    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.
    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>`.

````