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

# Get model audit logs

> Returns audit-log entries for a single model, newest first. Use the filters to narrow by event type, actor, deployment, environment, source, or time window, and the cursor to page.

Related guide: [Audit logs](/organization/audit-logs).


## OpenAPI

````yaml get /v1/models/{model_id}/audit_logs
openapi: 3.1.0
info:
  description: REST API for management of Baseten resources
  title: Baseten management API
  version: 1.0.0
servers:
  - url: https://api.baseten.co
security:
  - BearerAuth: []
paths:
  /v1/models/{model_id}/audit_logs:
    parameters:
      - $ref: '#/components/parameters/model_id'
    get:
      summary: Gets the audit log for a model
      description: >-
        Returns audit-log entries for a single model, newest first. Use the
        filters to narrow by event type, actor, deployment, environment, source,
        or time window, and the cursor to page.
      parameters:
        - name: cursor
          in: query
          required: false
          description: >-
            Opaque cursor returned by a previous page. Omit to fetch the first
            page.
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: null
            title: Cursor
        - name: limit
          in: query
          required: false
          description: >-
            Maximum number of entries to return per page. Defaults to 20, and
            must be between 1 and 200.
          schema:
            default: 20
            maximum: 200
            minimum: 1
            title: Limit
            type: integer
        - name: direction
          in: query
          required: false
          description: >-
            Sort order by the time the action occurred. Defaults to DESC (newest
            first). Ignored when paginating with a cursor.
          schema:
            $ref: '#/components/schemas/AuditLogSortDirectionV1'
            default: DESC
        - name: search
          in: query
          required: false
          description: >-
            Case-insensitive substring matched against resource names and IDs in
            the entry.
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: null
            title: Search
        - name: event_type_groups
          in: query
          required: false
          description: >-
            When set, returns only entries whose event type falls in one of
            these groups.
          schema:
            items:
              $ref: '#/components/schemas/AuditLogEventTypeGroupV1'
            title: Event Type Groups
            type: array
        - name: user_ids
          in: query
          required: false
          description: >-
            When set, returns only entries whose acting user is one of these
            IDs.
          schema:
            items:
              type: string
            title: User Ids
            type: array
        - name: deployment_ids
          in: query
          required: false
          description: >-
            When set, returns only entries referencing one of these model
            deployment IDs.
          schema:
            items:
              type: string
            title: Deployment Ids
            type: array
        - name: chain_deployment_ids
          in: query
          required: false
          description: >-
            When set, returns only entries referencing one of these chain
            deployment IDs.
          schema:
            items:
              type: string
            title: Chain Deployment Ids
            type: array
        - name: environment_names
          in: query
          required: false
          description: When set, returns only entries for one of these environments.
          schema:
            items:
              type: string
            title: Environment Names
            type: array
        - name: sources
          in: query
          required: false
          description: When set, returns only entries issued from one of these surfaces.
          schema:
            items:
              $ref: '#/components/schemas/AuditLogSourceV1'
            title: Sources
            type: array
        - name: start_epoch_millis
          in: query
          required: false
          description: >-
            Epoch milliseconds for the start of the window. Defaults to the
            beginning of the audit-log history.
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            default: null
            title: Start Epoch Millis
        - name: end_epoch_millis
          in: query
          required: false
          description: >-
            Epoch milliseconds for the end of the window. Defaults to the
            current time.
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            default: null
            title: End Epoch Millis
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAuditLogsResponseV1'
      x-codeSamples:
        - lang: bash
          source: |
            curl --request GET \
            --url https://api.baseten.co/v1/models/{model_id}/audit_logs \
            --header "Authorization: Bearer $BASETEN_API_KEY"
        - lang: python
          source: |-
            import requests
            import os
            API_KEY = os.environ.get("BASETEN_API_KEY", "<YOUR_API_KEY>")
            url = "https://api.baseten.co/v1/models/{model_id}/audit_logs"

            headers = {"Authorization": f"Bearer {API_KEY}"}

            response = requests.request(
                "GET",
                url,
                headers=headers,
                json={}
            )

            print(response.text)
