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

# Process Application By Alias



## OpenAPI

````yaml https://app.stainlessapi.com/api/spec/documented/sgp/openapi.yml post /v4/applications/process/{application_alias}
openapi: 3.1.0
info:
  title: EGP API V4
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
tags:
  - name: Models
    description: Model API.
paths:
  /v4/applications/process/{application_alias}:
    post:
      tags:
        - Applications
      summary: Process Application By Alias
      operationId: POST-V4-/applications/process/{application_alias}
      parameters:
        - name: application_alias
          in: path
          required: true
          schema:
            type: string
            title: Application Alias
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationProcessingRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationProcessingErrorResponse'
          description: Internal Server Error
      security:
        - APIKeyHeader: []
components:
  schemas:
    ApplicationProcessingRequest:
      properties:
        inputs:
          additionalProperties: true
          type: object
          title: Inputs
          description: >-
            Input data for the application. For agents service variants, you
            must provide inputs as a mapping from `{input_name: input_value}`.
            For V0 variants, you must specify the node your input should be
            passed to, structuring your input as `{node_id: {input_name:
            input_value}}`.
        history:
          title: History
          description: History of the application
          default: []
          items:
            $ref: '#/components/schemas/ApplicationRequestResponsePair'
          type: array
        overrides:
          anyOf:
            - $ref: '#/components/schemas/AgenticApplicationOverrides'
            - additionalProperties:
                $ref: '#/components/schemas/KnowledgeBaseNodeOverride'
              type: object
          title: Overrides
          description: Optional overrides for the application
        stream:
          title: Stream
          description: >-
            Control to have streaming of the endpoint. If the last node before
            the output is a completion node, you can set this to true to get the
            output as soon as the completion node has a token
          default: false
          type: boolean
        operation_metadata:
          title: Operation Metadata
          description: >-
            Arbitrary user-defined metadata that can be attached to the process
            operations and will be registered in the interaction.
          additionalProperties: true
          type: object
      type: object
      required:
        - inputs
      title: ApplicationProcessingRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ApplicationProcessingErrorResponse:
      properties:
        sgp_error_code:
          type: string
          const: APPLICATION_PROCESSING_ERROR
          title: Sgp Error Code
          default: APPLICATION_PROCESSING_ERROR
        error_code:
          $ref: '#/components/schemas/ApplicationProcessingErrorCode'
        message:
          type: string
          title: Message
        detail:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
          title: Detail
      additionalProperties: true
      type: object
      required:
        - error_code
        - message
      title: ApplicationProcessingErrorResponse
    ApplicationRequestResponsePair:
      properties:
        request:
          type: string
          title: Request
          description: Request inputs
        response:
          type: string
          title: Response
          description: Response outputs
        session_data:
          title: Session Data
          description: Session data corresponding to the request response pair
          default: {}
          additionalProperties: true
          type: object
      type: object
      required:
        - request
        - response
      title: ApplicationRequestResponsePair
    AgenticApplicationOverrides:
      properties:
        concurrent:
          type: boolean
          title: Concurrent
          default: false
        use_channels:
          type: boolean
          title: Use Channels
          default: false
        initial_state:
          $ref: '#/components/schemas/MachineState'
        partial_trace:
          title: Partial Trace
          items:
            $ref: '#/components/schemas/LegacySpan'
          type: array
        return_span:
          type: boolean
          title: Return Span
          default: true
      additionalProperties: false
      type: object
      title: AgenticApplicationOverrides
      description: Execution override options for agentic applications
    KnowledgeBaseNodeOverride:
      properties:
        type:
          type: string
          const: knowledge_base_schema
          title: Type
          default: knowledge_base_schema
        artifact_ids_filter:
          items:
            type: string
          type: array
          title: Artifact Ids Filter
        artifact_name_regex:
          title: Artifact Name Regex
          items:
            type: string
          type: array
      type: object
      title: KnowledgeBaseNodeOverride
    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
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ApplicationProcessingErrorCode:
      type: string
      enum:
        - APPLICATION_PROCESSING_MISSING_REQUIRED_CONFIGURATION
        - APPLICATION_PROCESSING_MISSING_REQUIRED_INPUT
        - APPLICATION_PROCESSING_INVALID_USER_INPUT
        - APPLICATION_PROCESSING_MISSING_REQUIRED_APPLICATION_OUTPUT
        - APPLICATION_PROCESSING_NODE_PROCESSOR_MISSING
        - APPLICATION_PROCESSING_EXTERNAL_REQUEST_TIMED_OUT
        - APPLICATION_PROCESSING_EXTERNAL_REQUEST_ERRORED
        - APPLICATION_PROCESSING_EXCEEDING_CONTEXT_WINDOW
        - APPLICATION_PROCESSING_UNEXPECTED
      title: ApplicationProcessingErrorCode
    MachineState:
      properties:
        current_node:
          type: string
          title: Current Node
        state:
          additionalProperties: true
          type: object
          title: State
      type: object
      required:
        - current_node
        - state
      title: MachineState
    LegacySpan:
      properties:
        workflow_id:
          type: string
          title: Workflow Id
        node_id:
          type: string
          title: Node Id
        operation_type:
          type: string
          title: Operation Type
        start_timestamp:
          type: string
          title: Start Timestamp
        operation_input:
          type: string
          title: Operation Input
        operation_output:
          type: string
          title: Operation Output
        operation_metadata:
          title: Operation Metadata
          additionalProperties: true
          type: object
        duration_ms:
          type: integer
          title: Duration Ms
      type: object
      required:
        - workflow_id
        - node_id
        - operation_type
        - start_timestamp
        - operation_input
        - operation_output
        - duration_ms
      title: LegacySpan
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````