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

# Set current active AI model for organization

> Legacy endpoint that sets the organization-wide active model by writing currentAiProviderIndex, currentAiModelIndex and currentAiModelVercelUniqueName. SUPERADMIN-only and tenant-scoped. Superseded by section-based model assignments.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/ai-models/organization/{organizationId}/current
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/ai-models/organization/{organizationId}/current:
    post:
      tags:
        - AI Models
      summary: Set current active AI model for organization
      description: >-
        Legacy endpoint that sets the organization-wide active model by writing
        currentAiProviderIndex, currentAiModelIndex and
        currentAiModelVercelUniqueName. SUPERADMIN-only and tenant-scoped.
        Superseded by section-based model assignments.
      operationId: set_current_ai_model
      parameters:
        - in: path
          name: organizationId
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetCurrentAiModelRequest'
      responses:
        '200':
          description: Current AI model updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiModelsSimpleSuccessResponse'
        '403':
          description: Only superadmins can configure tenant-wide model assignments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiModelsErrorResponse'
        '404':
          description: AI Model not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiModelsErrorResponse'
        '500':
          description: Failed to set current AI model
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiModelsErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    SetCurrentAiModelRequest:
      type: object
      properties:
        index:
          type: integer
          description: >-
            Position in the legacy `aiProviders[]` array. Superseded by section
            assignments.
        modelDetail:
          type: string
          description: >-
            `modelName` to activate within the chosen provider; must exist in
            that AiModel's `modelDetails`.
        aiModelId:
          type: string
          description: >-
            ObjectId of the `AiModel` registry entry whose `vercelUniqueName`
            becomes the org's current provider.
      required:
        - index
        - modelDetail
        - aiModelId
      additionalProperties: true
      example:
        index: 0
        modelDetail: claude-sonnet-4-6
        aiModelId: 5f7b1c2e8a1d4e0012c3b4a5
    AiModelsSimpleSuccessResponse:
      type: object
      description: >-
        Generic success envelope used for delete / update endpoints that do not
        return a resource.
      properties:
        success:
          type: boolean
          enum:
            - true
        message:
          type: string
      required:
        - success
      additionalProperties: true
      example:
        success: true
        message: API key for anthropic removed successfully
    AiModelsErrorResponse:
      type: object
      description: >-
        Error envelope returned by AI Models endpoints. `error` may be present
        on contract-validation failures.
      properties:
        success:
          type: boolean
          enum:
            - false
        message:
          type: string
        error:
          description: >-
            Optional error detail (string or structured object on validation
            failures).
      required:
        - success
      additionalProperties: true
      example:
        success: false
        message: Organization credentials not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````