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

# Connect / Rotate Provider Credentials



## OpenAPI

````yaml PUT /v1/providers/{provider}
openapi: 3.0.0
info:
  title: Wardin API
  description: AI governance & observability platform — external REST API
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /v1/providers/{provider}:
    put:
      tags:
        - providers
      summary: Create or replace credentials for a provider
      operationId: ProvidersController_upsert
      parameters:
        - name: provider
          required: true
          in: path
          schema:
            type: string
            enum:
              - anthropic
              - openai
              - bedrock
              - vertex
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertProviderCredentialDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderCredentialResponseDto'
        '400':
          description: Invalid credentials shape
      security:
        - bearer: []
components:
  schemas:
    UpsertProviderCredentialDto:
      type: object
      properties:
        api_key:
          type: string
          description: anthropic | openai — the API key
          example: sk-ant-...
        base_url:
          type: string
          description: anthropic | openai — optional custom base URL
          example: https://api.anthropic.com
        access_key_id:
          type: string
          description: bedrock — AWS access key id
        secret_access_key:
          type: string
          description: bedrock — AWS secret access key
        region:
          type: string
          description: bedrock — AWS region, or vertex — optional GCP region
          example: us-east-1
        service_account_json:
          type: string
          description: vertex — GCP service-account JSON, as a string
    ProviderCredentialResponseDto:
      type: object
      properties:
        provider:
          type: string
          enum:
            - anthropic
            - openai
            - bedrock
            - vertex
        status:
          type: string
          enum:
            - active
            - disabled
        keyHint:
          type: string
          description: Last 4 characters of the primary secret, for display only
          example: '3456'
        updatedAt:
          format: date-time
          type: string
      required:
        - provider
        - status
        - keyHint
        - updatedAt
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````