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

# CreateCall

> Snapshots one child Call in its Run. Root Calls are created with Runs.



## OpenAPI

````yaml /http-api-reference/openapi.json post /outerproduct.run.v1alpha.RunService/CreateCall
openapi: 3.1.0
info:
  title: OuterProduct Control Plane API
  description: >-
    Control-plane Connect RPCs over HTTP with ProtoJSON request and response
    bodies.
  version: v1alpha
servers:
  - url: https://api.outerproduct.com
security:
  - bearerAuth: []
tags:
  - name: ApiKey
    description: |-
      Manages the current user's application-owned personal access tokens.
       External sign-in is required; personal and execution tokens cannot manage keys.
  - name: BillingAccount
    description: >-
      How a workspace pays: its prepaid balance, topped up through the payment
      processor and spent
       by its usage.
  - name: Image
    description: >-
      The image registry: OCI distribution over its storage, whose formats are
      its own. The
       control plane serves it to users, admitting each only to their workspace's repository, and
       forwards to the OCI registry. Manifests and blobs are addressed by digest and never
       replaced; tags name manifests.
  - name: ImageBuilder
    description: >-
      Builds Images from image specs, and runs their install steps, each adding
      layers to its
       parent image, and package builds, each one pinned package's layer on its base, which
       install steps merge rather than install. The control plane serves `SubmitImageBuild`
       and `WaitImageBuild` to users, and forwards them to the scheduler's, which imports each
       image spec's base through the OCI registry, places each install step and package build on a
       node that builds, and tags the image it built in its workspace's repository. Those nodes
       serve the steps to the scheduler, by the scheduler's certificate, and run each in the
       sandbox the scheduler placed it in.
  - name: Policy
    description: >-
      Resource access policies evaluated by the application's Cedar authorizer.
      A policy belongs to
       the workspace of the credential that created it and governs only that workspace and what it
       owns; deployment-wide grants belong to the operator's policy.
  - name: Run
    description: >-
      Submits and observes product Runs, their Calls, and the Calls' Attempts.
      Every Run
       owns one rooted Call tree.
  - name: Secret
  - name: User
    description: / User crud service
  - name: Volume
  - name: Workspace
    description: >-
      The workspace a request's credential is bound to, and its members. A
      session starts bound
       to its user's workspace and may switch to another the user belongs to; an API key stays bound
       to the workspace it was created in. Requests act in the bound workspace.
