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

# Patch adminsettingai config

> Update one AI configuration section

Required token scopes: `instance|update`



## OpenAPI

````yaml /swagger.json patch /admin/setting/ai-config
openapi: 3.0.0
info:
  version: 1.0.0
  title: Teable App
  description: Manage Data as easy as drink a cup of tea
  x-logo:
    backgroundColor: '#F0F0F0'
    altText: Teable logo
servers:
  - url: https://app.teable.ai/api
security: []
tags:
  - name: base
    x-group: project
  - name: base node
    x-group: project node
  - name: base-share
    x-group: project-share
paths:
  /admin/setting/ai-config:
    patch:
      tags:
        - admin
      description: |-
        Update one AI configuration section

        Required token scopes: `instance|update`
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    section:
                      type: string
                      enum:
                        - llmApi
                    patch:
                      type: object
                      properties:
                        llmProviders:
                          type: array
                          nullable: true
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - openai
                                  - anthropic
                                  - google
                                  - azure
                                  - cohere
                                  - mistral
                                  - deepseek
                                  - qwen
                                  - zhipu
                                  - lingyiwanwu
                                  - xai
                                  - togetherai
                                  - ollama
                                  - amazonBedrock
                                  - openRouter
                                  - openaiCompatible
                                  - aiGateway
                              name:
                                type: string
                              displayName:
                                type: string
                              apiKey:
                                type: string
                              baseUrl:
                                type: string
                                format: uri
                              models:
                                type: string
                                default: ''
                              isInstance:
                                type: boolean
                              modelConfigs:
                                type: object
                                additionalProperties:
                                  type: object
                                  properties:
                                    label:
                                      type: string
                                    pricing:
                                      type: object
                                      properties:
                                        input:
                                          type: string
                                        output:
                                          type: string
                                        inputCacheRead:
                                          type: string
                                        inputCacheWrite:
                                          type: string
                                        reasoning:
                                          type: string
                                        image:
                                          type: string
                                        webSearch:
                                          type: string
                                        inputTiers:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              cost:
                                                type: string
                                              min:
                                                type: number
                                              max:
                                                type: number
                                            required:
                                              - cost
                                              - min
                                        outputTiers:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              cost:
                                                type: string
                                              min:
                                                type: number
                                              max:
                                                type: number
                                            required:
                                              - cost
                                              - min
                                        inputCacheReadTiers:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              cost:
                                                type: string
                                              min:
                                                type: number
                                              max:
                                                type: number
                                            required:
                                              - cost
                                              - min
                                        inputCacheWriteTiers:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              cost:
                                                type: string
                                              min:
                                                type: number
                                              max:
                                                type: number
                                            required:
                                              - cost
                                              - min
                                    referenceModel:
                                      type: string
                                    inputRate:
                                      type: number
                                      minimum: 0
                                    outputRate:
                                      type: number
                                      minimum: 0
                                    cacheReadRate:
                                      type: number
                                      minimum: 0
                                    cacheWriteRate:
                                      type: number
                                      minimum: 0
                                    reasoningRate:
                                      type: number
                                      minimum: 0
                                    imageRate:
                                      type: number
                                      minimum: 0
                                    webSearchRate:
                                      type: number
                                      minimum: 0
                                    isImageModel:
                                      type: boolean
                                    ability:
                                      type: object
                                      properties:
                                        image:
                                          anyOf:
                                            - type: boolean
                                            - type: object
                                              properties:
                                                url:
                                                  type: boolean
                                                base64:
                                                  type: boolean
                                        pdf:
                                          anyOf:
                                            - type: boolean
                                            - type: object
                                              properties:
                                                url:
                                                  type: boolean
                                                base64:
                                                  type: boolean
                                        webSearch:
                                          type: boolean
                                        toolCall:
                                          type: boolean
                                        reasoning:
                                          type: boolean
                                        imageGeneration:
                                          type: boolean
                                    imageAbility:
                                      type: object
                                      properties:
                                        generation:
                                          type: boolean
                                        imageToImage:
                                          type: boolean
                                    testedAt:
                                      type: number
                                    ownedBy:
                                      type: string
                                      enum:
                                        - alibaba
                                        - amazon
                                        - anthropic
                                        - arcee-ai
                                        - bfl
                                        - bytedance
                                        - cohere
                                        - deepseek
                                        - google
                                        - inception
                                        - interfaze
                                        - kwaipilot
                                        - meituan
                                        - meta
                                        - minimax
                                        - mistral
                                        - moonshotai
                                        - morph
                                        - nvidia
                                        - openai
                                        - perplexity
                                        - prime-intellect
                                        - prodia
                                        - quiverai
                                        - recraft
                                        - sakana
                                        - stealth
                                        - spacexai
                                        - stepfun
                                        - vercel
                                        - voyage
                                        - xai
                                        - xiaomi
                                        - zai
                                    modelType:
                                      type: string
                                      enum:
                                        - language
                                        - embedding
                                        - image
                                    tags:
                                      type: array
                                      items:
                                        type: string
                                        minLength: 1
                                    contextWindow:
                                      type: number
                                    maxTokens:
                                      type: number
                                    description:
                                      type: string
                            required:
                              - type
                              - name
                        aiGatewayApiKey:
                          type: string
                          nullable: true
                        aiGatewayBaseUrl:
                          type: string
                          nullable: true
                          format: uri
                        attachmentTest:
                          type: object
                          nullable: true
                          properties:
                            urlMode:
                              type: object
                              properties:
                                success:
                                  type: boolean
                                errorMessage:
                                  type: string
                              required:
                                - success
                            base64Mode:
                              type: object
                              properties:
                                success:
                                  type: boolean
                                errorMessage:
                                  type: string
                              required:
                                - success
                            testedAt:
                              type: string
                            testedOrigin:
                              type: string
                            recommendedMode:
                              type: string
                              enum:
                                - url
                                - base64
                        attachmentTransferMode:
                          type: string
                          nullable: true
                          enum:
                            - url
                            - base64
                  required:
                    - section
                    - patch
                - type: object
                  properties:
                    section:
                      type: string
                      enum:
                        - modelPool
                    patch:
                      type: object
                      properties:
                        gatewayModels:
                          type: array
                          nullable: true
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              label:
                                type: string
                              enabled:
                                type: boolean
                                default: true
                              capabilities:
                                type: object
                                properties:
                                  image:
                                    anyOf:
                                      - type: boolean
                                      - type: object
                                        properties:
                                          url:
                                            type: boolean
                                          base64:
                                            type: boolean
                                  pdf:
                                    anyOf:
                                      - type: boolean
                                      - type: object
                                        properties:
                                          url:
                                            type: boolean
                                          base64:
                                            type: boolean
                                  webSearch:
                                    type: boolean
                                  toolCall:
                                    type: boolean
                                  reasoning:
                                    type: boolean
                                  imageGeneration:
                                    type: boolean
                              pricing:
                                type: object
                                properties:
                                  input:
                                    type: string
                                  output:
                                    type: string
                                  inputCacheRead:
                                    type: string
                                  inputCacheWrite:
                                    type: string
                                  reasoning:
                                    type: string
                                  image:
                                    type: string
                                  webSearch:
                                    type: string
                                  inputTiers:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        cost:
                                          type: string
                                        min:
                                          type: number
                                        max:
                                          type: number
                                      required:
                                        - cost
                                        - min
                                  outputTiers:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        cost:
                                          type: string
                                        min:
                                          type: number
                                        max:
                                          type: number
                                      required:
                                        - cost
                                        - min
                                  inputCacheReadTiers:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        cost:
                                          type: string
                                        min:
                                          type: number
                                        max:
                                          type: number
                                      required:
                                        - cost
                                        - min
                                  inputCacheWriteTiers:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        cost:
                                          type: string
                                        min:
                                          type: number
                                        max:
                                          type: number
                                      required:
                                        - cost
                                        - min
                              rates:
                                type: object
                                properties:
                                  inputRate:
                                    type: number
                                    minimum: 0
                                  outputRate:
                                    type: number
                                    minimum: 0
                                  cacheReadRate:
                                    type: number
                                    minimum: 0
                                  cacheWriteRate:
                                    type: number
                                    minimum: 0
                                  reasoningRate:
                                    type: number
                                    minimum: 0
                                  imageRate:
                                    type: number
                                    minimum: 0
                                  webSearchRate:
                                    type: number
                                    minimum: 0
                              isImageModel:
                                type: boolean
                              defaultFor:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - chatLg
                                    - chatMd
                                    - chatSm
                                    - aiFieldText
                                    - aiFieldImage
                              testedAt:
                                type: number
                              ownedBy:
                                type: string
                                enum:
                                  - alibaba
                                  - amazon
                                  - anthropic
                                  - arcee-ai
                                  - bfl
                                  - bytedance
                                  - cohere
                                  - deepseek
                                  - google
                                  - inception
                                  - interfaze
                                  - kwaipilot
                                  - meituan
                                  - meta
                                  - minimax
                                  - mistral
                                  - moonshotai
                                  - morph
                                  - nvidia
                                  - openai
                                  - perplexity
                                  - prime-intellect
                                  - prodia
                                  - quiverai
                                  - recraft
                                  - sakana
                                  - stealth
                                  - spacexai
                                  - stepfun
                                  - vercel
                                  - voyage
                                  - xai
                                  - xiaomi
                                  - zai
                              modelType:
                                type: string
                                enum:
                                  - language
                                  - embedding
                                  - image
                              tags:
                                type: array
                                items:
                                  type: string
                                  minLength: 1
                              contextWindow:
                                type: number
                              maxTokens:
                                type: number
                              description:
                                type: string
                              i18nDescription:
                                type: object
                                properties:
                                  en:
                                    type: string
                                  zh:
                                    type: string
                              recommended:
                                type: boolean
                              recommendedDescription:
                                type: object
                                properties:
                                  en:
                                    type: string
                                  zh:
                                    type: string
                            required:
                              - id
                              - label
                  required:
                    - section
                    - patch
                - type: object
                  properties:
                    section:
                      type: string
                      enum:
                        - defaultModels
                    patch:
                      type: object
                      properties:
                        chatModel:
                          type: object
                          nullable: true
                          properties:
                            xl:
                              type: string
                            lg:
                              type: string
                            md:
                              type: string
                            sm:
                              type: string
                            ability:
                              type: object
                              properties:
                                image:
                                  anyOf:
                                    - type: boolean
                                    - type: object
                                      properties:
                                        url:
                                          type: boolean
                                        base64:
                                          type: boolean
                                pdf:
                                  anyOf:
                                    - type: boolean
                                    - type: object
                                      properties:
                                        url:
                                          type: boolean
                                        base64:
                                          type: boolean
                                webSearch:
                                  type: boolean
                                toolCall:
                                  type: boolean
                                reasoning:
                                  type: boolean
                                imageGeneration:
                                  type: boolean
                            hiddenTiers:
                              type: array
                              items:
                                type: string
                                enum:
                                  - xl
                                  - lg
                                  - md
                                  - sm
                            defaultTier:
                              type: string
                              enum:
                                - xl
                                - lg
                                - md
                                - sm
                        embeddingModel:
                          type: string
                          nullable: true
                        translationModel:
                          type: string
                          nullable: true
                  required:
                    - section
                    - patch
                - type: object
                  properties:
                    section:
                      type: string
                      enum:
                        - capabilities
                    patch:
                      type: object
                      properties:
                        capabilities:
                          type: object
                          nullable: true
                          properties:
                            disableActions:
                              type: array
                              items:
                                type: string
                            disableModelSelection:
                              type: boolean
                  required:
                    - section
                    - patch
                - type: object
                  properties:
                    section:
                      type: string
                      enum:
                        - concurrency
                    patch:
                      type: object
                      properties:
                        concurrencyGroups:
                          type: array
                          nullable: true
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              taskTypes:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - text
                                    - image
                                default: []
                              keys:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    apiKey:
                                      type: string
                                    status:
                                      type: string
                                      enum:
                                        - verified
                                        - untested
                                        - error
                                      default: untested
                                  required:
                                    - apiKey
                                default: []
                              perKey:
                                type: number
                                minimum: 1
                                maximum: 100
                                default: 5
                            required:
                              - id
                              - name
                        aiGatewayApiKeys:
                          type: array
                          nullable: true
                          items:
                            type: string
                        concurrencyPerKey:
                          type: number
                          nullable: true
                          minimum: 1
                          maximum: 100
                  required:
                    - section
                    - patch
                - type: object
                  properties:
                    section:
                      type: string
                      enum:
                        - vertexCredential
                    patch:
                      type: object
                      properties:
                        vertexByokCredential:
                          type: object
                          nullable: true
                          properties:
                            project:
                              type: string
                            location:
                              type: string
                            googleCredentials:
                              type: object
                              properties:
                                privateKey:
                                  type: string
                                clientEmail:
                                  type: string
                              required:
                                - privateKey
                                - clientEmail
                          required:
                            - project
                            - location
                            - googleCredentials
                  required:
                    - section
                    - patch
                - type: object
                  properties:
                    section:
                      type: string
                      enum:
                        - modelMappings
                    patch:
                      type: object
                      properties:
                        modelMappings:
                          type: array
                          nullable: true
                          items:
                            type: object
                            properties:
                              sourceModelKey:
                                type: string
                              targetModelKey:
                                type: string
                              enabled:
                                type: boolean
                              createdTime:
                                type: string
                              lastModifiedTime:
                                type: string
                            required:
                              - sourceModelKey
                              - targetModelKey
                  required:
                    - section
                    - patch
                - type: object
                  properties:
                    section:
                      type: string
                      enum:
                        - modelConfigs
                    patch:
                      type: object
                      properties:
                        llmProviders:
                          type: array
                          nullable: true
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - openai
                                  - anthropic
                                  - google
                                  - azure
                                  - cohere
                                  - mistral
                                  - deepseek
                                  - qwen
                                  - zhipu
                                  - lingyiwanwu
                                  - xai
                                  - togetherai
                                  - ollama
                                  - amazonBedrock
                                  - openRouter
                                  - openaiCompatible
                                  - aiGateway
                              name:
                                type: string
                              displayName:
                                type: string
                              apiKey:
                                type: string
                              baseUrl:
                                type: string
                                format: uri
                              models:
                                type: string
                                default: ''
                              isInstance:
                                type: boolean
                              modelConfigs:
                                type: object
                                additionalProperties:
                                  type: object
                                  properties:
                                    label:
                                      type: string
                                    pricing:
                                      type: object
                                      properties:
                                        input:
                                          type: string
                                        output:
                                          type: string
                                        inputCacheRead:
                                          type: string
                                        inputCacheWrite:
                                          type: string
                                        reasoning:
                                          type: string
                                        image:
                                          type: string
                                        webSearch:
                                          type: string
                                        inputTiers:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              cost:
                                                type: string
                                              min:
                                                type: number
                                              max:
                                                type: number
                                            required:
                                              - cost
                                              - min
                                        outputTiers:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              cost:
                                                type: string
                                              min:
                                                type: number
                                              max:
                                                type: number
                                            required:
                                              - cost
                                              - min
                                        inputCacheReadTiers:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              cost:
                                                type: string
                                              min:
                                                type: number
                                              max:
                                                type: number
                                            required:
                                              - cost
                                              - min
                                        inputCacheWriteTiers:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              cost:
                                                type: string
                                              min:
                                                type: number
                                              max:
                                                type: number
                                            required:
                                              - cost
                                              - min
                                    referenceModel:
                                      type: string
                                    inputRate:
                                      type: number
                                      minimum: 0
                                    outputRate:
                                      type: number
                                      minimum: 0
                                    cacheReadRate:
                                      type: number
                                      minimum: 0
                                    cacheWriteRate:
                                      type: number
                                      minimum: 0
                                    reasoningRate:
                                      type: number
                                      minimum: 0
                                    imageRate:
                                      type: number
                                      minimum: 0
                                    webSearchRate:
                                      type: number
                                      minimum: 0
                                    isImageModel:
                                      type: boolean
                                    ability:
                                      type: object
                                      properties:
                                        image:
                                          anyOf:
                                            - type: boolean
                                            - type: object
                                              properties:
                                                url:
                                                  type: boolean
                                                base64:
                                                  type: boolean
                                        pdf:
                                          anyOf:
                                            - type: boolean
                                            - type: object
                                              properties:
                                                url:
                                                  type: boolean
                                                base64:
                                                  type: boolean
                                        webSearch:
                                          type: boolean
                                        toolCall:
                                          type: boolean
                                        reasoning:
                                          type: boolean
                                        imageGeneration:
                                          type: boolean
                                    imageAbility:
                                      type: object
                                      properties:
                                        generation:
                                          type: boolean
                                        imageToImage:
                                          type: boolean
                                    testedAt:
                                      type: number
                                    ownedBy:
                                      type: string
                                      enum:
                                        - alibaba
                                        - amazon
                                        - anthropic
                                        - arcee-ai
                                        - bfl
                                        - bytedance
                                        - cohere
                                        - deepseek
                                        - google
                                        - inception
                                        - interfaze
                                        - kwaipilot
                                        - meituan
                                        - meta
                                        - minimax
                                        - mistral
                                        - moonshotai
                                        - morph
                                        - nvidia
                                        - openai
                                        - perplexity
                                        - prime-intellect
                                        - prodia
                                        - quiverai
                                        - recraft
                                        - sakana
                                        - stealth
                                        - spacexai
                                        - stepfun
                                        - vercel
                                        - voyage
                                        - xai
                                        - xiaomi
                                        - zai
                                    modelType:
                                      type: string
                                      enum:
                                        - language
                                        - embedding
                                        - image
                                    tags:
                                      type: array
                                      items:
                                        type: string
                                        minLength: 1
                                    contextWindow:
                                      type: number
                                    maxTokens:
                                      type: number
                                    description:
                                      type: string
                            required:
                              - type
                              - name
                        gatewayModels:
                          type: array
                          nullable: true
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              label:
                                type: string
                              enabled:
                                type: boolean
                                default: true
                              capabilities:
                                type: object
                                properties:
                                  image:
                                    anyOf:
                                      - type: boolean
                                      - type: object
                                        properties:
                                          url:
                                            type: boolean
                                          base64:
                                            type: boolean
                                  pdf:
                                    anyOf:
                                      - type: boolean
                                      - type: object
                                        properties:
                                          url:
                                            type: boolean
                                          base64:
                                            type: boolean
                                  webSearch:
                                    type: boolean
                                  toolCall:
                                    type: boolean
                                  reasoning:
                                    type: boolean
                                  imageGeneration:
                                    type: boolean
                              pricing:
                                type: object
                                properties:
                                  input:
                                    type: string
                                  output:
                                    type: string
                                  inputCacheRead:
                                    type: string
                                  inputCacheWrite:
                                    type: string
                                  reasoning:
                                    type: string
                                  image:
                                    type: string
                                  webSearch:
                                    type: string
                                  inputTiers:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        cost:
                                          type: string
                                        min:
                                          type: number
                                        max:
                                          type: number
                                      required:
                                        - cost
                                        - min
                                  outputTiers:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        cost:
                                          type: string
                                        min:
                                          type: number
                                        max:
                                          type: number
                                      required:
                                        - cost
                                        - min
                                  inputCacheReadTiers:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        cost:
                                          type: string
                                        min:
                                          type: number
                                        max:
                                          type: number
                                      required:
                                        - cost
                                        - min
                                  inputCacheWriteTiers:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        cost:
                                          type: string
                                        min:
                                          type: number
                                        max:
                                          type: number
                                      required:
                                        - cost
                                        - min
                              rates:
                                type: object
                                properties:
                                  inputRate:
                                    type: number
                                    minimum: 0
                                  outputRate:
                                    type: number
                                    minimum: 0
                                  cacheReadRate:
                                    type: number
                                    minimum: 0
                                  cacheWriteRate:
                                    type: number
                                    minimum: 0
                                  reasoningRate:
                                    type: number
                                    minimum: 0
                                  imageRate:
                                    type: number
                                    minimum: 0
                                  webSearchRate:
                                    type: number
                                    minimum: 0
                              isImageModel:
                                type: boolean
                              defaultFor:
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - chatLg
                                    - chatMd
                                    - chatSm
                                    - aiFieldText
                                    - aiFieldImage
                              testedAt:
                                type: number
                              ownedBy:
                                type: string
                                enum:
                                  - alibaba
                                  - amazon
                                  - anthropic
                                  - arcee-ai
                                  - bfl
                                  - bytedance
                                  - cohere
                                  - deepseek
                                  - google
                                  - inception
                                  - interfaze
                                  - kwaipilot
                                  - meituan
                                  - meta
                                  - minimax
                                  - mistral
                                  - moonshotai
                                  - morph
                                  - nvidia
                                  - openai
                                  - perplexity
                                  - prime-intellect
                                  - prodia
                                  - quiverai
                                  - recraft
                                  - sakana
                                  - stealth
                                  - spacexai
                                  - stepfun
                                  - vercel
                                  - voyage
                                  - xai
                                  - xiaomi
                                  - zai
                              modelType:
                                type: string
                                enum:
                                  - language
                                  - embedding
                                  - image
                              tags:
                                type: array
                                items:
                                  type: string
                                  minLength: 1
                              contextWindow:
                                type: number
                              maxTokens:
                                type: number
                              description:
                                type: string
                              i18nDescription:
                                type: object
                                properties:
                                  en:
                                    type: string
                                  zh:
                                    type: string
                              recommended:
                                type: boolean
                              recommendedDescription:
                                type: object
                                properties:
                                  en:
                                    type: string
                                  zh:
                                    type: string
                            required:
                              - id
                              - label
                  required:
                    - section
                    - patch
                - type: object
                  properties:
                    section:
                      type: string
                      enum:
                        - realtimeTranscription
                    patch:
                      type: object
                      properties:
                        realtimeTranscription:
                          type: object
                          nullable: true
                          properties:
                            enabled:
                              type: boolean
                            provider:
                              type: string
                              enum:
                                - openai
                              default: openai
                            apiKey:
                              type: string
                              nullable: true
                            endpoint:
                              type: string
                              nullable: true
                              format: uri
                            model:
                              type: string
                              enum:
                                - gpt-4o-mini-transcribe
                                - gpt-4o-transcribe
                                - whisper-1
                                - gpt-realtime-whisper
                              default: gpt-4o-mini-transcribe
                            status:
                              type: string
                              enum:
                                - untested
                                - verified
                                - error
                            testedAt:
                              type: string
                            maxSessionDurationSec:
                              type: number
                              minimum: 10
                              maximum: 600
                            sessionCreateLimitPerMinute:
                              type: number
                              minimum: 1
                              maximum: 60
                  required:
                    - section
                    - patch
      responses:
        '200':
          description: Update AI configuration section successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  aiConfig:
                    type: object
                    properties:
                      llmProviders:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - openai
                                - anthropic
                                - google
                                - azure
                                - cohere
                                - mistral
                                - deepseek
                                - qwen
                                - zhipu
                                - lingyiwanwu
                                - xai
                                - togetherai
                                - ollama
                                - amazonBedrock
                                - openRouter
                                - openaiCompatible
                                - aiGateway
                            name:
                              type: string
                            displayName:
                              type: string
                            apiKey:
                              type: string
                            baseUrl:
                              type: string
                              format: uri
                            models:
                              type: string
                              default: ''
                            isInstance:
                              type: boolean
                            modelConfigs:
                              type: object
                              additionalProperties:
                                type: object
                                properties:
                                  label:
                                    type: string
                                  pricing:
                                    type: object
                                    properties:
                                      input:
                                        type: string
                                      output:
                                        type: string
                                      inputCacheRead:
                                        type: string
                                      inputCacheWrite:
                                        type: string
                                      reasoning:
                                        type: string
                                      image:
                                        type: string
                                      webSearch:
                                        type: string
                                      inputTiers:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            cost:
                                              type: string
                                            min:
                                              type: number
                                            max:
                                              type: number
                                          required:
                                            - cost
                                            - min
                                      outputTiers:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            cost:
                                              type: string
                                            min:
                                              type: number
                                            max:
                                              type: number
                                          required:
                                            - cost
                                            - min
                                      inputCacheReadTiers:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            cost:
                                              type: string
                                            min:
                                              type: number
                                            max:
                                              type: number
                                          required:
                                            - cost
                                            - min
                                      inputCacheWriteTiers:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            cost:
                                              type: string
                                            min:
                                              type: number
                                            max:
                                              type: number
                                          required:
                                            - cost
                                            - min
                                  referenceModel:
                                    type: string
                                  inputRate:
                                    type: number
                                    minimum: 0
                                  outputRate:
                                    type: number
                                    minimum: 0
                                  cacheReadRate:
                                    type: number
                                    minimum: 0
                                  cacheWriteRate:
                                    type: number
                                    minimum: 0
                                  reasoningRate:
                                    type: number
                                    minimum: 0
                                  imageRate:
                                    type: number
                                    minimum: 0
                                  webSearchRate:
                                    type: number
                                    minimum: 0
                                  isImageModel:
                                    type: boolean
                                  ability:
                                    type: object
                                    properties:
                                      image:
                                        anyOf:
                                          - type: boolean
                                          - type: object
                                            properties:
                                              url:
                                                type: boolean
                                              base64:
                                                type: boolean
                                      pdf:
                                        anyOf:
                                          - type: boolean
                                          - type: object
                                            properties:
                                              url:
                                                type: boolean
                                              base64:
                                                type: boolean
                                      webSearch:
                                        type: boolean
                                      toolCall:
                                        type: boolean
                                      reasoning:
                                        type: boolean
                                      imageGeneration:
                                        type: boolean
                                  imageAbility:
                                    type: object
                                    properties:
                                      generation:
                                        type: boolean
                                      imageToImage:
                                        type: boolean
                                  testedAt:
                                    type: number
                                  ownedBy:
                                    type: string
                                    enum:
                                      - alibaba
                                      - amazon
                                      - anthropic
                                      - arcee-ai
                                      - bfl
                                      - bytedance
                                      - cohere
                                      - deepseek
                                      - google
                                      - inception
                                      - interfaze
                                      - kwaipilot
                                      - meituan
                                      - meta
                                      - minimax
                                      - mistral
                                      - moonshotai
                                      - morph
                                      - nvidia
                                      - openai
                                      - perplexity
                                      - prime-intellect
                                      - prodia
                                      - quiverai
                                      - recraft
                                      - sakana
                                      - stealth
                                      - spacexai
                                      - stepfun
                                      - vercel
                                      - voyage
                                      - xai
                                      - xiaomi
                                      - zai
                                  modelType:
                                    type: string
                                    enum:
                                      - language
                                      - embedding
                                      - image
                                  tags:
                                    type: array
                                    items:
                                      type: string
                                      minLength: 1
                                  contextWindow:
                                    type: number
                                  maxTokens:
                                    type: number
                                  description:
                                    type: string
                          required:
                            - type
                            - name
                        default: []
                      embeddingModel:
                        type: string
                      translationModel:
                        type: string
                      chatModel:
                        type: object
                        nullable: true
                        properties:
                          xl:
                            type: string
                          lg:
                            type: string
                          md:
                            type: string
                          sm:
                            type: string
                          ability:
                            type: object
                            properties:
                              image:
                                anyOf:
                                  - type: boolean
                                  - type: object
                                    properties:
                                      url:
                                        type: boolean
                                      base64:
                                        type: boolean
                              pdf:
                                anyOf:
                                  - type: boolean
                                  - type: object
                                    properties:
                                      url:
                                        type: boolean
                                      base64:
                                        type: boolean
                              webSearch:
                                type: boolean
                              toolCall:
                                type: boolean
                              reasoning:
                                type: boolean
                              imageGeneration:
                                type: boolean
                          hiddenTiers:
                            type: array
                            items:
                              type: string
                              enum:
                                - xl
                                - lg
                                - md
                                - sm
                          defaultTier:
                            type: string
                            enum:
                              - xl
                              - lg
                              - md
                              - sm
                      gatewayModels:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            label:
                              type: string
                            enabled:
                              type: boolean
                              default: true
                            capabilities:
                              type: object
                              properties:
                                image:
                                  anyOf:
                                    - type: boolean
                                    - type: object
                                      properties:
                                        url:
                                          type: boolean
                                        base64:
                                          type: boolean
                                pdf:
                                  anyOf:
                                    - type: boolean
                                    - type: object
                                      properties:
                                        url:
                                          type: boolean
                                        base64:
                                          type: boolean
                                webSearch:
                                  type: boolean
                                toolCall:
                                  type: boolean
                                reasoning:
                                  type: boolean
                                imageGeneration:
                                  type: boolean
                            pricing:
                              type: object
                              properties:
                                input:
                                  type: string
                                output:
                                  type: string
                                inputCacheRead:
                                  type: string
                                inputCacheWrite:
                                  type: string
                                reasoning:
                                  type: string
                                image:
                                  type: string
                                webSearch:
                                  type: string
                                inputTiers:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      cost:
                                        type: string
                                      min:
                                        type: number
                                      max:
                                        type: number
                                    required:
                                      - cost
                                      - min
                                outputTiers:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      cost:
                                        type: string
                                      min:
                                        type: number
                                      max:
                                        type: number
                                    required:
                                      - cost
                                      - min
                                inputCacheReadTiers:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      cost:
                                        type: string
                                      min:
                                        type: number
                                      max:
                                        type: number
                                    required:
                                      - cost
                                      - min
                                inputCacheWriteTiers:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      cost:
                                        type: string
                                      min:
                                        type: number
                                      max:
                                        type: number
                                    required:
                                      - cost
                                      - min
                            rates:
                              type: object
                              properties:
                                inputRate:
                                  type: number
                                  minimum: 0
                                outputRate:
                                  type: number
                                  minimum: 0
                                cacheReadRate:
                                  type: number
                                  minimum: 0
                                cacheWriteRate:
                                  type: number
                                  minimum: 0
                                reasoningRate:
                                  type: number
                                  minimum: 0
                                imageRate:
                                  type: number
                                  minimum: 0
                                webSearchRate:
                                  type: number
                                  minimum: 0
                            isImageModel:
                              type: boolean
                            defaultFor:
                              type: array
                              items:
                                type: string
                                enum:
                                  - chatLg
                                  - chatMd
                                  - chatSm
                                  - aiFieldText
                                  - aiFieldImage
                            testedAt:
                              type: number
                            ownedBy:
                              type: string
                              enum:
                                - alibaba
                                - amazon
                                - anthropic
                                - arcee-ai
                                - bfl
                                - bytedance
                                - cohere
                                - deepseek
                                - google
                                - inception
                                - interfaze
                                - kwaipilot
                                - meituan
                                - meta
                                - minimax
                                - mistral
                                - moonshotai
                                - morph
                                - nvidia
                                - openai
                                - perplexity
                                - prime-intellect
                                - prodia
                                - quiverai
                                - recraft
                                - sakana
                                - stealth
                                - spacexai
                                - stepfun
                                - vercel
                                - voyage
                                - xai
                                - xiaomi
                                - zai
                            modelType:
                              type: string
                              enum:
                                - language
                                - embedding
                                - image
                            tags:
                              type: array
                              items:
                                type: string
                                minLength: 1
                            contextWindow:
                              type: number
                            maxTokens:
                              type: number
                            description:
                              type: string
                            i18nDescription:
                              type: object
                              properties:
                                en:
                                  type: string
                                zh:
                                  type: string
                            recommended:
                              type: boolean
                            recommendedDescription:
                              type: object
                              properties:
                                en:
                                  type: string
                                zh:
                                  type: string
                          required:
                            - id
                            - label
                      capabilities:
                        type: object
                        properties:
                          disableActions:
                            type: array
                            items:
                              type: string
                          disableModelSelection:
                            type: boolean
                      aiGatewayApiKey:
                        type: string
                        nullable: true
                      aiGatewayBaseUrl:
                        type: string
                        nullable: true
                        format: uri
                      attachmentTest:
                        type: object
                        nullable: true
                        properties:
                          urlMode:
                            type: object
                            properties:
                              success:
                                type: boolean
                              errorMessage:
                                type: string
                            required:
                              - success
                          base64Mode:
                            type: object
                            properties:
                              success:
                                type: boolean
                              errorMessage:
                                type: string
                            required:
                              - success
                          testedAt:
                            type: string
                          testedOrigin:
                            type: string
                          recommendedMode:
                            type: string
                            enum:
                              - url
                              - base64
                      attachmentTransferMode:
                        type: string
                        nullable: true
                        enum:
                          - url
                          - base64
                      aiGatewayApiKeys:
                        type: array
                        items:
                          type: string
                      vertexByokCredential:
                        type: object
                        properties:
                          project:
                            type: string
                          location:
                            type: string
                          googleCredentials:
                            type: object
                            properties:
                              privateKey:
                                type: string
                              clientEmail:
                                type: string
                            required:
                              - privateKey
                              - clientEmail
                        required:
                          - project
                          - location
                          - googleCredentials
                      concurrencyGroups:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            taskTypes:
                              type: array
                              items:
                                type: string
                                enum:
                                  - text
                                  - image
                              default: []
                            keys:
                              type: array
                              items:
                                type: object
                                properties:
                                  apiKey:
                                    type: string
                                  status:
                                    type: string
                                    enum:
                                      - verified
                                      - untested
                                      - error
                                    default: untested
                                required:
                                  - apiKey
                              default: []
                            perKey:
                              type: number
                              minimum: 1
                              maximum: 100
                              default: 5
                          required:
                            - id
                            - name
                      concurrencyPerKey:
                        type: number
                        minimum: 1
                        maximum: 100
                      modelMappings:
                        type: array
                        items:
                          type: object
                          properties:
                            sourceModelKey:
                              type: string
                            targetModelKey:
                              type: string
                            enabled:
                              type: boolean
                            createdTime:
                              type: string
                            lastModifiedTime:
                              type: string
                          required:
                            - sourceModelKey
                            - targetModelKey
                      realtimeTranscription:
                        type: object
                        nullable: true
                        properties:
                          enabled:
                            type: boolean
                          provider:
                            type: string
                            enum:
                              - openai
                            default: openai
                          apiKey:
                            type: string
                            nullable: true
                          endpoint:
                            type: string
                            nullable: true
                            format: uri
                          model:
                            type: string
                            enum:
                              - gpt-4o-mini-transcribe
                              - gpt-4o-transcribe
                              - whisper-1
                              - gpt-realtime-whisper
                            default: gpt-4o-mini-transcribe
                          status:
                            type: string
                            enum:
                              - untested
                              - verified
                              - error
                          testedAt:
                            type: string
                          maxSessionDurationSec:
                            type: number
                            minimum: 10
                            maximum: 600
                          sessionCreateLimitPerMinute:
                            type: number
                            minimum: 1
                            maximum: 60
                      enable:
                        type: boolean
                required:
                  - aiConfig
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request PATCH \
              --url https://app.teable.ai/api/admin/setting/ai-config \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"section":"llmApi","patch":{"llmProviders":[{"type":"openai","name":"string","displayName":"string","apiKey":"string","baseUrl":"http://example.com","models":"","isInstance":true,"modelConfigs":{"property1":{"label":"string","pricing":{"input":"string","output":"string","inputCacheRead":"string","inputCacheWrite":"string","reasoning":"string","image":"string","webSearch":"string","inputTiers":[{"cost":"string","min":0,"max":0}],"outputTiers":[{"cost":"string","min":0,"max":0}],"inputCacheReadTiers":[{"cost":"string","min":0,"max":0}],"inputCacheWriteTiers":[{"cost":"string","min":0,"max":0}]},"referenceModel":"string","inputRate":0,"outputRate":0,"cacheReadRate":0,"cacheWriteRate":0,"reasoningRate":0,"imageRate":0,"webSearchRate":0,"isImageModel":true,"ability":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":true},"imageAbility":{"generation":true,"imageToImage":true},"testedAt":0,"ownedBy":"alibaba","modelType":"language","tags":["string"],"contextWindow":0,"maxTokens":0,"description":"string"},"property2":{"label":"string","pricing":{"input":"string","output":"string","inputCacheRead":"string","inputCacheWrite":"string","reasoning":"string","image":"string","webSearch":"string","inputTiers":[{"cost":"string","min":0,"max":0}],"outputTiers":[{"cost":"string","min":0,"max":0}],"inputCacheReadTiers":[{"cost":"string","min":0,"max":0}],"inputCacheWriteTiers":[{"cost":"string","min":0,"max":0}]},"referenceModel":"string","inputRate":0,"outputRate":0,"cacheReadRate":0,"cacheWriteRate":0,"reasoningRate":0,"imageRate":0,"webSearchRate":0,"isImageModel":true,"ability":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":true},"imageAbility":{"generation":true,"imageToImage":true},"testedAt":0,"ownedBy":"alibaba","modelType":"language","tags":["string"],"contextWindow":0,"maxTokens":0,"description":"string"}}}],"aiGatewayApiKey":"string","aiGatewayBaseUrl":"http://example.com","attachmentTest":{"urlMode":{"success":true,"errorMessage":"string"},"base64Mode":{"success":true,"errorMessage":"string"},"testedAt":"string","testedOrigin":"string","recommendedMode":"url"},"attachmentTransferMode":"url"}}'
        - lang: JavaScript
          source: |-
            const url = 'https://app.teable.ai/api/admin/setting/ai-config';
            const options = {
              method: 'PATCH',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"section":"llmApi","patch":{"llmProviders":[{"type":"openai","name":"string","displayName":"string","apiKey":"string","baseUrl":"http://example.com","models":"","isInstance":true,"modelConfigs":{"property1":{"label":"string","pricing":{"input":"string","output":"string","inputCacheRead":"string","inputCacheWrite":"string","reasoning":"string","image":"string","webSearch":"string","inputTiers":[{"cost":"string","min":0,"max":0}],"outputTiers":[{"cost":"string","min":0,"max":0}],"inputCacheReadTiers":[{"cost":"string","min":0,"max":0}],"inputCacheWriteTiers":[{"cost":"string","min":0,"max":0}]},"referenceModel":"string","inputRate":0,"outputRate":0,"cacheReadRate":0,"cacheWriteRate":0,"reasoningRate":0,"imageRate":0,"webSearchRate":0,"isImageModel":true,"ability":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":true},"imageAbility":{"generation":true,"imageToImage":true},"testedAt":0,"ownedBy":"alibaba","modelType":"language","tags":["string"],"contextWindow":0,"maxTokens":0,"description":"string"},"property2":{"label":"string","pricing":{"input":"string","output":"string","inputCacheRead":"string","inputCacheWrite":"string","reasoning":"string","image":"string","webSearch":"string","inputTiers":[{"cost":"string","min":0,"max":0}],"outputTiers":[{"cost":"string","min":0,"max":0}],"inputCacheReadTiers":[{"cost":"string","min":0,"max":0}],"inputCacheWriteTiers":[{"cost":"string","min":0,"max":0}]},"referenceModel":"string","inputRate":0,"outputRate":0,"cacheReadRate":0,"cacheWriteRate":0,"reasoningRate":0,"imageRate":0,"webSearchRate":0,"isImageModel":true,"ability":{"image":true,"pdf":true,"webSearch":true,"toolCall":true,"reasoning":true,"imageGeneration":true},"imageAbility":{"generation":true,"imageToImage":true},"testedAt":0,"ownedBy":"alibaba","modelType":"language","tags":["string"],"contextWindow":0,"maxTokens":0,"description":"string"}}}],"aiGatewayApiKey":"string","aiGatewayBaseUrl":"http://example.com","attachmentTest":{"urlMode":{"success":true,"errorMessage":"string"},"base64Mode":{"success":true,"errorMessage":"string"},"testedAt":"string","testedOrigin":"string","recommendedMode":"url"},"attachmentTransferMode":"url"}}'
            };

            try {
              const response = await fetch(url, options);
              const data = await response.json();
              console.log(data);
            } catch (error) {
              console.error(error);
            }
        - lang: Node.js
          source: |-
            const http = require('https');

            const options = {
              method: 'PATCH',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/admin/setting/ai-config',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              section: 'llmApi',
              patch: {
                llmProviders: [
                  {
                    type: 'openai',
                    name: 'string',
                    displayName: 'string',
                    apiKey: 'string',
                    baseUrl: 'http://example.com',
                    models: '',
                    isInstance: true,
                    modelConfigs: {
                      property1: {
                        label: 'string',
                        pricing: {
                          input: 'string',
                          output: 'string',
                          inputCacheRead: 'string',
                          inputCacheWrite: 'string',
                          reasoning: 'string',
                          image: 'string',
                          webSearch: 'string',
                          inputTiers: [{cost: 'string', min: 0, max: 0}],
                          outputTiers: [{cost: 'string', min: 0, max: 0}],
                          inputCacheReadTiers: [{cost: 'string', min: 0, max: 0}],
                          inputCacheWriteTiers: [{cost: 'string', min: 0, max: 0}]
                        },
                        referenceModel: 'string',
                        inputRate: 0,
                        outputRate: 0,
                        cacheReadRate: 0,
                        cacheWriteRate: 0,
                        reasoningRate: 0,
                        imageRate: 0,
                        webSearchRate: 0,
                        isImageModel: true,
                        ability: {
                          image: true,
                          pdf: true,
                          webSearch: true,
                          toolCall: true,
                          reasoning: true,
                          imageGeneration: true
                        },
                        imageAbility: {generation: true, imageToImage: true},
                        testedAt: 0,
                        ownedBy: 'alibaba',
                        modelType: 'language',
                        tags: ['string'],
                        contextWindow: 0,
                        maxTokens: 0,
                        description: 'string'
                      },
                      property2: {
                        label: 'string',
                        pricing: {
                          input: 'string',
                          output: 'string',
                          inputCacheRead: 'string',
                          inputCacheWrite: 'string',
                          reasoning: 'string',
                          image: 'string',
                          webSearch: 'string',
                          inputTiers: [{cost: 'string', min: 0, max: 0}],
                          outputTiers: [{cost: 'string', min: 0, max: 0}],
                          inputCacheReadTiers: [{cost: 'string', min: 0, max: 0}],
                          inputCacheWriteTiers: [{cost: 'string', min: 0, max: 0}]
                        },
                        referenceModel: 'string',
                        inputRate: 0,
                        outputRate: 0,
                        cacheReadRate: 0,
                        cacheWriteRate: 0,
                        reasoningRate: 0,
                        imageRate: 0,
                        webSearchRate: 0,
                        isImageModel: true,
                        ability: {
                          image: true,
                          pdf: true,
                          webSearch: true,
                          toolCall: true,
                          reasoning: true,
                          imageGeneration: true
                        },
                        imageAbility: {generation: true, imageToImage: true},
                        testedAt: 0,
                        ownedBy: 'alibaba',
                        modelType: 'language',
                        tags: ['string'],
                        contextWindow: 0,
                        maxTokens: 0,
                        description: 'string'
                      }
                    }
                  }
                ],
                aiGatewayApiKey: 'string',
                aiGatewayBaseUrl: 'http://example.com',
                attachmentTest: {
                  urlMode: {success: true, errorMessage: 'string'},
                  base64Mode: {success: true, errorMessage: 'string'},
                  testedAt: 'string',
                  testedOrigin: 'string',
                  recommendedMode: 'url'
                },
                attachmentTransferMode: 'url'
              }
            }));
            req.end();
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("app.teable.ai")


            payload =
            "{\"section\":\"llmApi\",\"patch\":{\"llmProviders\":[{\"type\":\"openai\",\"name\":\"string\",\"displayName\":\"string\",\"apiKey\":\"string\",\"baseUrl\":\"http://example.com\",\"models\":\"\",\"isInstance\":true,\"modelConfigs\":{\"property1\":{\"label\":\"string\",\"pricing\":{\"input\":\"string\",\"output\":\"string\",\"inputCacheRead\":\"string\",\"inputCacheWrite\":\"string\",\"reasoning\":\"string\",\"image\":\"string\",\"webSearch\":\"string\",\"inputTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"outputTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"inputCacheReadTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"inputCacheWriteTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}]},\"referenceModel\":\"string\",\"inputRate\":0,\"outputRate\":0,\"cacheReadRate\":0,\"cacheWriteRate\":0,\"reasoningRate\":0,\"imageRate\":0,\"webSearchRate\":0,\"isImageModel\":true,\"ability\":{\"image\":true,\"pdf\":true,\"webSearch\":true,\"toolCall\":true,\"reasoning\":true,\"imageGeneration\":true},\"imageAbility\":{\"generation\":true,\"imageToImage\":true},\"testedAt\":0,\"ownedBy\":\"alibaba\",\"modelType\":\"language\",\"tags\":[\"string\"],\"contextWindow\":0,\"maxTokens\":0,\"description\":\"string\"},\"property2\":{\"label\":\"string\",\"pricing\":{\"input\":\"string\",\"output\":\"string\",\"inputCacheRead\":\"string\",\"inputCacheWrite\":\"string\",\"reasoning\":\"string\",\"image\":\"string\",\"webSearch\":\"string\",\"inputTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"outputTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"inputCacheReadTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}],\"inputCacheWriteTiers\":[{\"cost\":\"string\",\"min\":0,\"max\":0}]},\"referenceModel\":\"string\",\"inputRate\":0,\"outputRate\":0,\"cacheReadRate\":0,\"cacheWriteRate\":0,\"reasoningRate\":0,\"imageRate\":0,\"webSearchRate\":0,\"isImageModel\":true,\"ability\":{\"image\":true,\"pdf\":true,\"webSearch\":true,\"toolCall\":true,\"reasoning\":true,\"imageGeneration\":true},\"imageAbility\":{\"generation\":true,\"imageToImage\":true},\"testedAt\":0,\"ownedBy\":\"alibaba\",\"modelType\":\"language\",\"tags\":[\"string\"],\"contextWindow\":0,\"maxTokens\":0,\"description\":\"string\"}}}],\"aiGatewayApiKey\":\"string\",\"aiGatewayBaseUrl\":\"http://example.com\",\"attachmentTest\":{\"urlMode\":{\"success\":true,\"errorMessage\":\"string\"},\"base64Mode\":{\"success\":true,\"errorMessage\":\"string\"},\"testedAt\":\"string\",\"testedOrigin\":\"string\",\"recommendedMode\":\"url\"},\"attachmentTransferMode\":\"url\"}}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("PATCH", "/api/admin/setting/ai-config", payload,
            headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````