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

# Validate Custom Deployment



## OpenAPI

````yaml https://api.truestate.io/openapi.json post /deployments/custom-serving/validate/
openapi: 3.1.0
info:
  title: TrueState Backend API
  summary: >-
    TrueState is an AI platform for business users to create high-impact AI
    solutions.
  description: >

    This **[TrueState](https://www.truestate.io/)** backend API allows our
    clients to automate and more powerfully retrieve and modify data from the
    TrueState platform.


    Example use cases include:


    - Accessing embeddings for a dataset.

    - Automating the process of dataset creation and model retraining as your
    data changes.

    - Much more.


    Our backend is built using the [FastAPI](https://fastapi.tiangolo.com/)
    framework in python

    using [Auth0](https://auth0.com/) and [Client API
    Keys](https://www.truestate.io/dawn/docs) for internal an external
    authentication, respectively.

    Our backend is designed to be secure, scalable, easy to use and well
    documented _(each router with its own linked docs page)_.

    Clients can only access data from their own organisation, as setup in Auth0
    our the Client API Keys. See how
    **[here](https://www.truestate.io/dawn/docs)**.


    **PS**: You can view this API documentation in either
    **[Swagger](swagger/docs)** or **[Redoc](redoc/)**, but only the swagger
    lets you test calls.
  contact:
    name: True State Support
    url: https://www.truestate.io/dawn/docs
    email: support@truestate.io
  license:
    name: Private
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 0.13.95
servers: []
security: []
paths:
  /deployments/custom-serving/validate/:
    post:
      tags:
        - deployments
      summary: Validate Custom Deployment
      operationId: validate_custom_deployment_deployments_custom_serving_validate__post
      parameters:
        - name: Api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomDeploymentValidateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: >-
                  Response Validate Custom Deployment Deployments Custom Serving
                  Validate  Post
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    CustomDeploymentValidateRequest:
      properties:
        serving_bundle:
          $ref: '#/components/schemas/ServingBundleSpec'
        artifacts:
          items:
            $ref: '#/components/schemas/CustomServingArtifactInput'
          type: array
          title: Artifacts
      type: object
      required:
        - serving_bundle
      title: CustomDeploymentValidateRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ServingBundleSpec:
      properties:
        schema_version:
          type: string
          const: serving.v1
          title: Schema Version
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        runtime:
          anyOf:
            - $ref: '#/components/schemas/PrebuiltRuntime'
            - $ref: '#/components/schemas/CustomRuntime'
          title: Runtime
        artifacts:
          items:
            $ref: '#/components/schemas/ServingArtifact'
          type: array
          title: Artifacts
        datasets:
          items:
            $ref: '#/components/schemas/ServingDataset'
          type: array
          maxItems: 10
          title: Datasets
        interface:
          $ref: '#/components/schemas/ServingInterface'
      additionalProperties: false
      type: object
      required:
        - schema_version
        - runtime
        - interface
      title: ServingBundleSpec
    CustomServingArtifactInput:
      properties:
        name:
          type: string
          title: Name
        content:
          title: Content
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
      type: object
      required:
        - name
        - content
      title: CustomServingArtifactInput
    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
    PrebuiltRuntime:
      properties:
        type:
          type: string
          const: prebuilt
          title: Type
        value:
          type: string
          title: Value
      additionalProperties: false
      type: object
      required:
        - type
        - value
      title: PrebuiltRuntime
    CustomRuntime:
      properties:
        type:
          type: string
          const: custom
          title: Type
        language:
          type: string
          const: python
          title: Language
        handler:
          type: string
          const: predict
          title: Handler
          default: predict
        source:
          $ref: '#/components/schemas/RuntimeSource'
      additionalProperties: false
      type: object
      required:
        - type
        - language
        - source
      title: CustomRuntime
    ServingArtifact:
      properties:
        name:
          type: string
          title: Name
        path:
          type: string
          title: Path
        kind:
          type: string
          title: Kind
          default: file
      additionalProperties: false
      type: object
      required:
        - name
        - path
      title: ServingArtifact
    ServingDataset:
      properties:
        dataset_id:
          type: string
          format: uuid
          title: Dataset Id
        alias:
          type: string
          title: Alias
      additionalProperties: false
      type: object
      required:
        - dataset_id
        - alias
      title: ServingDataset
      description: >-
        A same-organisation Dataset captured as a Parquet snapshot on deploy.


        The snapshot is immutable for this deployment version. The runtime loads
        it

        before setup and exposes the resulting pandas DataFrame at

        ``context["datasets"][alias]``. Redeploy to capture refreshed table
        data.
    ServingInterface:
      properties:
        input:
          additionalProperties: true
          type: object
          title: Input
        output:
          additionalProperties: true
          type: object
          title: Output
      additionalProperties: true
      type: object
      required:
        - input
        - output
      title: ServingInterface
    RuntimeSource:
      properties:
        type:
          type: string
          const: inline
          title: Type
        filename:
          type: string
          title: Filename
          default: serving.py
        content:
          type: string
          title: Content
      additionalProperties: false
      type: object
      required:
        - type
        - content
      title: RuntimeSource
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````