paths:
  /outerproduct.run.v1alpha.RunService/CreateCall:
    post:
      tags:
        - Run
      summary: CreateCall
      description: Snapshots one child Call in its Run. Root Calls are created with Runs.
      operationId: outerproduct.run.v1alpha.RunService.CreateCall
      parameters:
        - name: Connect-Protocol-Version
          in: header
          description: Define the version of the Connect protocol
          required: true
          schema:
            $ref: '#/components/schemas/connect-protocol-version'
          example: 1
        - name: Connect-Timeout-Ms
          in: header
          description: Define the timeout, in ms
          schema:
            $ref: '#/components/schemas/connect-timeout-header'
          example: 1000
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/outerproduct.run.v1alpha.CreateCallRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/outerproduct.run.v1alpha.Call'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
components:
  schemas:
    connect-protocol-version:
      type: number
      examples:
        - 1
      title: Connect-Protocol-Version
      description: Define the version of the Connect protocol
      const: 1
    connect-timeout-header:
      type: number
      examples:
        - 1000
      title: Connect-Timeout-Ms
      description: Define the timeout, in ms
    outerproduct.run.v1alpha.CreateCallRequest:
      type: object
      properties:
        parent:
          type: string
          title: parent
        call:
          allOf:
            - $ref: '#/components/schemas/outerproduct.run.v1alpha.Call'
          title: call
      title: CreateCallRequest
      required:
        - call
      additionalProperties: false
    outerproduct.run.v1alpha.Call:
      type: object
      properties:
        name:
          type: string
          title: name
          pattern: ^runs/[0-9a-f-]{36}/calls/[0-9a-f]{64}$
          description: Resource name in the form `runs/{run}/calls/{call}`.
        parentCall:
          type:
            - string
            - 'null'
          title: parent_call
          description: Call that emitted this Call. Absent for the root.
        childIndex:
          type: integer
          title: child_index
          description: >-
            Zero-based order of this Call among `parent_call`'s children. Replay
            emits
             the same Call at the same index. Always 0 for the root Call, which has no
             `parent_call`.
        spec:
          allOf:
            - $ref: '#/components/schemas/outerproduct.run.v1alpha.CallSpec'
          title: spec
          description: >-
            The function, arguments, and execution requirements of every
            Attempt.
        state:
          allOf:
            - $ref: '#/components/schemas/outerproduct.run.v1alpha.Call.State'
          title: state
          description: Current externally observable lifecycle state.
        attemptCount:
          type: integer
          title: attempt_count
          description: Number of Attempt resources created for this Call.
        output:
          type:
            - string
            - 'null'
          title: output
          format: byte
          description: cloudpickle of the successful return value of the latest Attempt.
        outputRepr:
          type:
            - string
            - 'null'
          title: output_repr
          description: >-
            Truncated `repr` of the successful return value of the latest
            Attempt.
        errorMessage:
          type:
            - string
            - 'null'
          title: error_message
          description: >-
            Terminal failure explanation from the latest Attempt, when one
            exists.
        created_at:
          allOf:
            - $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: created_at
          description: Time the Call was durably snapshotted into this Run.
        started_at:
          allOf:
            - $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: started_at
          description: Earliest time any Attempt first transitioned to running.
        updated_at:
          allOf:
            - $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: updated_at
          description: Most recent observed lifecycle transition across all Attempts.
        finished_at:
          allOf:
            - $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: finished_at
          description: Time the latest Attempt completed, when the Call is terminal.
        created_by:
          type:
            - string
            - 'null'
          title: created_by
          description: User that created the owning Run.
        hasChildren:
          type:
            - boolean
            - 'null'
          title: has_children
          description: >-
            Child existence at read time. Populated by GetCall and ListCalls,
            not execution responses.
        workspace:
          type: string
          title: workspace
          description: |-
            The workspace that owns the Call's Run.

             cf. Zitadel `resource_owner`.
      title: Call
      required:
        - spec
      additionalProperties: false
      description: |-
        One logical function invocation within a product Run.

         A Call is stable across execution attempts. The resource leaf is the
         lowercase hexadecimal SHA-256 digest of its Run, `parent_call`, and
         `child_index`.
         Attempt-specific execution identity lives on child Attempt resources; this
         resource is their summary.
    connect.error:
      type: object
      properties:
        code:
          type: string
          examples:
            - not_found
          enum:
            - canceled
            - unknown
            - invalid_argument
            - deadline_exceeded
            - not_found
            - already_exists
            - permission_denied
            - resource_exhausted
            - failed_precondition
            - aborted
            - out_of_range
            - unimplemented
            - internal
            - unavailable
            - data_loss
            - unauthenticated
          description: >-
            The status code, which should be an enum value of
            [google.rpc.Code][google.rpc.Code].
        message:
          type: string
          description: >-
            A developer-facing error message, which should be in English. Any
            user-facing error message should be localized and sent in the
            [google.rpc.Status.details][google.rpc.Status.details] field, or
            localized by the client.
        details:
          type: array
          items:
            $ref: '#/components/schemas/connect.error_details.Any'
          description: >-
            A list of messages that carry the error details. There is no limit
            on the number of messages.
      title: Connect Error
      additionalProperties: true
      description: >-
        Error type returned by Connect:
        https://connectrpc.com/docs/go/errors/#http-representation
    outerproduct.run.v1alpha.CallSpec:
      type: object
      properties:
        function:
          type: string
          title: function
          minLength: 1
          description: |-
            `module:qualname` of the callable, which each Attempt imports with
             `pkgutil.resolve_name` from its `file_mounts`.
        arguments:
          type: string
          title: arguments
          format: byte
          description: cloudpickle of `(args, kwargs)`.
        computeSpec:
          allOf:
            - $ref: '#/components/schemas/outerproduct.run.v1alpha.ComputeSpec'
          title: compute_spec
        image:
          allOf:
            - $ref: '#/components/schemas/outerproduct.image.v1alpha.ImageSpec'
          title: image
          description: >-
            The image spec of the Image each Attempt runs, which the scheduler
            builds as the Attempt
             waits to run.
        volumeMounts:
          type: object
          title: volume_mounts
          additionalProperties:
            allOf:
              - $ref: >-
                  #/components/schemas/outerproduct.sandbox.v1alpha.VolumeMountSpec
            title: value
          description: Keyed by absolute container path.
        envVars:
          type: object
          title: env_vars
          additionalProperties:
            allOf:
              - $ref: '#/components/schemas/outerproduct.run.v1alpha.EnvVar'
            title: value
          description: Container environment, keyed by variable name.
        retryStrategy:
          allOf:
            - $ref: '#/components/schemas/outerproduct.run.v1alpha.RetryStrategy'
          title: retry_strategy
          description: Omission allows one Attempt.
        summary:
          allOf:
            - $ref: '#/components/schemas/outerproduct.run.v1alpha.FunctionSummary'
          title: summary
          description: >-
            Display-only description of `function` and `arguments`, recorded by
            the Python API.
        fileMounts:
          type: array
          items:
            type: string
          title: file_mounts
          description: >-
            Images converted from file mounts, placed over the image when each
            container
             starts, rather than built into it; later file mounts win where paths overlap.
        displayName:
          type: string
          title: display_name
          description: >-
            Display label for this Call, and for its Run when this is the root
            Call.
        sourceFileMounts:
          type: object
          title: source_file_mounts
          additionalProperties:
            type: string
            title: value
          description: >-
            Source file mounts' Images, keyed by Python package or standalone
            module.
             Values also appear in file_mounts.
        port:
          type: integer
          title: port
          description: >-
            A port the function serves while it runs, which the URL of the
            sandbox each Attempt
             runs in serves to anyone.
        timeout:
          allOf:
            - $ref: '#/components/schemas/google.protobuf.Duration'
          title: timeout
          description: >-
            How long each Attempt may run; unset, up to 24 hours. Nodes do not
            enforce it yet.
      title: CallSpec
      additionalProperties: false
      description: >-
        Everything needed to execute a Call. The control plane accepts
        references
         in `volume_mounts` and `env_vars` and forwards them resolved to the scheduler.
    outerproduct.run.v1alpha.Call.State:
      type: string
      title: State
      enum:
        - STATE_UNSPECIFIED
        - STATE_RUNNING
        - STATE_COMPLETED
        - STATE_FAILED
        - STATE_CANCELLED
        - STATE_CANCELLING
    google.protobuf.Timestamp:
      type: string
      examples:
        - '2023-01-15T01:30:15.01Z'
        - '2024-12-25T12:00:00Z'
      format: date-time
      description: >-
        A point in time in RFC 3339 format, with up to nanosecond precision.
        Output uses UTC (`Z`); input may use an offset from UTC.
    connect.error_details.Any:
      type: object
      properties:
        type:
          type: string
          description: >-
            A URL that acts as a globally unique identifier for the type of the
            serialized message. For example:
            `type.googleapis.com/google.rpc.ErrorInfo`.
        value:
          type: string
          format: binary
          description: >-
            The Protobuf message, serialized as bytes and base64-encoded. The
            specific message type is identified by the `type` field.
        debug:
          type: object
          title: Debug
          additionalProperties: true
          description: >-
            Deserialized error detail payload. The 'type' field indicates the
            schema. This field is for easier debugging and should not be relied
            upon for application logic.
      additionalProperties: true
      description: >-
        Contains an arbitrary serialized message along with a @type that
        describes the type of the serialized message, with an additional debug
        field for ConnectRPC error details.
    outerproduct.run.v1alpha.ComputeSpec:
      type: object
      properties:
        cpus:
          type: integer
          title: cpus
        memoryBytes:
          type: string
          title: memory_bytes
          format: int64
          description: Container RAM, including anything written to /dev/shm.
        accelerator:
          type: string
          title: accelerator
        acceleratorCount:
          type: integer
          title: accelerator_count
      title: ComputeSpec
      additionalProperties: false
      description: >-
        Caller hardware requirements. Scheduling configuration belongs to the
        service.
    outerproduct.image.v1alpha.ImageSpec:
      type: object
      properties:
        base:
          type: string
          title: base
          maxLength: 1024
          minLength: 1
          description: Container image, given as a registry tag or digest.
        steps:
          type: array
          items:
            $ref: '#/components/schemas/outerproduct.image.v1alpha.ImageStep'
          title: steps
          maxItems: 64
          description: Ordered steps, each built on its predecessor.
      title: ImageSpec
      additionalProperties: false
      description: A base image and ordered build steps.
    outerproduct.sandbox.v1alpha.VolumeMountSpec:
      type: object
      properties:
        source:
          type: string
          title: source
          description: volumes/<name>
        uid:
          type: string
          title: uid
          description: Immutable identity of the resolved Volume.
        readOnly:
          type: boolean
          title: read_only
        uri:
          type: string
          title: uri
          description: Storage location of `source`.
      title: VolumeMountSpec
      additionalProperties: false
      description: >-
        The control plane accepts a `source` alone and resolves `uri` and
        credentials.
    outerproduct.run.v1alpha.EnvVar:
      type: object
      allOf:
        - oneOf:
            - required:
                - value
            - required:
                - secret
      anyOf:
        - type: object
          properties:
            secret:
              allOf:
                - $ref: '#/components/schemas/outerproduct.run.v1alpha.Secret'
              title: secret
          title: secret
        - type: object
          properties:
            value:
              type: string
              title: value
          title: value
      unevaluatedProperties: false
      not:
        allOf:
          - anyOf:
              - required:
                  - secret
              - required:
                  - value
          - not:
              oneOf:
                - required:
                    - secret
                - required:
                    - value
      title: EnvVar
    outerproduct.run.v1alpha.RetryStrategy:
      type: object
      properties:
        maxAttempts:
          type: integer
          title: max_attempts
          minimum: 1
          description: Total number of Attempts, including the first. Must be at least one.
      title: RetryStrategy
      additionalProperties: false
      description: Automatic retries of the same invocation. Cancellation is never retried.
    outerproduct.run.v1alpha.FunctionSummary:
      type: object
      properties:
        name:
          type: string
          title: name
          description: '`__qualname__` of the callable.'
        source:
          type: string
          title: source
          description: Source of the callable, when Python can find it.
        arguments:
          type: array
          items:
            $ref: '#/components/schemas/outerproduct.run.v1alpha.Argument'
          title: arguments
          description: >-
            Truncated `repr` of each argument, named by its parameter when it
            binds.
      title: FunctionSummary
      additionalProperties: false
      description: What a person needs to recognize a Call; execution never reads it.
    google.protobuf.Duration:
      type: string
      format: duration
      description: >-
        A signed duration in seconds, with up to nine fractional digits and an
        `s` suffix (for example, `3s` or `-0.001s`).
    outerproduct.image.v1alpha.ImageStep:
      type: object
      allOf:
        - oneOf:
            - required:
                - uvPipInstall
      anyOf:
        - type: object
          properties:
            uvPipInstall:
              allOf:
                - $ref: '#/components/schemas/outerproduct.image.v1alpha.UvPipInstall'
              title: uv_pip_install
          title: uv_pip_install
      unevaluatedProperties: false
      title: ImageStep
    outerproduct.run.v1alpha.Secret:
      type: object
      properties:
        name:
          type: string
          title: name
          description: Empty only for values the control plane injects itself.
        uid:
          type: string
          title: uid
          description: Immutable identity of the resolved Secret.
      title: Secret
      additionalProperties: false
      description: A generic Secret whose UTF-8 value becomes the variable's value.
    outerproduct.run.v1alpha.Argument:
      type: object
      properties:
        name:
          type: string
          title: name
        value:
          type: string
          title: value
      title: Argument
      additionalProperties: false
    outerproduct.image.v1alpha.UvPipInstall:
      type: object
      properties:
        packages:
          type: array
          items:
            type: string
            maxLength: 512
            minLength: 1
          title: packages
          maxItems: 256
          minItems: 1
      title: UvPipInstall
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      description: A user session token or personal API key.
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.