components:
  parameters:
    model_id:
      schema:
        type: string
      name: model_id
      in: path
      required: true
  schemas:
    AuditLogSortDirectionV1:
      description: Sort order of returned entries, by creation time.
      enum:
        - DESC
        - ASC
      title: AuditLogSortDirectionV1
      type: string
    AuditLogEventTypeGroupV1:
      description: Coarse grouping of event types, used to filter the audit log.
      enum:
        - DEPLOYED
        - PROMOTED
        - ACTIVATED_DEACTIVATED
        - AUTOSCALING_SETTINGS
        - INSTANCE_TYPE_CHANGED
        - ENVIRONMENT_SETTINGS
        - REPLICA_TERMINATED
        - DELETED
        - SECRETS
        - API_KEYS
        - GATEWAY
        - WEBHOOK_SIGNING_SECRETS
        - USER_MANAGEMENT
        - DIRECTORY_GROUP_MANAGEMENT
        - SSH
      title: AuditLogEventTypeGroupV1
      type: string
    AuditLogSourceV1:
      description: Surface that issued the audited action.
      enum:
        - UI
        - API
        - MCP
        - OTHER
      title: AuditLogSourceV1
      type: string
    ListAuditLogsResponseV1:
      description: A page of audit-log entries, newest first by default.
      properties:
        items:
          description: Items in this page.
          items:
            $ref: '#/components/schemas/AuditLogEntryV1'
          title: Items
          type: array
        pagination:
          $ref: '#/components/schemas/PaginationResponseV1'
          description: Pagination metadata for the page.
      required:
        - items
        - pagination
      title: ListAuditLogsResponseV1
      type: object
    AuditLogEntryV1:
      description: A single audit-log entry.
      properties:
        id:
          description: Unique identifier of the audit-log entry.
          title: Id
          type: string
        created:
          description: Time the action occurred, in ISO 8601 format.
          format: date-time
          title: Created
          type: string
        event_type:
          $ref: '#/components/schemas/AuditLogEventTypeV1'
          description: Type of action that was recorded.
        event_data:
          description: Structured details of the action, discriminated by `event_type`.
          discriminator:
            mapping:
              API_KEY_CREATED:
                $ref: '#/components/schemas/AuditLogEventApiKeyCreatedV1'
              API_KEY_DELETED:
                $ref: '#/components/schemas/AuditLogEventApiKeyDeletedV1'
              CHAINLET_AUTOSCALING_SETTINGS_CHANGED:
                $ref: >-
                  #/components/schemas/AuditLogEventChainletAutoscalingSettingsChangedV1
              CHAINLET_INSTANCE_TYPE_CHANGED:
                $ref: >-
                  #/components/schemas/AuditLogEventChainletInstanceTypeChangedV1
              CHAIN_DELETED:
                $ref: '#/components/schemas/AuditLogEventChainDeletedV1'
              CHAIN_DEPLOYED:
                $ref: '#/components/schemas/AuditLogEventChainDeployedV1'
              CHAIN_DEPLOYMENT_ACTIVATED:
                $ref: '#/components/schemas/AuditLogEventChainDeploymentActivatedV1'
              CHAIN_DEPLOYMENT_DEACTIVATED:
                $ref: '#/components/schemas/AuditLogEventChainDeploymentDeactivatedV1'
              CHAIN_DEPLOYMENT_DELETED:
                $ref: '#/components/schemas/AuditLogEventChainDeploymentDeletedV1'
              CHAIN_DEPLOYMENT_PROMOTED:
                $ref: '#/components/schemas/AuditLogEventChainDeploymentPromotedV1'
              CHAIN_ENVIRONMENT_CREATED:
                $ref: '#/components/schemas/AuditLogEventChainEnvironmentCreatedV1'
              CHAIN_ENVIRONMENT_UPDATED:
                $ref: '#/components/schemas/AuditLogEventChainEnvironmentUpdatedV1'
              DIRECTORY_GROUP_ROLE_UPDATED:
                $ref: '#/components/schemas/AuditLogEventDirectoryGroupRoleUpdatedV1'
              ENVIRONMENT_CREATED:
                $ref: '#/components/schemas/AuditLogEventEnvironmentCreatedV1'
              ENVIRONMENT_DELETED:
                $ref: '#/components/schemas/AuditLogEventEnvironmentDeletedV1'
              ENVIRONMENT_UPDATED:
                $ref: '#/components/schemas/AuditLogEventEnvironmentUpdatedV1'
              GATEWAY_ENDPOINT_CREATED:
                $ref: '#/components/schemas/AuditLogEventGatewayEndpointCreatedV1'
              GATEWAY_ENDPOINT_DELETED:
                $ref: '#/components/schemas/AuditLogEventGatewayEndpointDeletedV1'
              GATEWAY_ENDPOINT_UPDATED:
                $ref: '#/components/schemas/AuditLogEventGatewayEndpointUpdatedV1'
              MODEL_DELETED:
                $ref: '#/components/schemas/AuditLogEventModelDeletedV1'
              MODEL_DEPLOYED:
                $ref: '#/components/schemas/AuditLogEventModelDeployedV1'
              MODEL_DEPLOYMENT_ACTIVATED:
                $ref: '#/components/schemas/AuditLogEventModelDeploymentActivatedV1'
              MODEL_DEPLOYMENT_AUTOSCALING_SETTINGS_CHANGED:
                $ref: >-
                  #/components/schemas/AuditLogEventModelDeploymentAutoscalingSettingsChangedV1
              MODEL_DEPLOYMENT_DEACTIVATED:
                $ref: '#/components/schemas/AuditLogEventModelDeploymentDeactivatedV1'
              MODEL_DEPLOYMENT_DELETED:
                $ref: '#/components/schemas/AuditLogEventModelDeploymentDeletedV1'
              MODEL_DEPLOYMENT_INSTANCE_TYPE_CHANGED:
                $ref: >-
                  #/components/schemas/AuditLogEventModelDeploymentInstanceTypeChangedV1
              MODEL_DEPLOYMENT_PROMOTED:
                $ref: '#/components/schemas/AuditLogEventModelDeploymentPromotedV1'
              MODEL_DEPLOYMENT_RETRIED:
                $ref: '#/components/schemas/AuditLogEventModelDeploymentRetriedV1'
              MODEL_PROMOTION_CONTROL_ACTION:
                $ref: >-
                  #/components/schemas/AuditLogEventModelPromotionControlActionV1
              REPLICA_TERMINATED:
                $ref: '#/components/schemas/AuditLogEventReplicaTerminatedV1'
              REQUIRE_GROUP_BASED_ADMINS_ENABLED:
                $ref: >-
                  #/components/schemas/AuditLogEventRequireGroupBasedAdminsEnabledV1
              SECRET_DELETED:
                $ref: '#/components/schemas/AuditLogEventSecretDeletedV1'
              SECRET_UPDATED:
                $ref: '#/components/schemas/AuditLogEventSecretUpdatedV1'
              SSH_CERTIFICATE_SIGNED:
                $ref: '#/components/schemas/AuditLogEventSshCertificateSignedV1'
              USER_INVITED:
                $ref: '#/components/schemas/AuditLogEventUserInvitedV1'
              USER_JOINED_ORGANIZATION:
                $ref: '#/components/schemas/AuditLogEventUserJoinedOrganizationV1'
              USER_REMOVED:
                $ref: '#/components/schemas/AuditLogEventUserRemovedV1'
              USER_ROLE_UPDATED:
                $ref: '#/components/schemas/AuditLogEventUserRoleUpdatedV1'
              USER_TEAM_ROLE_UPDATED:
                $ref: '#/components/schemas/AuditLogEventUserTeamRoleUpdatedV1'
              WEBHOOK_SIGNING_SECRET_CREATED:
                $ref: >-
                  #/components/schemas/AuditLogEventWebhookSigningSecretCreatedV1
              WEBHOOK_SIGNING_SECRET_DELETED:
                $ref: >-
                  #/components/schemas/AuditLogEventWebhookSigningSecretDeletedV1
              WEBHOOK_SIGNING_SECRET_ROTATED:
                $ref: >-
                  #/components/schemas/AuditLogEventWebhookSigningSecretRotatedV1
            propertyName: event_type
          oneOf:
            - $ref: '#/components/schemas/AuditLogEventModelDeployedV1'
            - $ref: '#/components/schemas/AuditLogEventModelDeploymentActivatedV1'
            - $ref: '#/components/schemas/AuditLogEventModelDeploymentDeactivatedV1'
            - $ref: '#/components/schemas/AuditLogEventModelDeploymentRetriedV1'
            - $ref: '#/components/schemas/AuditLogEventModelDeploymentPromotedV1'
            - $ref: >-
                #/components/schemas/AuditLogEventModelDeploymentAutoscalingSettingsChangedV1
            - $ref: >-
                #/components/schemas/AuditLogEventModelDeploymentInstanceTypeChangedV1
            - $ref: '#/components/schemas/AuditLogEventModelDeploymentDeletedV1'
            - $ref: '#/components/schemas/AuditLogEventModelDeletedV1'
            - $ref: '#/components/schemas/AuditLogEventChainDeployedV1'
            - $ref: '#/components/schemas/AuditLogEventChainDeploymentActivatedV1'
            - $ref: '#/components/schemas/AuditLogEventChainDeploymentDeactivatedV1'
            - $ref: '#/components/schemas/AuditLogEventChainDeploymentPromotedV1'
            - $ref: >-
                #/components/schemas/AuditLogEventChainletAutoscalingSettingsChangedV1
            - $ref: '#/components/schemas/AuditLogEventChainletInstanceTypeChangedV1'
            - $ref: '#/components/schemas/AuditLogEventChainDeploymentDeletedV1'
            - $ref: '#/components/schemas/AuditLogEventChainDeletedV1'
            - $ref: '#/components/schemas/AuditLogEventChainEnvironmentCreatedV1'
            - $ref: '#/components/schemas/AuditLogEventChainEnvironmentUpdatedV1'
            - $ref: '#/components/schemas/AuditLogEventSecretUpdatedV1'
            - $ref: '#/components/schemas/AuditLogEventSecretDeletedV1'
            - $ref: '#/components/schemas/AuditLogEventApiKeyCreatedV1'
            - $ref: '#/components/schemas/AuditLogEventApiKeyDeletedV1'
            - $ref: '#/components/schemas/AuditLogEventGatewayEndpointCreatedV1'
            - $ref: '#/components/schemas/AuditLogEventGatewayEndpointUpdatedV1'
            - $ref: '#/components/schemas/AuditLogEventGatewayEndpointDeletedV1'
            - $ref: '#/components/schemas/AuditLogEventUserInvitedV1'
            - $ref: '#/components/schemas/AuditLogEventUserJoinedOrganizationV1'
            - $ref: '#/components/schemas/AuditLogEventWebhookSigningSecretCreatedV1'
            - $ref: '#/components/schemas/AuditLogEventWebhookSigningSecretRotatedV1'
            - $ref: '#/components/schemas/AuditLogEventWebhookSigningSecretDeletedV1'
            - $ref: '#/components/schemas/AuditLogEventUserRoleUpdatedV1'
            - $ref: '#/components/schemas/AuditLogEventUserTeamRoleUpdatedV1'
            - $ref: '#/components/schemas/AuditLogEventUserRemovedV1'
            - $ref: '#/components/schemas/AuditLogEventDirectoryGroupRoleUpdatedV1'
            - $ref: >-
                #/components/schemas/AuditLogEventRequireGroupBasedAdminsEnabledV1
            - $ref: '#/components/schemas/AuditLogEventEnvironmentCreatedV1'
            - $ref: '#/components/schemas/AuditLogEventEnvironmentUpdatedV1'
            - $ref: '#/components/schemas/AuditLogEventEnvironmentDeletedV1'
            - $ref: '#/components/schemas/AuditLogEventReplicaTerminatedV1'
            - $ref: '#/components/schemas/AuditLogEventModelPromotionControlActionV1'
            - $ref: '#/components/schemas/AuditLogEventSshCertificateSignedV1'
          title: Event Data
        source:
          anyOf:
            - $ref: '#/components/schemas/AuditLogSourceV1'
            - type: 'null'
          default: null
          description: Surface that issued the action, if known.
        actor:
          $ref: '#/components/schemas/AuditLogActorV1'
          description: The actor that performed the action.
        client_name:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Name of the client that issued the action, if known.
          title: Client Name
        client_version:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Version of the client that issued the action, if known.
          title: Client Version
        client_session_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Opaque identifier grouping actions from the same client session, if
            known.
          title: Client Session Id
      required:
        - id
        - created
        - event_type
        - event_data
        - actor
      title: AuditLogEntryV1
      type: object
    PaginationResponseV1:
      properties:
        has_more:
          description: Whether more items exist after this page.
          title: Has More
          type: boolean
        cursor:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Opaque cursor to pass into the next request. Null when there is no
            next page.
          title: Cursor
      required:
        - has_more
      title: PaginationResponseV1
      type: object
    AuditLogEventTypeV1:
      description: Type of action recorded by an audit-log entry.
      enum:
        - MODEL_DEPLOYED
        - MODEL_DEPLOYMENT_ACTIVATED
        - MODEL_DEPLOYMENT_DEACTIVATED
        - MODEL_DEPLOYMENT_RETRIED
        - MODEL_DEPLOYMENT_PROMOTED
        - MODEL_DEPLOYMENT_AUTOSCALING_SETTINGS_CHANGED
        - MODEL_DEPLOYMENT_INSTANCE_TYPE_CHANGED
        - MODEL_DEPLOYMENT_DELETED
        - MODEL_DELETED
        - CHAIN_DEPLOYED
        - CHAIN_DEPLOYMENT_ACTIVATED
        - CHAIN_DEPLOYMENT_DEACTIVATED
        - CHAIN_DEPLOYMENT_PROMOTED
        - CHAINLET_AUTOSCALING_SETTINGS_CHANGED
        - CHAINLET_INSTANCE_TYPE_CHANGED
        - CHAIN_DEPLOYMENT_DELETED
        - CHAIN_DELETED
        - CHAIN_ENVIRONMENT_CREATED
        - CHAIN_ENVIRONMENT_UPDATED
        - SECRET_UPDATED
        - SECRET_DELETED
        - API_KEY_CREATED
        - API_KEY_DELETED
        - GATEWAY_ENDPOINT_CREATED
        - GATEWAY_ENDPOINT_UPDATED
        - GATEWAY_ENDPOINT_DELETED
        - USER_INVITED
        - USER_JOINED_ORGANIZATION
        - WEBHOOK_SIGNING_SECRET_CREATED
        - WEBHOOK_SIGNING_SECRET_ROTATED
        - WEBHOOK_SIGNING_SECRET_DELETED
        - USER_ROLE_UPDATED
        - USER_TEAM_ROLE_UPDATED
        - USER_REMOVED
        - DIRECTORY_GROUP_ROLE_UPDATED
        - REQUIRE_GROUP_BASED_ADMINS_ENABLED
        - ENVIRONMENT_CREATED
        - ENVIRONMENT_UPDATED
        - ENVIRONMENT_DELETED
        - REPLICA_TERMINATED
        - MODEL_PROMOTION_CONTROL_ACTION
        - SSH_CERTIFICATE_SIGNED
      title: AuditLogEventTypeV1
      type: string
    AuditLogEventApiKeyCreatedV1:
      additionalProperties: false
      description: An API key was created.
      properties:
        event_type:
          const: API_KEY_CREATED
          title: Event Type
          type: string
        api_key_id:
          title: Api Key Id
          type: string
        api_key_type:
          $ref: '#/components/schemas/AuditLogApiKeyTypeV1'
        prefix:
          title: Prefix
          type: string
      required:
        - event_type
        - api_key_id
        - api_key_type
        - prefix
      title: AuditLogEventApiKeyCreatedV1
      type: object
    AuditLogEventApiKeyDeletedV1:
      additionalProperties: false
      description: An API key was revoked.
      properties:
        event_type:
          const: API_KEY_DELETED
          title: Event Type
          type: string
        api_key_id:
          title: Api Key Id
          type: string
        api_key_type:
          $ref: '#/components/schemas/AuditLogApiKeyTypeV1'
        prefix:
          title: Prefix
          type: string
      required:
        - event_type
        - api_key_id
        - api_key_type
        - prefix
      title: AuditLogEventApiKeyDeletedV1
      type: object
    AuditLogEventChainletAutoscalingSettingsChangedV1:
      additionalProperties: false
      description: A chainlet's autoscaling settings were changed.
      properties:
        min_replica:
          title: Min Replica
          type: integer
        max_replica:
          title: Max Replica
          type: integer
        concurrency_target:
          title: Concurrency Target
          type: integer
        autoscaling_window:
          anyOf:
            - type: integer
            - type: 'null'
          title: Autoscaling Window
        scale_down_delay:
          anyOf:
            - type: integer
            - type: 'null'
          title: Scale Down Delay
        target_utilization_percentage:
          anyOf:
            - type: integer
            - type: 'null'
          title: Target Utilization Percentage
        target_in_flight_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Target In Flight Tokens
        max_scale_down_rate:
          anyOf:
            - type: number
            - type: 'null'
          title: Max Scale Down Rate
        event_type:
          const: CHAINLET_AUTOSCALING_SETTINGS_CHANGED
          title: Event Type
          type: string
        chain_id:
          title: Chain Id
          type: string
        chain_name:
          title: Chain Name
          type: string
        chain_deployment_id:
          title: Chain Deployment Id
          type: string
        chain_deployment_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Chain Deployment Name
        chainlet_name:
          title: Chainlet Name
          type: string
        chainlet_id:
          title: Chainlet Id
          type: string
        previous_settings:
          anyOf:
            - $ref: '#/components/schemas/AuditLogEventAutoscalingSettingsV1'
            - type: 'null'
      required:
        - min_replica
        - max_replica
        - concurrency_target
        - autoscaling_window
        - scale_down_delay
        - target_utilization_percentage
        - target_in_flight_tokens
        - max_scale_down_rate
        - event_type
        - chain_id
        - chain_name
        - chain_deployment_id
        - chain_deployment_name
        - chainlet_name
        - chainlet_id
        - previous_settings
      title: AuditLogEventChainletAutoscalingSettingsChangedV1
      type: object
    AuditLogEventChainletInstanceTypeChangedV1:
      additionalProperties: false
      description: A chainlet's instance type was changed.
      properties:
        event_type:
          const: CHAINLET_INSTANCE_TYPE_CHANGED
          title: Event Type
          type: string
        chain_id:
          title: Chain Id
          type: string
        chain_name:
          title: Chain Name
          type: string
        chain_deployment_id:
          title: Chain Deployment Id
          type: string
        chain_deployment_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Chain Deployment Name
        chainlet_name:
          title: Chainlet Name
          type: string
        chainlet_id:
          title: Chainlet Id
          type: string
        instance_type_name:
          title: Instance Type Name
          type: string
      required:
        - event_type
        - chain_id
        - chain_name
        - chain_deployment_id
        - chain_deployment_name
        - chainlet_name
        - chainlet_id
        - instance_type_name
      title: AuditLogEventChainletInstanceTypeChangedV1
      type: object
    AuditLogEventChainDeletedV1:
      additionalProperties: false
      description: A chain was deleted.
      properties:
        event_type:
          const: CHAIN_DELETED
          title: Event Type
          type: string
        chain_id:
          title: Chain Id
          type: string
        chain_name:
          title: Chain Name
          type: string
        chain_deployment_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Chain Deployment Name
      required:
        - event_type
        - chain_id
        - chain_name
        - chain_deployment_name
      title: AuditLogEventChainDeletedV1
      type: object
    AuditLogEventChainDeployedV1:
      additionalProperties: false
      description: A chain deployment was created.
      properties:
        event_type:
          const: CHAIN_DEPLOYED
          title: Event Type
          type: string
        chain_id:
          title: Chain Id
          type: string
        chain_name:
          title: Chain Name
          type: string
        chain_deployment_id:
          title: Chain Deployment Id
          type: string
        chain_deployment_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Chain Deployment Name
        is_primary:
          title: Is Primary
          type: boolean
        publish:
          title: Publish
          type: boolean
      required:
        - event_type
        - chain_id
        - chain_name
        - chain_deployment_id
        - chain_deployment_name
        - is_primary
        - publish
      title: AuditLogEventChainDeployedV1
      type: object
    AuditLogEventChainDeploymentActivatedV1:
      additionalProperties: false
      description: A chain deployment was activated.
      properties:
        event_type:
          const: CHAIN_DEPLOYMENT_ACTIVATED
          title: Event Type
          type: string
        chain_id:
          title: Chain Id
          type: string
        chain_name:
          title: Chain Name
          type: string
        chain_deployment_id:
          title: Chain Deployment Id
          type: string
        chain_deployment_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Chain Deployment Name
      required:
        - event_type
        - chain_id
        - chain_name
        - chain_deployment_id
        - chain_deployment_name
      title: AuditLogEventChainDeploymentActivatedV1
      type: object
    AuditLogEventChainDeploymentDeactivatedV1:
      additionalProperties: false
      description: A chain deployment was deactivated.
      properties:
        event_type:
          const: CHAIN_DEPLOYMENT_DEACTIVATED
          title: Event Type
          type: string
        chain_id:
          title: Chain Id
          type: string
        chain_name:
          title: Chain Name
          type: string
        chain_deployment_id:
          title: Chain Deployment Id
          type: string
        chain_deployment_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Chain Deployment Name
      required:
        - event_type
        - chain_id
        - chain_name
        - chain_deployment_id
        - chain_deployment_name
      title: AuditLogEventChainDeploymentDeactivatedV1
      type: object
    AuditLogEventChainDeploymentDeletedV1:
      additionalProperties: false
      description: A chain deployment was deleted.
      properties:
        event_type:
          const: CHAIN_DEPLOYMENT_DELETED
          title: Event Type
          type: string
        chain_id:
          title: Chain Id
          type: string
        chain_name:
          title: Chain Name
          type: string
        chain_deployment_id:
          title: Chain Deployment Id
          type: string
        deployment_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Deployment Name
      required:
        - event_type
        - chain_id
        - chain_name
        - chain_deployment_id
        - deployment_name
      title: AuditLogEventChainDeploymentDeletedV1
      type: object
    AuditLogEventChainDeploymentPromotedV1:
      additionalProperties: false
      description: A chain deployment was promoted to an environment.
      properties:
        event_type:
          const: CHAIN_DEPLOYMENT_PROMOTED
          title: Event Type
          type: string
        chain_id:
          title: Chain Id
          type: string
        chain_name:
          title: Chain Name
          type: string
        chain_deployment_id:
          title: Chain Deployment Id
          type: string
        chain_deployment_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Chain Deployment Name
        environment_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Environment Name
        environment_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Environment Id
      required:
        - event_type
        - chain_id
        - chain_name
        - chain_deployment_id
        - chain_deployment_name
        - environment_name
        - environment_id
      title: AuditLogEventChainDeploymentPromotedV1
      type: object
    AuditLogEventChainEnvironmentCreatedV1:
      additionalProperties: false
      description: A chain environment was created.
      properties:
        event_type:
          const: CHAIN_ENVIRONMENT_CREATED
          title: Event Type
          type: string
        chain_id:
          title: Chain Id
          type: string
        chain_name:
          title: Chain Name
          type: string
        environment_name:
          title: Environment Name
          type: string
        redeploy_on_promotion:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Redeploy On Promotion
        ramp_up_while_promoting:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Ramp Up While Promoting
        ramp_up_duration_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ramp Up Duration Seconds
      required:
        - event_type
        - chain_id
        - chain_name
        - environment_name
        - redeploy_on_promotion
        - ramp_up_while_promoting
        - ramp_up_duration_seconds
      title: AuditLogEventChainEnvironmentCreatedV1
      type: object
    AuditLogEventChainEnvironmentUpdatedV1:
      additionalProperties: false
      description: A chain environment was updated.
      properties:
        event_type:
          const: CHAIN_ENVIRONMENT_UPDATED
          title: Event Type
          type: string
        chain_id:
          title: Chain Id
          type: string
        chain_name:
          title: Chain Name
          type: string
        environment_name:
          title: Environment Name
          type: string
        redeploy_on_promotion:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Redeploy On Promotion
        ramp_up_while_promoting:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Ramp Up While Promoting
        ramp_up_duration_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ramp Up Duration Seconds
      required:
        - event_type
        - chain_id
        - chain_name
        - environment_name
        - redeploy_on_promotion
        - ramp_up_while_promoting
        - ramp_up_duration_seconds
      title: AuditLogEventChainEnvironmentUpdatedV1
      type: object
    AuditLogEventDirectoryGroupRoleUpdatedV1:
      additionalProperties: false
      description: A directory group's role was updated.
      properties:
        event_type:
          const: DIRECTORY_GROUP_ROLE_UPDATED
          title: Event Type
          type: string
        directory_group_id:
          title: Directory Group Id
          type: string
        directory_group_name:
          title: Directory Group Name
          type: string
        new_role_name:
          title: New Role Name
          type: string
        team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Team Id
        team_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Team Name
      required:
        - event_type
        - directory_group_id
        - directory_group_name
        - new_role_name
        - team_id
        - team_name
      title: AuditLogEventDirectoryGroupRoleUpdatedV1
      type: object
    AuditLogEventEnvironmentCreatedV1:
      additionalProperties: false
      description: A model environment was created.
      properties:
        min_replica:
          title: Min Replica
          type: integer
        max_replica:
          title: Max Replica
          type: integer
        concurrency_target:
          title: Concurrency Target
          type: integer
        autoscaling_window:
          anyOf:
            - type: integer
            - type: 'null'
          title: Autoscaling Window
        scale_down_delay:
          anyOf:
            - type: integer
            - type: 'null'
          title: Scale Down Delay
        target_utilization_percentage:
          anyOf:
            - type: integer
            - type: 'null'
          title: Target Utilization Percentage
        target_in_flight_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Target In Flight Tokens
        max_scale_down_rate:
          anyOf:
            - type: number
            - type: 'null'
          title: Max Scale Down Rate
        redeploy_on_promotion:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Redeploy On Promotion
        rolling_deploy:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Rolling Deploy
        rolling_deploy_strategy:
          anyOf:
            - type: string
            - type: 'null'
          title: Rolling Deploy Strategy
        max_unavailable_percent:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Unavailable Percent
        max_surge_percent:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Surge Percent
        stabilization_time_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Stabilization Time Seconds
        replica_overhead_percent:
          anyOf:
            - type: integer
            - type: 'null'
          title: Replica Overhead Percent
        promotion_cleanup_strategy:
          anyOf:
            - type: string
            - type: 'null'
          title: Promotion Cleanup Strategy
        ramp_up_while_promoting:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Ramp Up While Promoting
        ramp_up_duration_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ramp Up Duration Seconds
        ramp_up_step_size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ramp Up Step Size
        model_id:
          title: Model Id
          type: string
        model_name:
          title: Model Name
          type: string
        environment_name:
          title: Environment Name
          type: string
        deployment_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Deployment Type
        event_type:
          const: ENVIRONMENT_CREATED
          title: Event Type
          type: string
      required:
        - min_replica
        - max_replica
        - concurrency_target
        - autoscaling_window
        - scale_down_delay
        - target_utilization_percentage
        - target_in_flight_tokens
        - max_scale_down_rate
        - redeploy_on_promotion
        - rolling_deploy
        - rolling_deploy_strategy
        - max_unavailable_percent
        - max_surge_percent
        - stabilization_time_seconds
        - replica_overhead_percent
        - promotion_cleanup_strategy
        - ramp_up_while_promoting
        - ramp_up_duration_seconds
        - ramp_up_step_size
        - model_id
        - model_name
        - environment_name
        - deployment_type
        - event_type
      title: AuditLogEventEnvironmentCreatedV1
      type: object
    AuditLogEventEnvironmentDeletedV1:
      additionalProperties: false
      description: A model environment was deleted.
      properties:
        event_type:
          const: ENVIRONMENT_DELETED
          title: Event Type
          type: string
        model_id:
          title: Model Id
          type: string
        model_name:
          title: Model Name
          type: string
        environment_name:
          title: Environment Name
          type: string
      required:
        - event_type
        - model_id
        - model_name
        - environment_name
      title: AuditLogEventEnvironmentDeletedV1
      type: object
    AuditLogEventEnvironmentUpdatedV1:
      additionalProperties: false
      description: A model environment's settings were updated.
      properties:
        min_replica:
          title: Min Replica
          type: integer
        max_replica:
          title: Max Replica
          type: integer
        concurrency_target:
          title: Concurrency Target
          type: integer
        autoscaling_window:
          anyOf:
            - type: integer
            - type: 'null'
          title: Autoscaling Window
        scale_down_delay:
          anyOf:
            - type: integer
            - type: 'null'
          title: Scale Down Delay
        target_utilization_percentage:
          anyOf:
            - type: integer
            - type: 'null'
          title: Target Utilization Percentage
        target_in_flight_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Target In Flight Tokens
        max_scale_down_rate:
          anyOf:
            - type: number
            - type: 'null'
          title: Max Scale Down Rate
        redeploy_on_promotion:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Redeploy On Promotion
        rolling_deploy:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Rolling Deploy
        rolling_deploy_strategy:
          anyOf:
            - type: string
            - type: 'null'
          title: Rolling Deploy Strategy
        max_unavailable_percent:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Unavailable Percent
        max_surge_percent:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Surge Percent
        stabilization_time_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Stabilization Time Seconds
        replica_overhead_percent:
          anyOf:
            - type: integer
            - type: 'null'
          title: Replica Overhead Percent
        promotion_cleanup_strategy:
          anyOf:
            - type: string
            - type: 'null'
          title: Promotion Cleanup Strategy
        ramp_up_while_promoting:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Ramp Up While Promoting
        ramp_up_duration_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ramp Up Duration Seconds
        ramp_up_step_size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ramp Up Step Size
        model_id:
          title: Model Id
          type: string
        model_name:
          title: Model Name
          type: string
        environment_name:
          title: Environment Name
          type: string
        deployment_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Deployment Type
        event_type:
          const: ENVIRONMENT_UPDATED
          title: Event Type
          type: string
        previous_settings:
          anyOf:
            - $ref: '#/components/schemas/AuditLogEventEnvironmentSettingsV1'
            - type: 'null'
      required:
        - min_replica
        - max_replica
        - concurrency_target
        - autoscaling_window
        - scale_down_delay
        - target_utilization_percentage
        - target_in_flight_tokens
        - max_scale_down_rate
        - redeploy_on_promotion
        - rolling_deploy
        - rolling_deploy_strategy
        - max_unavailable_percent
        - max_surge_percent
        - stabilization_time_seconds
        - replica_overhead_percent
        - promotion_cleanup_strategy
        - ramp_up_while_promoting
        - ramp_up_duration_seconds
        - ramp_up_step_size
        - model_id
        - model_name
        - environment_name
        - deployment_type
        - event_type
        - previous_settings
      title: AuditLogEventEnvironmentUpdatedV1
      type: object
    AuditLogEventGatewayEndpointCreatedV1:
      additionalProperties: false
      description: A Frontier Gateway endpoint was created.
      properties:
        event_type:
          const: GATEWAY_ENDPOINT_CREATED
          title: Event Type
          type: string
        gateway_endpoint_id:
          title: Gateway Endpoint Id
          type: string
        slug:
          title: Slug
          type: string
      required:
        - event_type
        - gateway_endpoint_id
        - slug
      title: AuditLogEventGatewayEndpointCreatedV1
      type: object
    AuditLogEventGatewayEndpointDeletedV1:
      additionalProperties: false
      description: A Frontier Gateway endpoint was deleted.
      properties:
        event_type:
          const: GATEWAY_ENDPOINT_DELETED
          title: Event Type
          type: string
        gateway_endpoint_id:
          title: Gateway Endpoint Id
          type: string
        slug:
          title: Slug
          type: string
      required:
        - event_type
        - gateway_endpoint_id
        - slug
      title: AuditLogEventGatewayEndpointDeletedV1
      type: object
    AuditLogEventGatewayEndpointUpdatedV1:
      additionalProperties: false
      description: A Frontier Gateway endpoint was updated.
      properties:
        event_type:
          const: GATEWAY_ENDPOINT_UPDATED
          title: Event Type
          type: string
        gateway_endpoint_id:
          title: Gateway Endpoint Id
          type: string
        slug:
          title: Slug
          type: string
        previous_slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Previous Slug
      required:
        - event_type
        - gateway_endpoint_id
        - slug
        - previous_slug
      title: AuditLogEventGatewayEndpointUpdatedV1
      type: object
    AuditLogEventModelDeletedV1:
      additionalProperties: false
      description: A model was deleted.
      properties:
        event_type:
          const: MODEL_DELETED
          title: Event Type
          type: string
        model_id:
          title: Model Id
          type: string
        model_name:
          title: Model Name
          type: string
      required:
        - event_type
        - model_id
        - model_name
      title: AuditLogEventModelDeletedV1
      type: object
    AuditLogEventModelDeployedV1:
      additionalProperties: false
      description: A model deployment was created.
      properties:
        event_type:
          const: MODEL_DEPLOYED
          title: Event Type
          type: string
        model_id:
          title: Model Id
          type: string
        model_name:
          title: Model Name
          type: string
        deployment_id:
          title: Deployment Id
          type: string
        deployment_name:
          title: Deployment Name
          type: string
        scale_previous_to_zero:
          title: Scale Previous To Zero
          type: boolean
        trusted:
          title: Trusted
          type: boolean
        publish:
          title: Publish
          type: boolean
        environment_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Environment Name
      required:
        - event_type
        - model_id
        - model_name
        - deployment_id
        - deployment_name
        - scale_previous_to_zero
        - trusted
        - publish
        - environment_name
      title: AuditLogEventModelDeployedV1
      type: object
    AuditLogEventModelDeploymentActivatedV1:
      additionalProperties: false
      description: A model deployment was activated.
      properties:
        event_type:
          const: MODEL_DEPLOYMENT_ACTIVATED
          title: Event Type
          type: string
        model_id:
          title: Model Id
          type: string
        model_name:
          title: Model Name
          type: string
        deployment_id:
          title: Deployment Id
          type: string
        deployment_name:
          title: Deployment Name
          type: string
      required:
        - event_type
        - model_id
        - model_name
        - deployment_id
        - deployment_name
      title: AuditLogEventModelDeploymentActivatedV1
      type: object
    AuditLogEventModelDeploymentAutoscalingSettingsChangedV1:
      additionalProperties: false
      description: A model deployment's autoscaling settings were changed.
      properties:
        min_replica:
          title: Min Replica
          type: integer
        max_replica:
          title: Max Replica
          type: integer
        concurrency_target:
          title: Concurrency Target
          type: integer
        autoscaling_window:
          anyOf:
            - type: integer
            - type: 'null'
          title: Autoscaling Window
        scale_down_delay:
          anyOf:
            - type: integer
            - type: 'null'
          title: Scale Down Delay
        target_utilization_percentage:
          anyOf:
            - type: integer
            - type: 'null'
          title: Target Utilization Percentage
        target_in_flight_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Target In Flight Tokens
        max_scale_down_rate:
          anyOf:
            - type: number
            - type: 'null'
          title: Max Scale Down Rate
        event_type:
          const: MODEL_DEPLOYMENT_AUTOSCALING_SETTINGS_CHANGED
          title: Event Type
          type: string
        model_id:
          title: Model Id
          type: string
        model_name:
          title: Model Name
          type: string
        deployment_id:
          title: Deployment Id
          type: string
        deployment_name:
          title: Deployment Name
          type: string
        deployment_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Deployment Type
        previous_settings:
          anyOf:
            - $ref: '#/components/schemas/AuditLogEventAutoscalingSettingsV1'
            - type: 'null'
      required:
        - min_replica
        - max_replica
        - concurrency_target
        - autoscaling_window
        - scale_down_delay
        - target_utilization_percentage
        - target_in_flight_tokens
        - max_scale_down_rate
        - event_type
        - model_id
        - model_name
        - deployment_id
        - deployment_name
        - deployment_type
        - previous_settings
      title: AuditLogEventModelDeploymentAutoscalingSettingsChangedV1
      type: object
    AuditLogEventModelDeploymentDeactivatedV1:
      additionalProperties: false
      description: A model deployment was deactivated.
      properties:
        event_type:
          const: MODEL_DEPLOYMENT_DEACTIVATED
          title: Event Type
          type: string
        model_id:
          title: Model Id
          type: string
        model_name:
          title: Model Name
          type: string
        deployment_id:
          title: Deployment Id
          type: string
        deployment_name:
          title: Deployment Name
          type: string
      required:
        - event_type
        - model_id
        - model_name
        - deployment_id
        - deployment_name
      title: AuditLogEventModelDeploymentDeactivatedV1
      type: object
    AuditLogEventModelDeploymentDeletedV1:
      additionalProperties: false
      description: A model deployment was deleted.
      properties:
        event_type:
          const: MODEL_DEPLOYMENT_DELETED
          title: Event Type
          type: string
        model_id:
          title: Model Id
          type: string
        model_name:
          title: Model Name
          type: string
        deployment_id:
          title: Deployment Id
          type: string
        deployment_name:
          title: Deployment Name
          type: string
      required:
        - event_type
        - model_id
        - model_name
        - deployment_id
        - deployment_name
      title: AuditLogEventModelDeploymentDeletedV1
      type: object
    AuditLogEventModelDeploymentInstanceTypeChangedV1:
      additionalProperties: false
      description: A model deployment's instance type was changed.
      properties:
        event_type:
          const: MODEL_DEPLOYMENT_INSTANCE_TYPE_CHANGED
          title: Event Type
          type: string
        model_id:
          title: Model Id
          type: string
        model_name:
          title: Model Name
          type: string
        deployment_id:
          title: Deployment Id
          type: string
        deployment_name:
          title: Deployment Name
          type: string
        instance_type_name:
          title: Instance Type Name
          type: string
      required:
        - event_type
        - model_id
        - model_name
        - deployment_id
        - deployment_name
        - instance_type_name
      title: AuditLogEventModelDeploymentInstanceTypeChangedV1
      type: object
    AuditLogEventModelDeploymentPromotedV1:
      additionalProperties: false
      description: A model deployment was promoted to an environment.
      properties:
        event_type:
          const: MODEL_DEPLOYMENT_PROMOTED
          title: Event Type
          type: string
        model_id:
          title: Model Id
          type: string
        model_name:
          title: Model Name
          type: string
        deployment_id:
          title: Deployment Id
          type: string
        deployment_name:
          title: Deployment Name
          type: string
        environment_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Environment Name
        environment_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Environment Id
      required:
        - event_type
        - model_id
        - model_name
        - deployment_id
        - deployment_name
        - environment_name
        - environment_id
      title: AuditLogEventModelDeploymentPromotedV1
      type: object
    AuditLogEventModelDeploymentRetriedV1:
      additionalProperties: false
      description: A model deployment build was retried.
      properties:
        event_type:
          const: MODEL_DEPLOYMENT_RETRIED
          title: Event Type
          type: string
        model_id:
          title: Model Id
          type: string
        model_name:
          title: Model Name
          type: string
        deployment_id:
          title: Deployment Id
          type: string
        deployment_name:
          title: Deployment Name
          type: string
        retried:
          title: Retried
          type: boolean
      required:
        - event_type
        - model_id
        - model_name
        - deployment_id
        - deployment_name
        - retried
      title: AuditLogEventModelDeploymentRetriedV1
      type: object
    AuditLogEventModelPromotionControlActionV1:
      additionalProperties: false
      description: >-
        A user-initiated promotion control signal was sent to a rolling
        promotion.
      properties:
        event_type:
          const: MODEL_PROMOTION_CONTROL_ACTION
          title: Event Type
          type: string
        model_id:
          title: Model Id
          type: string
        model_name:
          title: Model Name
          type: string
        deployment_id:
          title: Deployment Id
          type: string
        deployment_name:
          title: Deployment Name
          type: string
        environment_name:
          title: Environment Name
          type: string
        environment_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Environment Id
        action:
          $ref: '#/components/schemas/AuditLogPromotionControlActionV1'
      required:
        - event_type
        - model_id
        - model_name
        - deployment_id
        - deployment_name
        - environment_name
        - environment_id
        - action
      title: AuditLogEventModelPromotionControlActionV1
      type: object
    AuditLogEventReplicaTerminatedV1:
      additionalProperties: false
      description: A replica of a model deployment was terminated.
      properties:
        event_type:
          const: REPLICA_TERMINATED
          title: Event Type
          type: string
        model_id:
          title: Model Id
          type: string
        model_name:
          title: Model Name
          type: string
        deployment_id:
          title: Deployment Id
          type: string
        deployment_name:
          title: Deployment Name
          type: string
        replica_id:
          title: Replica Id
          type: string
      required:
        - event_type
        - model_id
        - model_name
        - deployment_id
        - deployment_name
        - replica_id
      title: AuditLogEventReplicaTerminatedV1
      type: object
    AuditLogEventRequireGroupBasedAdminsEnabledV1:
      additionalProperties: false
      description: Group-based admin enforcement was enabled for the organization.
      properties:
        event_type:
          const: REQUIRE_GROUP_BASED_ADMINS_ENABLED
          title: Event Type
          type: string
        organization_id:
          title: Organization Id
          type: string
      required:
        - event_type
        - organization_id
      title: AuditLogEventRequireGroupBasedAdminsEnabledV1
      type: object
    AuditLogEventSecretDeletedV1:
      additionalProperties: false
      description: A secret was deleted.
      properties:
        event_type:
          const: SECRET_DELETED
          title: Event Type
          type: string
        secret_id:
          title: Secret Id
          type: string
        secret_name:
          title: Secret Name
          type: string
      required:
        - event_type
        - secret_id
        - secret_name
      title: AuditLogEventSecretDeletedV1
      type: object
    AuditLogEventSecretUpdatedV1:
      additionalProperties: false
      description: A secret was created or updated.
      properties:
        event_type:
          const: SECRET_UPDATED
          title: Event Type
          type: string
        secret_id:
          title: Secret Id
          type: string
        secret_name:
          title: Secret Name
          type: string
      required:
        - event_type
        - secret_id
        - secret_name
      title: AuditLogEventSecretUpdatedV1
      type: object
    AuditLogEventSshCertificateSignedV1:
      additionalProperties: false
      description: An SSH certificate was signed for a workload.
      properties:
        event_type:
          const: SSH_CERTIFICATE_SIGNED
          title: Event Type
          type: string
        workload_type:
          title: Workload Type
          type: string
        workload_id:
          title: Workload Id
          type: string
        project_id:
          title: Project Id
          type: string
        replica_id:
          title: Replica Id
          type: string
        proxy_address:
          title: Proxy Address
          type: string
        expires_at:
          title: Expires At
          type: string
      required:
        - event_type
        - workload_type
        - workload_id
        - project_id
        - replica_id
        - proxy_address
        - expires_at
      title: AuditLogEventSshCertificateSignedV1
      type: object
    AuditLogEventUserInvitedV1:
      additionalProperties: false
      description: A user was invited to the organization.
      properties:
        event_type:
          const: USER_INVITED
          title: Event Type
          type: string
        invited_user_email:
          title: Invited User Email
          type: string
        role_name:
          title: Role Name
          type: string
      required:
        - event_type
        - invited_user_email
        - role_name
      title: AuditLogEventUserInvitedV1
      type: object
    AuditLogEventUserJoinedOrganizationV1:
      additionalProperties: false
      description: A user joined the organization.
      properties:
        event_type:
          const: USER_JOINED_ORGANIZATION
          title: Event Type
          type: string
        new_user_email:
          title: New User Email
          type: string
        user_id:
          title: User Id
          type: string
      required:
        - event_type
        - new_user_email
        - user_id
      title: AuditLogEventUserJoinedOrganizationV1
      type: object
    AuditLogEventUserRemovedV1:
      additionalProperties: false
      description: A user was removed from the organization.
      properties:
        event_type:
          const: USER_REMOVED
          title: Event Type
          type: string
        removed_user_email:
          title: Removed User Email
          type: string
      required:
        - event_type
        - removed_user_email
      title: AuditLogEventUserRemovedV1
      type: object
    AuditLogEventUserRoleUpdatedV1:
      additionalProperties: false
      description: A user's organization role was updated.
      properties:
        event_type:
          const: USER_ROLE_UPDATED
          title: Event Type
          type: string
        user_id:
          title: User Id
          type: string
        user_email:
          title: User Email
          type: string
        new_role_name:
          title: New Role Name
          type: string
      required:
        - event_type
        - user_id
        - user_email
        - new_role_name
      title: AuditLogEventUserRoleUpdatedV1
      type: object
    AuditLogEventUserTeamRoleUpdatedV1:
      additionalProperties: false
      description: A user's team role was updated.
      properties:
        event_type:
          const: USER_TEAM_ROLE_UPDATED
          title: Event Type
          type: string
        user_id:
          title: User Id
          type: string
        user_email:
          title: User Email
          type: string
        team_id:
          title: Team Id
          type: string
        team_name:
          title: Team Name
          type: string
        new_role_name:
          title: New Role Name
          type: string
      required:
        - event_type
        - user_id
        - user_email
        - team_id
        - team_name
        - new_role_name
      title: AuditLogEventUserTeamRoleUpdatedV1
      type: object
    AuditLogEventWebhookSigningSecretCreatedV1:
      additionalProperties: false
      description: A webhook signing secret was created.
      properties:
        event_type:
          const: WEBHOOK_SIGNING_SECRET_CREATED
          title: Event Type
          type: string
        webhook_signing_secret_id:
          title: Webhook Signing Secret Id
          type: string
      required:
        - event_type
        - webhook_signing_secret_id
      title: AuditLogEventWebhookSigningSecretCreatedV1
      type: object
    AuditLogEventWebhookSigningSecretDeletedV1:
      additionalProperties: false
      description: A webhook signing secret was deleted.
      properties:
        event_type:
          const: WEBHOOK_SIGNING_SECRET_DELETED
          title: Event Type
          type: string
        webhook_signing_secret_id:
          title: Webhook Signing Secret Id
          type: string
      required:
        - event_type
        - webhook_signing_secret_id
      title: AuditLogEventWebhookSigningSecretDeletedV1
      type: object
    AuditLogEventWebhookSigningSecretRotatedV1:
      additionalProperties: false
      description: A webhook signing secret was rotated.
      properties:
        event_type:
          const: WEBHOOK_SIGNING_SECRET_ROTATED
          title: Event Type
          type: string
        webhook_signing_secret_id:
          title: Webhook Signing Secret Id
          type: string
      required:
        - event_type
        - webhook_signing_secret_id
      title: AuditLogEventWebhookSigningSecretRotatedV1
      type: object
    AuditLogActorV1:
      description: The actor that performed an audited action.
      properties:
        type:
          $ref: '#/components/schemas/AuditLogActorTypeV1'
          description: Kind of actor that performed the action.
        email:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Email of the acting user, when the actor is a user.
          title: Email
        api_key_prefix:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Prefix of the acting API key, when the actor is an API key.
          title: Api Key Prefix
      required:
        - type
      title: AuditLogActorV1
      type: object
    AuditLogApiKeyTypeV1:
      description: Type of API key recorded on an API-key event.
      enum:
        - PERSONAL
        - CREATOR_SERVICE_ACCOUNT
        - INVOKE_ALL_MODELS_SERVICE_ACCOUNT
        - INVOKE_ALLOWED_MODELS_SERVICE_ACCOUNT
        - INVOKE_SCOPED_ENVS_AND_MODELS_SERVICE_ACCOUNT
        - EXPORT_METRICS_ALL_MODELS_SERVICE_ACCOUNT
        - EXPORT_METRICS_ALLOWED_MODELS_SERVICE_ACCOUNT
        - INVOKE_ALL_SHARED_ENDPOINTS_SERVICE_ACCOUNT
        - INVOKE_ALLOWED_SHARED_ENDPOINTS_SERVICE_ACCOUNT
      title: AuditLogApiKeyTypeV1
      type: string
    AuditLogEventAutoscalingSettingsV1:
      additionalProperties: false
      description: Autoscaling settings for a deployment or environment.
      properties:
        min_replica:
          title: Min Replica
          type: integer
        max_replica:
          title: Max Replica
          type: integer
        concurrency_target:
          title: Concurrency Target
          type: integer
        autoscaling_window:
          anyOf:
            - type: integer
            - type: 'null'
          title: Autoscaling Window
        scale_down_delay:
          anyOf:
            - type: integer
            - type: 'null'
          title: Scale Down Delay
        target_utilization_percentage:
          anyOf:
            - type: integer
            - type: 'null'
          title: Target Utilization Percentage
        target_in_flight_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Target In Flight Tokens
        max_scale_down_rate:
          anyOf:
            - type: number
            - type: 'null'
          title: Max Scale Down Rate
      required:
        - min_replica
        - max_replica
        - concurrency_target
        - autoscaling_window
        - scale_down_delay
        - target_utilization_percentage
        - target_in_flight_tokens
        - max_scale_down_rate
      title: AuditLogEventAutoscalingSettingsV1
      type: object
    AuditLogEventEnvironmentSettingsV1:
      additionalProperties: false
      description: >-
        Full environment settings (autoscaling + rolling promotion + deprecated
        canary);

        shared base for the environment events and the type of their
        previous_settings

        snapshots. Not itself a payload in the discriminated union.
      properties:
        min_replica:
          title: Min Replica
          type: integer
        max_replica:
          title: Max Replica
          type: integer
        concurrency_target:
          title: Concurrency Target
          type: integer
        autoscaling_window:
          anyOf:
            - type: integer
            - type: 'null'
          title: Autoscaling Window
        scale_down_delay:
          anyOf:
            - type: integer
            - type: 'null'
          title: Scale Down Delay
        target_utilization_percentage:
          anyOf:
            - type: integer
            - type: 'null'
          title: Target Utilization Percentage
        target_in_flight_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Target In Flight Tokens
        max_scale_down_rate:
          anyOf:
            - type: number
            - type: 'null'
          title: Max Scale Down Rate
        redeploy_on_promotion:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Redeploy On Promotion
        rolling_deploy:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Rolling Deploy
        rolling_deploy_strategy:
          anyOf:
            - type: string
            - type: 'null'
          title: Rolling Deploy Strategy
        max_unavailable_percent:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Unavailable Percent
        max_surge_percent:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Surge Percent
        stabilization_time_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Stabilization Time Seconds
        replica_overhead_percent:
          anyOf:
            - type: integer
            - type: 'null'
          title: Replica Overhead Percent
        promotion_cleanup_strategy:
          anyOf:
            - type: string
            - type: 'null'
          title: Promotion Cleanup Strategy
        ramp_up_while_promoting:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Ramp Up While Promoting
        ramp_up_duration_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ramp Up Duration Seconds
        ramp_up_step_size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ramp Up Step Size
      required:
        - min_replica
        - max_replica
        - concurrency_target
        - autoscaling_window
        - scale_down_delay
        - target_utilization_percentage
        - target_in_flight_tokens
        - max_scale_down_rate
        - redeploy_on_promotion
        - rolling_deploy
        - rolling_deploy_strategy
        - max_unavailable_percent
        - max_surge_percent
        - stabilization_time_seconds
        - replica_overhead_percent
        - promotion_cleanup_strategy
        - ramp_up_while_promoting
        - ramp_up_duration_seconds
        - ramp_up_step_size
      title: AuditLogEventEnvironmentSettingsV1
      type: object
    AuditLogPromotionControlActionV1:
      description: >-
        User-initiated promotion control signal recorded on a promotion-control
        event.
      enum:
        - PAUSE
        - RESUME
        - FORCE_CANCEL
        - FORCE_ROLL_FORWARD
        - GRACEFUL_CANCEL
      title: AuditLogPromotionControlActionV1
      type: string
    AuditLogActorTypeV1:
      description: Kind of actor that performed an audited action.
      enum:
        - USER
        - API_KEY
        - BASETEN_USER
        - BASETEN_SYSTEM
        - TOMBSTONE_USER
      title: AuditLogActorTypeV1
      type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <api_key>`. The legacy `Authorization:
        Api-Key <api_key>` scheme is also accepted.

````