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

# Submit Upload Job



## OpenAPI

````yaml https://app.stainlessapi.com/api/spec/documented/sgp/openapi.yml post /v4/knowledge-bases/{knowledge_base_id}/uploads
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/knowledge-bases/{knowledge_base_id}/uploads:
    post:
      tags:
        - Knowledge Bases
      summary: Submit Upload Job
      operationId: POST-V4-/v2/knowledge-bases/{knowledge_base_id}/uploads
      parameters:
        - name: knowledge_base_id
          in: path
          required: true
          schema:
            type: string
            title: Knowledge Base Id
        - name: x-selected-account-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Account ID Header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKnowledgeBaseV2UploadRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateKnowledgeBaseV2UploadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
      x-codeSamples:
        - lang: Python
          source: >-
            import os

            from scale_gp import SGPClient


            client = SGPClient(
                api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
            )

            create_knowledge_base_upload_response =
            client.knowledge_bases.uploads.create(
                knowledge_base_id="knowledge_base_id",
                data_source_config={
                    "aws_account_id": "aws_account_id",
                    "aws_region": "aws_region",
                    "s3_bucket": "s3_bucket",
                    "source": "S3",
                },
            )

            print(create_knowledge_base_upload_response.upload_id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/sgp-go\"\n\t\"github.com/stainless-sdks/sgp-go/option\"\n)\n\nfunc main() {\n\tclient := sgp.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcreateKnowledgeBaseUploadResponse, err := client.KnowledgeBases.Uploads.New(\n\t\tcontext.TODO(),\n\t\t\"knowledge_base_id\",\n\t\tsgp.KnowledgeBaseUploadNewParams{\n\t\t\tBody: sgp.KnowledgeBaseUploadNewParamsBodyDataSourceUploadRequest{\n\t\t\t\tDataSourceConfig: sgp.F[sgp.KnowledgeBaseUploadNewParamsBodyDataSourceUploadRequestDataSourceConfigUnion](sgp.S3DataSourceConfigParam{\n\t\t\t\t\tAwsAccountID: sgp.F(\"aws_account_id\"),\n\t\t\t\t\tAwsRegion:    sgp.F(\"aws_region\"),\n\t\t\t\t\tS3Bucket:     sgp.F(\"s3_bucket\"),\n\t\t\t\t\tSource:       sgp.F(sgp.S3DataSourceConfigSourceS3),\n\t\t\t\t}),\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", createKnowledgeBaseUploadResponse.UploadID)\n}\n"
