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

# Set the workspace retention default

> 0 = zero-data-retention opt-in: every eligible (unprotected, unreferenced) version and snapshot in the workspace is purged by the next nightly sweep. Lineages with their own retention_days are unaffected.



## OpenAPI

````yaml /api-reference/openapi.json put /v1/settings/retention
openapi: 3.1.0
info:
  title: Veri API
  description: >-
    REST API for the Veri RL post-training platform. All requests require a
    Bearer API key (`vk_` prefix).
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://api.veri.studio
    description: Production
security: []
tags:
  - name: Training jobs
    description: Create, monitor, and manage training jobs.
  - name: Datasets
    description: Upload and connect training datasets.
  - name: Deployments
    description: Serve trained models and run inference.
  - name: Volumes
    description: Persistent file storage mounted into jobs.
  - name: Models
    description: Custom model registry deployments serve from.
  - name: Regions
    description: Discover available launch regions.
  - name: GPU
    description: Live GPU availability by provider and region.
  - name: Compatibility
    description: Advisory model and runtime compatibility guidance.
  - name: Code artifacts
    description: Upload custom training script bundles.
  - name: Billing
    description: Credit balance and transaction history.
  - name: API keys
    description: Create and revoke API keys.
  - name: Account
    description: The authenticated caller's identity.
  - name: SSH keys
    description: Manage SSH key pairs for compute access.
  - name: Settings
    description: Account-level integrations (Weights & Biases).
  - name: Metrics
    description: Prometheus metrics export for your own observability stack.
paths:
  /v1/settings/retention:
    put:
      tags:
        - Settings
      summary: Set the workspace retention default
      description: >-
        0 = zero-data-retention opt-in: every eligible (unprotected,
        unreferenced) version and snapshot in the workspace is purged by the
        next nightly sweep. Lineages with their own retention_days are
        unaffected.
      operationId: set_workspace_retention
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceRetentionRequest'
        required: true
      responses:
        '200':
          description: The stored default
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceRetentionResponse'
        '400':
          description: model_retention_days out of range
      security:
        - bearerAuth: []
components:
  schemas:
    WorkspaceRetentionRequest:
      type: object
      required:
        - model_retention_days
      properties:
        model_retention_days:
          type: integer
          format: int32
          description: 0..=3650. 0 = purge eligible items on the next nightly sweep.
    WorkspaceRetentionResponse:
      type: object
      description: The workspace default retention window.
      required:
        - object
        - model_retention_days
      properties:
        object:
          type: string
          description: Always "workspace_retention".
        model_retention_days:
          type: integer
          format: int32
          description: >-
            Days unprotected model versions and unreferenced dataset snapshots
            are

            kept (default 90; 0 = zero-data-retention opt-in).
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: API key with the `vk_` prefix. Create one from the dashboard.

````