> ## Documentation Index
> Fetch the complete documentation index at: https://omniflow-vpn.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Put v1panelsettingsaiproviders

> Requires settings.write. An omitted `apiKey` leaves the stored credential alone, so a display name can be corrected without re-pasting a secret.



## OpenAPI

````yaml https://raw.githubusercontent.com/kewldan/omniflow/main/api/openapi.yaml put /v1/panel/settings/ai/providers
openapi: 3.0.3
info:
  title: Omniflow API
  version: 1.0.0
  description: >-
    Customer, commerce, payment, wallet, fulfillment, and operations API for
    Omniflow.
servers: []
security: []
paths:
  /v1/panel/settings/ai/providers:
    put:
      tags:
        - panel
      description: >-
        Requires settings.write. An omitted `apiKey` leaves the stored
        credential alone, so a display name can be corrected without re-pasting
        a secret.
      operationId: savePanelAIProvider
      parameters:
        - $ref: '#/components/parameters/CSRFToken'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PanelAIProviderInput'
      responses:
        '200':
          description: Saved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PanelAIProvider'
        '403':
          $ref: '#/components/responses/Problem'
        '422':
          $ref: '#/components/responses/Problem'
components:
  parameters:
    CSRFToken:
      in: header
      name: X-CSRF-Token
      required: true
      description: >-
        Echoes the token from the current session. Required on every unsafe
        method.
      schema:
        type: string
  schemas:
    PanelAIProviderInput:
      allOf:
        - $ref: '#/components/schemas/PanelAIProvider'
        - type: object
          properties:
            apiKey:
              type: string
              description: >-
                Write-only and never returned. Omitting it leaves the stored
                credential alone, so a display name can be corrected without
                re-pasting a secret.
    PanelAIProvider:
      type: object
      required:
        - slug
        - kind
        - displayName
        - enabled
        - zeroRetention
        - trainsOnData
        - keyConfigured
        - lastCheckOk
        - updatedAt
      properties:
        slug:
          type: string
          pattern: ^[a-z0-9][a-z0-9_-]{1,40}$
        kind:
          type: string
          enum:
            - openai_compatible
            - anthropic
            - gemini
        displayName:
          type: string
          minLength: 1
          maxLength: 120
        baseUrl:
          type: string
          description: >-
            Where the provider is reached. Required for the OpenAI-compatible
            adapter, which is how an owner points at a model they host
            themselves. It is an address rather than a secret and is returned.
        enabled:
          type: boolean
        zeroRetention:
          type: boolean
          description: >-
            The owner's answer from the provider's own terms. Omniflow cannot
            verify it and does not pretend to; it is recorded so the panel can
            warn before a feature is switched on rather than after data left.
        trainsOnData:
          type: boolean
        retentionNote:
          type: string
          maxLength: 2000
        dataRegion:
          type: string
          maxLength: 60
        keyConfigured:
          type: boolean
          description: >-
            Whether a credential is stored. The credential itself is never
            returned.
        lastCheckedAt:
          type: string
          format: date-time
        lastCheckOk:
          type: boolean
        lastCheckError:
          type: string
          maxLength: 500
          description: >-
            Why the last test failed, or how the last one passed. It never
            carries the provider's own message, which can echo the prompt, and
            never a transport error, which can carry a key held in a query
            string.
        updatedAt:
          type: string
          format: date-time
    Problem:
      type: object
      required:
        - type
        - title
        - status
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        request_id:
          type: string
  responses:
    Problem:
      description: Request failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.