components:
  schemas:
    CreateKnowledgeBaseV2UploadRequest:
      anyOf:
        - $ref: >-
            #/components/schemas/CreateKnowledgeBaseV2UploadFromDataSourceRequest
        - $ref: >-
            #/components/schemas/CreateKnowledgeBaseV2UploadFromLocalChunksRequest
        - $ref: >-
            #/components/schemas/CreateKnowledgeBaseV2UploadFromDataSourceIdRequest
      title: CreateKnowledgeBaseV2UploadRequest
    CreateKnowledgeBaseV2UploadResponse:
      properties:
        upload_id:
          type: string
          title: Upload Id
          description: ID of the created knowledge base upload job.
      type: object
      required:
        - upload_id
      title: CreateKnowledgeBaseV2UploadResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CreateKnowledgeBaseV2UploadFromDataSourceRequest:
      properties:
        data_source_config:
          $ref: '#/components/schemas/RemoteDataSourceConfig'
          description: >-
            Configuration for the data source which describes where to find the
            data.
        data_source_auth_config:
          $ref: '#/components/schemas/DataSourceAuthConfig'
          description: >-
            Configuration for the data source which describes how to
            authenticate to the data source.
        chunking_strategy_config:
          $ref: '#/components/schemas/ChunkingStrategyConfig'
          description: >-
            Configuration for the chunking strategy which describes how to chunk
            the data.
        force_reupload:
          title: Force Reupload
          description: Force reingest, regardless the change of the source file.
          default: false
          type: boolean
        tagging_information:
          $ref: '#/components/schemas/TaggingInformation'
          description: >-
            A dictionary of tags to apply to all artifacts added from the data
            source.
      type: object
      required:
        - data_source_config
      title: DataSource Upload Request
    CreateKnowledgeBaseV2UploadFromLocalChunksRequest:
      properties:
        data_source_config:
          $ref: '#/components/schemas/LocalChunksSourceConfig'
          description: >-
            Configuration for the data source which describes where to find the
            data.
        chunks:
          items:
            $ref: '#/components/schemas/ArtifactChunkUpload'
          type: array
          title: Chunks
          description: List of chunks.
        force_reupload:
          title: Force Reupload
          description: Force reingest, regardless the change of the source file.
          default: false
          type: boolean
        tagging_information:
          $ref: '#/components/schemas/TaggingInformation'
          description: >-
            A dictionary of tags to apply to all artifacts added from the data
            source.
      type: object
      required:
        - data_source_config
      title: Local Chunks Upload Request
    CreateKnowledgeBaseV2UploadFromDataSourceIdRequest:
      properties:
        data_source_id:
          type: string
          title: Data Source Id
          description: Id of the data source to fetch.
        chunking_strategy_config:
          $ref: '#/components/schemas/ChunkingStrategyConfig'
          description: >-
            Configuration for the chunking strategy which describes how to chunk
            the data.
        force_reupload:
          title: Force Reupload
          description: Force reingest, regardless the change of the source file.
          default: false
          type: boolean
        tagging_information:
          $ref: '#/components/schemas/TaggingInformation'
          description: >-
            A dictionary of tags to apply to all artifacts added from the data
            source.
      type: object
      required:
        - data_source_id
        - chunking_strategy_config
      title: DataSource Upload Request
    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
    RemoteDataSourceConfig:
      oneOf:
        - $ref: '#/components/schemas/S3DataSourceConfig'
        - $ref: '#/components/schemas/SharePointDataSourceConfig'
        - $ref: '#/components/schemas/SharePointPageDataSourceConfig'
        - $ref: '#/components/schemas/GoogleDriveDataSourceConfig'
        - $ref: '#/components/schemas/AzureBlobStorageDataSourceConfig'
        - $ref: '#/components/schemas/GoogleCloudStorageDataSourceConfig'
        - $ref: '#/components/schemas/ConfluenceDataSourceConfig'
        - $ref: '#/components/schemas/SlackDataSourceConfig'
        - $ref: '#/components/schemas/SnowflakeDataSourceConfig'
        - $ref: '#/components/schemas/DatabricksDataSourceConfig'
        - $ref: '#/components/schemas/SQLDatabaseDataSourceConfig'
        - $ref: '#/components/schemas/MongoDBDataSourceConfig'
        - $ref: '#/components/schemas/BigQueryDataSourceConfig'
      title: RemoteDataSourceConfig
      discriminator:
        propertyName: source
        mapping:
          AzureBlobStorage:
            $ref: '#/components/schemas/AzureBlobStorageDataSourceConfig'
          BigQuery:
            $ref: '#/components/schemas/BigQueryDataSourceConfig'
          Confluence:
            $ref: '#/components/schemas/ConfluenceDataSourceConfig'
          Databricks:
            $ref: '#/components/schemas/DatabricksDataSourceConfig'
          GoogleCloudStorage:
            $ref: '#/components/schemas/GoogleCloudStorageDataSourceConfig'
          GoogleDrive:
            $ref: '#/components/schemas/GoogleDriveDataSourceConfig'
          MongoDB:
            $ref: '#/components/schemas/MongoDBDataSourceConfig'
          S3:
            $ref: '#/components/schemas/S3DataSourceConfig'
          SQLDatabase:
            $ref: '#/components/schemas/SQLDatabaseDataSourceConfig'
          SharePoint:
            $ref: '#/components/schemas/SharePointDataSourceConfig'
          SharePointPage:
            $ref: '#/components/schemas/SharePointPageDataSourceConfig'
          Slack:
            $ref: '#/components/schemas/SlackDataSourceConfig'
          Snowflake:
            $ref: '#/components/schemas/SnowflakeDataSourceConfig'
    DataSourceAuthConfig:
      oneOf:
        - $ref: '#/components/schemas/SharePointDataSourceAuthConfig'
        - $ref: '#/components/schemas/SharePointPageDataSourceAuthConfig'
        - $ref: '#/components/schemas/AzureBlobStorageDataSourceAuthConfig'
        - $ref: '#/components/schemas/GoogleCloudStorageDataSourceAuthConfig'
        - $ref: '#/components/schemas/GoogleDriveDataSourceAuthConfig'
        - $ref: '#/components/schemas/S3DataSourceAuthConfig'
        - $ref: '#/components/schemas/ConfluenceDataSourceAuthConfig'
        - $ref: '#/components/schemas/SlackDataSourceAuthConfig'
        - $ref: '#/components/schemas/SnowflakeDataSourceAuthConfig'
        - $ref: '#/components/schemas/DatabricksDataSourceAuthConfig'
        - $ref: '#/components/schemas/SQLDatabaseDataSourceAuthConfig'
        - $ref: '#/components/schemas/MongoDBDataSourceAuthConfig'
        - $ref: '#/components/schemas/BigQueryDataSourceAuthConfig'
      title: DataSourceAuthConfig
      discriminator:
        propertyName: source
        mapping:
          AzureBlobStorage:
            $ref: '#/components/schemas/AzureBlobStorageDataSourceAuthConfig'
          BigQuery:
            $ref: '#/components/schemas/BigQueryDataSourceAuthConfig'
          Confluence:
            $ref: '#/components/schemas/ConfluenceDataSourceAuthConfig'
          Databricks:
            $ref: '#/components/schemas/DatabricksDataSourceAuthConfig'
          GoogleCloudStorage:
            $ref: '#/components/schemas/GoogleCloudStorageDataSourceAuthConfig'
          GoogleDrive:
            $ref: '#/components/schemas/GoogleDriveDataSourceAuthConfig'
          MongoDB:
            $ref: '#/components/schemas/MongoDBDataSourceAuthConfig'
          S3:
            $ref: '#/components/schemas/S3DataSourceAuthConfig'
          SQLDatabase:
            $ref: '#/components/schemas/SQLDatabaseDataSourceAuthConfig'
          SharePoint:
            $ref: '#/components/schemas/SharePointDataSourceAuthConfig'
          SharePointPage:
            $ref: '#/components/schemas/SharePointPageDataSourceAuthConfig'
          Slack:
            $ref: '#/components/schemas/SlackDataSourceAuthConfig'
          Snowflake:
            $ref: '#/components/schemas/SnowflakeDataSourceAuthConfig'
    ChunkingStrategyConfig:
      oneOf:
        - $ref: '#/components/schemas/CharacterChunkingStrategyConfig'
        - $ref: '#/components/schemas/TokenChunkingStrategyConfig'
        - $ref: '#/components/schemas/CustomChunkingStrategyConfig'
        - $ref: '#/components/schemas/PreChunkedStrategyConfig'
        - $ref: '#/components/schemas/EnhancedChunkingStrategyConfig'
      title: ChunkingStrategyConfig
      discriminator:
        propertyName: strategy
        mapping:
          character:
            $ref: '#/components/schemas/CharacterChunkingStrategyConfig'
          custom:
            $ref: '#/components/schemas/CustomChunkingStrategyConfig'
          enhanced:
            $ref: '#/components/schemas/EnhancedChunkingStrategyConfig'
          pre_chunked:
            $ref: '#/components/schemas/PreChunkedStrategyConfig'
          token:
            $ref: '#/components/schemas/TokenChunkingStrategyConfig'
    TaggingInformation:
      oneOf:
        - $ref: '#/components/schemas/TaggingInformationPerFile'
        - $ref: '#/components/schemas/TaggingInformationAll'
      title: TaggingInformation
      discriminator:
        propertyName: type
        mapping:
          all:
            $ref: '#/components/schemas/TaggingInformationAll'
          per_file:
            $ref: '#/components/schemas/TaggingInformationPerFile'
    LocalChunksSourceConfig:
      properties:
        source:
          type: string
          const: LocalChunks
          title: Source
        artifact_name:
          type: string
          title: Artifact Name
          description: >-
            The file name assigned to the artifact, containing a file extension.
            Adding an extension is mandatory, to allow detecting file types for
            text extraction.
        artifact_uri:
          type: string
          title: Artifact Uri
          description: >-
            A unique identifier for an artifact within the knowledge base, such
            as full path in a directory or file system.
        deduplication_strategy:
          $ref: '#/components/schemas/DeduplicationStrategy'
          description: >-
            Action to take if an artifact with the same name already exists in
            the knowledge base. Can be either Overwrite (default) or Fail.
          default: Overwrite
      type: object
      required:
        - source
        - artifact_name
        - artifact_uri
      title: LocalChunksSourceConfig
    ArtifactChunkUpload:
      properties:
        text:
          type: string
          title: Text
          description: Associated text of the chunk.
        chunk_position:
          type: integer
          title: Chunk Position
          description: Position of the chunk in the artifact.
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          description: Additional metadata associated with the chunk.
          default: {}
      type: object
      required:
        - text
        - chunk_position
      title: ArtifactChunkUpload
    S3DataSourceConfig:
      properties:
        source:
          type: string
          const: S3
          title: Source
        s3_bucket:
          type: string
          title: S3 Bucket
          description: Name of the S3 bucket where the data is stored.
        s3_prefix:
          type: string
          title: S3 Prefix
          description: >-
            Prefix of the S3 bucket where the data is stored. If not specified,
            the entire bucket will be used.
          default: ''
        aws_region:
          type: string
          title: Aws Region
          description: AWS region where the S3 bucket is located.
        aws_account_id:
          type: string
          pattern: ^\d{12}$
          title: Aws Account Id
          description: AWS account ID that owns the S3 bucket.
      type: object
      required:
        - source
        - s3_bucket
        - aws_region
        - aws_account_id
      title: S3 DataSource Config
    SharePointDataSourceConfig:
      properties:
        source:
          type: string
          const: SharePoint
          title: Source
        client_id:
          type: string
          title: Client Id
          description: Client ID associated with this SharePoint site
        tenant_id:
          type: string
          title: Tenant Id
          description: Tenant ID that the SharePoint site is within
        site_id:
          type: string
          title: Site Id
          description: >-
            Site ID for this SharePoint site, can be found at
            https://[hostname].sharepoint.com/sites/[site name]/_api/site/id
        folder_path:
          title: Folder Path
          description: >-
            Nested folder path to read files from the root of the site. Please
            omit the leading slash. Example: 'Documents/sub_directory'
          default: ''
          type: string
        recursive:
          title: Recursive
          description: Recurse through the folder contents, default is True.
          default: true
          type: boolean
      type: object
      required:
        - source
        - client_id
        - tenant_id
        - site_id
      title: SharePoint DataSource Config
    SharePointPageDataSourceConfig:
      properties:
        source:
          type: string
          const: SharePointPage
          title: Source
        client_id:
          type: string
          title: Client Id
          description: Client ID associated with this SharePoint site
        tenant_id:
          type: string
          title: Tenant Id
          description: Tenant ID that the SharePoint site is within
        site_id:
          type: string
          title: Site Id
          description: Site ID for this SharePoint site
      type: object
      required:
        - source
        - client_id
        - tenant_id
        - site_id
      title: SharePoint Page DataSource Config
    GoogleDriveDataSourceConfig:
      properties:
        source:
          type: string
          const: GoogleDrive
          title: Source
        drive_id:
          type: string
          title: Drive Id
          description: ID associated with the Google Drive to retrieve contents from
      type: object
      required:
        - source
        - drive_id
      title: Google Drive DataSource Config
    AzureBlobStorageDataSourceConfig:
      properties:
        source:
          type: string
          const: AzureBlobStorage
          title: Source
        container_url:
          type: string
          title: Container Url
          description: >-
            The full URL of the container such as
            'https://your-account-name.blob.core.windows.net/your-container-name'
      type: object
      required:
        - source
        - container_url
      title: Azure Blob Storage DataSource Config
    GoogleCloudStorageDataSourceConfig:
      properties:
        source:
          type: string
          const: GoogleCloudStorage
          title: Source
        bucket:
          type: string
          title: Bucket
          description: Name of the Google Cloud Storage bucket where the data is stored.
        prefix:
          title: Prefix
          description: >-
            Prefix path within the Google Cloud Storage bucket. If not
            specified, the entire bucket will be used.
          type: string
        project_id:
          title: Project Id
          description: >-
            GCP project ID that owns the Google Cloud Storage bucket. If not
            specified, uses the default project.
          type: string
      type: object
      required:
        - source
        - bucket
      title: Google Cloud Storage DataSource Config
    ConfluenceDataSourceConfig:
      properties:
        source:
          type: string
          const: Confluence
          title: Source
        space_key:
          type: string
          title: Space Key
          description: >-
            Confluence space key to retrieve contents from. See
            https://support.atlassian.com/confluence-cloud/docs/choose-a-space-key
      type: object
      required:
        - source
        - space_key
      title: Confluence DataSource Config
    SlackDataSourceConfig:
      properties:
        source:
          type: string
          const: Slack
          title: Source
        channel_id:
          type: string
          title: Channel Id
          description: >-
            Slack Channel or Conversation ID to retrieve history from. Open
            channel details and find the ID at bottom of 'About' section.
      type: object
      required:
        - source
        - channel_id
      title: Slack DataSource Config
    SnowflakeDataSourceConfig:
      properties:
        source:
          type: string
          const: Snowflake
          title: Source
        account:
          type: string
          title: Account
          description: Snowflake account identifier
        user:
          type: string
          title: User
          description: Snowflake user name
      type: object
      required:
        - source
        - account
        - user
      title: Snowflake DataSource Config
    DatabricksDataSourceConfig:
      properties:
        source:
          type: string
          const: Databricks
          title: Source
        server_hostname:
          type: string
          title: Server Hostname
          description: Databricks server hostname
        http_path:
          type: string
          title: Http Path
          description: HTTP path for the Databricks cluster or SQL warehouse
      type: object
      required:
        - source
        - server_hostname
        - http_path
      title: Databricks DataSource Config
    SQLDatabaseDataSourceConfig:
      properties:
        source:
          type: string
          const: SQLDatabase
          title: Source
        dialect:
          type: string
          enum:
            - postgresql
            - mssql
            - sqlite
            - snowflake
          title: Dialect
          description: SQL dialect to use for connection
        host:
          title: Host
          description: Database server hostname or IP address
          type: string
        port:
          title: Port
          description: Database server port
          type: integer
        database:
          type: string
          title: Database
          description: Name of the database to connect to.
        username:
          title: Username
          description: Username for authentication
          type: string
        driver:
          title: Driver
          description: >-
            ODBC driver name for MSSQL connections. Defaults to 'ODBC Driver 18
            for SQL Server' if not specified.
          type: string
        ssl_mode:
          title: Ssl Mode
          description: SSL mode for PostgreSQL connections (e.g., 'require', 'verify-full')
          type: string
        connect_timeout:
          title: Connect Timeout
          description: Connection timeout in seconds
          default: 30
          type: integer
        connection_options:
          title: Connection Options
          description: >-
            Additional connection parameters appended to the URL (e.g.,
            {'sslrootcert': '/path/to/ca.pem', 'application_name': 'myapp'})
          additionalProperties:
            type: string
          type: object
        account:
          title: Account
          description: >-
            Snowflake account identifier (e.g., 'xy12345' or
            'xy12345.us-east-2.azure'). Do NOT include the
            '.snowflakecomputing.com' suffix.
          type: string
        warehouse:
          title: Warehouse
          description: >-
            Snowflake warehouse name for query execution. Required for
            Snowflake.
          type: string
        schema_name:
          title: Schema Name
          description: Snowflake schema name. Defaults to 'PUBLIC' if not specified.
          type: string
        role:
          title: Role
          description: >-
            Snowflake role for authentication. Uses the default role for the
            user if not specified.
          type: string
      type: object
      required:
        - source
        - dialect
        - database
      title: SQL Database DataSource Config
    MongoDBDataSourceConfig:
      properties:
        source:
          type: string
          const: MongoDB
          title: Source
        database:
          type: string
          title: Database
          description: Database name to connect to
        connect_timeout:
          title: Connect Timeout
          description: Connection timeout in seconds
          default: 30
          type: integer
      type: object
      required:
        - source
        - database
      title: MongoDB DataSource Config
    BigQueryDataSourceConfig:
      properties:
        source:
          type: string
          const: BigQuery
          title: Source
        project_id:
          type: string
          title: Project Id
          description: GCP project ID containing the BigQuery dataset(s) to query.
        location:
          title: Location
          description: >-
            BigQuery dataset location (e.g. 'US', 'EU', 'us-central1'). When
            omitted the client uses the project's default location.
          type: string
        connect_timeout:
          title: Connect Timeout
          description: Connection timeout in seconds for BigQuery API calls.
          default: 30
          type: integer
      type: object
      required:
        - source
        - project_id
      title: BigQuery DataSource Config
    SharePointDataSourceAuthConfig:
      properties:
        encrypted:
          type: boolean
          title: Encrypted
          default: false
        source:
          type: string
          const: SharePoint
          title: Source
        client_secret:
          type: string
          title: Client Secret
          description: Secret for the app registration associated with this SharePoint site
      type: object
      required:
        - source
        - client_secret
      title: SharePoint DataSource Auth Config
    SharePointPageDataSourceAuthConfig:
      properties:
        encrypted:
          type: boolean
          title: Encrypted
          default: false
        source:
          type: string
          const: SharePointPage
          title: Source
        client_secret:
          type: string
          title: Client Secret
          description: Secret for the app registration associated with this SharePoint site
      type: object
      required:
        - source
        - client_secret
      title: SharePoint Page DataSource Auth Config
    AzureBlobStorageDataSourceAuthConfig:
      properties:
        encrypted:
          type: boolean
          title: Encrypted
          default: false
        source:
          type: string
          const: AzureBlobStorage
          title: Source
        blob_sas_token:
          type: string
          title: Blob Sas Token
          description: Shared Access Signature token for the Azure Blob Storage container
      type: object
      required:
        - source
        - blob_sas_token
      title: Azure DataSource Auth Config
    GoogleCloudStorageDataSourceAuthConfig:
      properties:
        encrypted:
          type: boolean
          title: Encrypted
          default: false
        source:
          type: string
          const: GoogleCloudStorage
          title: Source
        impersonated_service_account_email:
          title: Impersonated Service Account Email
          description: >-
            Service account email to impersonate for Google Cloud Storage
            authentication. Similar to AWS AssumeRole. If provided, Scale will
            impersonate this service account using default credentials. If not
            provided, uses default credentials directly.
          type: string
      type: object
      required:
        - source
      title: Google Cloud Storage DataSource Auth Config
    GoogleDriveDataSourceAuthConfig:
      properties:
        encrypted:
          type: boolean
          title: Encrypted
          default: false
        source:
          type: string
          const: GoogleDrive
          title: Source
        client_email:
          type: string
          title: Client Email
          description: >-
            Client email to use for google drive, set to override client email
            set in env vars
        private_key:
          type: string
          title: Private Key
          description: >-
            Private key to use for google drive, set to override private key set
            in env vars
        token_uri:
          type: string
          title: Token Uri
          description: >-
            Token uri to use for google drive, set to override token uri set in
            env vars
        client_id:
          type: string
          title: Client Id
          description: >-
            Client id to use for google drive, set to override client id set in
            env vars
      type: object
      required:
        - source
        - client_email
        - private_key
        - token_uri
        - client_id
      title: Google Drive DataSource Auth Config
    S3DataSourceAuthConfig:
      properties:
        encrypted:
          type: boolean
          title: Encrypted
          default: false
        source:
          type: string
          const: S3
          title: Source
        s3_role:
          title: S3 Role
          description: >-
            Name of the role that a client will be initialized via AssumeRole of
            AWS sts
          type: string
        external_id:
          title: External Id
          description: External ID defined by the customer for the IAM role
          type: string
      type: object
      required:
        - source
      title: S3 DataSource Auth Config
    ConfluenceDataSourceAuthConfig:
      properties:
        encrypted:
          type: boolean
          title: Encrypted
          default: false
        source:
          type: string
          const: Confluence
          title: Source
        client_email:
          type: string
          title: Client Email
          description: >-
            Client email to use for Confluence, set to override client email set
            in env vars.
        api_key:
          type: string
          title: Api Key
          description: >-
            API key to use for Confluence, set this to override api key
            configured in env vars.
        atlassian_domain:
          type: string
          title: Atlassian Domain
          description: >-
            Your Confluence API server's full domain, set to override domain
            configured in env vars. E.g. 'https://[your-company].atlassian.net'
      type: object
      required:
        - source
        - client_email
        - api_key
        - atlassian_domain
      title: Confluence DataSource Auth Config
    SlackDataSourceAuthConfig:
      properties:
        encrypted:
          type: boolean
          title: Encrypted
          default: false
        source:
          type: string
          const: Slack
          title: Source
        bot_token:
          type: string
          title: Bot Token
          description: >-
            Your Slack app's Bot OAuth token. See
            https://api.slack.com/quickstart
      type: object
      required:
        - source
        - bot_token
      title: Slack DataSource Auth Config
    SnowflakeDataSourceAuthConfig:
      properties:
        encrypted:
          type: boolean
          title: Encrypted
          default: false
        source:
          type: string
          const: Snowflake
          title: Source
        password:
          type: string
          title: Password
          description: Password for Snowflake authentication
      type: object
      required:
        - source
        - password
      title: Snowflake DataSource Auth Config
    DatabricksDataSourceAuthConfig:
      properties:
        encrypted:
          type: boolean
          title: Encrypted
          default: false
        source:
          type: string
          const: Databricks
          title: Source
        access_token:
          type: string
          title: Access Token
          description: Databricks access token for authentication
      type: object
      required:
        - source
        - access_token
      title: Databricks DataSource Auth Config
    SQLDatabaseDataSourceAuthConfig:
      properties:
        encrypted:
          type: boolean
          title: Encrypted
          default: false
        source:
          type: string
          const: SQLDatabase
          title: Source
        password:
          type: string
          title: Password
          description: Password for database authentication
      type: object
      required:
        - source
        - password
      title: SQL Database DataSource Auth Config
    MongoDBDataSourceAuthConfig:
      properties:
        encrypted:
          type: boolean
          title: Encrypted
          default: false
        source:
          type: string
          const: MongoDB
          title: Source
        connection_uri:
          type: string
          title: Connection Uri
          description: MongoDB connection URI
      type: object
      required:
        - source
        - connection_uri
      title: MongoDB DataSource Auth Config
    BigQueryDataSourceAuthConfig:
      properties:
        encrypted:
          type: boolean
          title: Encrypted
          default: false
        source:
          type: string
          const: BigQuery
          title: Source
        impersonated_service_account_email:
          type: string
          title: Impersonated Service Account Email
          description: >-
            Service account email to impersonate for BigQuery authentication.
            When provided, Scale will impersonate this service account using
            default credentials (no secret material crosses the boundary).
            Mutually exclusive with service_account_json. NOTE: the host service
            account that ADC resolves on the EGP service must have
            roles/iam.serviceAccountTokenCreator on this target service account,
            otherwise BigQuery calls will fail with a 403 at query time.
          default: ''
        service_account_json:
          type: string
          title: Service Account Json
          description: >-
            Service account JSON key blob (the full contents of the downloaded
            key file). Used in environments where impersonation is not
            available. Mutually exclusive with
            impersonated_service_account_email.
          default: ''
      type: object
      required:
        - source
      title: BigQuery DataSource Auth Config
    CharacterChunkingStrategyConfig:
      properties:
        strategy:
          type: string
          const: character
          title: Strategy
        separator:
          title: Separator
          description: >-
            Character designating breaks in input data. Text data will first be
            split into sections by this separator, then each section will be
            split into chunks of size `chunk_size`.
          default: |+


          type: string
        chunk_size:
          title: Chunk Size
          description: >-
            Maximum number of characters in each chunk. If not specified, a
            chunk size of 1000 will be used.
          default: 1000
          type: integer
          minimum: 1
        chunk_overlap:
          title: Chunk Overlap
          description: >-
            Number of characters to overlap between chunks. If not specified, an
            overlap of 200 will be used. For example if the chunk size is 3 and
            the overlap size is 1, and the text to chunk is 'abcde', the chunks
            will be 'abc', 'cde'.
          default: 200
          type: integer
          minimum: 0
      type: object
      required:
        - strategy
      title: CharacterChunkingStrategyConfig
    TokenChunkingStrategyConfig:
      properties:
        strategy:
          type: string
          const: token
          title: Strategy
        separator:
          title: Separator
          description: >-
            Character designating breaks in input data. Text data will first be
            split into sections by this separator, then each section will be
            split into chunks of size `chunk_size`.
          default: |+


          type: string
        target_chunk_size:
          title: Target Chunk Size
          description: >-
            Target number of tokens in each chunk. If not specified, a target
            chunk size of 200 will be used.
          default: 200
          type: integer
          minimum: 1
        max_chunk_size:
          title: Max Chunk Size
          description: >-
            Maximum number of tokens in each chunk. If not specified, a maximum
            chunk size of 600 will be used.
          default: 600
          type: integer
          minimum: 1
        chunk_overlap:
          title: Chunk Overlap
          description: >-
            Number of tokens to overlap between chunks. If not specified, an
            overlap of 0 will be used. Not this if only followed approximately.
          default: 0
          type: integer
          minimum: 0
      type: object
      required:
        - strategy
      title: TokenChunkingStrategyConfig
    CustomChunkingStrategyConfig:
      properties:
        strategy:
          type: string
          const: custom
          title: Strategy
        endpoint:
          type: string
          title: Endpoint
          description: Endpoint path to call for custom chunking
        params:
          title: Params
          description: >-
            Parameters that will be appended to the body of the request for the
            chunk.
          default: {}
          additionalProperties: true
          type: object
      type: object
      required:
        - strategy
        - endpoint
      title: CustomChunkingStrategyConfig
    PreChunkedStrategyConfig:
      properties:
        strategy:
          type: string
          const: pre_chunked
          title: Strategy
      type: object
      required:
        - strategy
      title: PreChunkedStrategyConfig
      description: Only compliant with the .chunks file type
    EnhancedChunkingStrategyConfig:
      properties:
        strategy:
          type: string
          const: enhanced
          title: Strategy
          default: enhanced
        chunk_mode:
          type: string
          enum:
            - variable
            - section
            - page
            - page_sections
            - block
          title: Chunk Mode
          description: Enhanced internal chunking method
          default: section
        options:
          title: Options
          description: Options for enhanced parsing
          additionalProperties: true
          type: object
        advanced_options:
          title: Advanced Options
          description: Advanced options for enhanced parsing
          additionalProperties: true
          type: object
        experimental_options:
          title: Experimental Options
          description: Experimental options for enhanced parsing
          additionalProperties: true
          type: object
        use_async_parsing:
          type: boolean
          title: Use Async Parsing
          default: false
      type: object
      title: EnhancedChunkingStrategyConfig
      description: Enhanced document parsing and chunking
    TaggingInformationPerFile:
      properties:
        type:
          type: string
          const: per_file
          title: Type
          default: per_file
        tags_to_apply:
          title: Tags To Apply
          additionalProperties:
            anyOf:
              - additionalProperties: true
                type: object
              - type: 'null'
          type: object
      type: object
      title: TaggingInformationPerFile
    TaggingInformationAll:
      properties:
        type:
          type: string
          const: all
          title: Type
          default: all
        tags_to_apply:
          title: Tags To Apply
          additionalProperties: true
          type: object
      type: object
      title: TaggingInformationAll
    DeduplicationStrategy:
      type: string
      enum:
        - Overwrite
        - Fail
      title: DeduplicationStrategy
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````