> ## 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.

# Create or replace a secret



## OpenAPI

````yaml /api-reference/openapi.json put /v1/secrets/{name}
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.
  - name: Public runs
    description: Unauthenticated reads of runs their owners published to Explore.
paths:
  /v1/secrets/{name}:
    put:
      tags:
        - Secrets
      summary: Create or replace a secret
      operationId: put
      parameters:
        - name: name
          in: path
          description: >-
            Secret name, environment-variable style
            ([A-Za-z_][A-Za-z0-9_]{0,63})
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutSecretRequest'
        required: true
      responses:
        '200':
          description: The stored secret's metadata. The value is never returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretResponse'
        '400':
          description: Invalid name, empty or oversized value, or malformed scope_host
      security:
        - bearerAuth: []
components:
  schemas:
    PutSecretRequest:
      type: object
      required:
        - value
      properties:
        value:
          type: string
          description: The secret value. Stored encrypted; never returned by the API.
        scope_host:
          type:
            - string
            - 'null'
          description: |-
            Optional HTTPS host the value is scoped to (e.g. "api.openai.com").
            When set, agent sessions only attach the value to requests for that
            host; when absent, the value is injected as an environment variable.
            Hostname only: no scheme, port, path or wildcard.
    SecretResponse:
      type: object
      required:
        - object
        - name
        - created_at
        - updated_at
      properties:
        object:
          type: string
        name:
          type: string
          description: Environment-variable style name (`[A-Za-z_][A-Za-z0-9_]{0,63}`).
        scope_host:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: API key with the `vk_` prefix. Create one from the dashboard.

````

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