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

# HTTP proxy for online deployments

> Transparent proxy to the online deployment's Spark-Serving Service.

Requires ``Authorization: Bearer <psk>``. Accepts two credential types:

- **Platform PSK**: Bypasses role checks and grants full access.
- **User PSK**: The API resolves it to a Keycloak user. The user
  must hold at least one of the roles configured via
  ``PUT /{name}/allowed_roles``. A deployment with no configured
  roles denies user-PSK access.

Validates the deployment status and model scope, then forwards the
full request. Strips hop-by-hop headers and the inbound Authorization
header before forwarding.



## OpenAPI

````yaml get /api/models/{model}/deployments/{name}/run/{path}
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/models/{model}/deployments/{name}/run/{path}:
    patch:
      tags:
        - Deployments
      summary: HTTP proxy for online deployments
      description: |-
        Transparent proxy to the online deployment's Spark-Serving Service.

        Requires ``Authorization: Bearer <psk>``. Accepts two credential types:

        - **Platform PSK**: Bypasses role checks and grants full access.
        - **User PSK**: The API resolves it to a Keycloak user. The user
          must hold at least one of the roles configured via
          ``PUT /{name}/allowed_roles``. A deployment with no configured
          roles denies user-PSK access.

        Validates the deployment status and model scope, then forwards the
        full request. Strips hop-by-hop headers and the inbound Authorization
        header before forwarding.
      operationId: deployment_proxy_api_models__model__deployments__name__run__path__get
      parameters:
        - name: model
          in: path
          required: true
          schema:
            type: string
            title: Model
        - name: name
          in: path
          required: true
          schema:
            type: string
            title: Name
        - name: path
          in: path
          required: true
          schema:
            type: string
            title: Path
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````