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

# Update an LLM profile

> Updates an LLM profile. Omitted fields retain their stored values, `models` replaces the complete model list, and supplied secrets are merged with stored secrets.

<Note>
  LLM profiles are available only on self-hosted deployments. Laminar Cloud returns `404 Not Found`. Removing a model used by a Signal returns `409 Conflict`.
</Note>




## OpenAPI

````yaml /openapi/openapi.yaml patch /v1/llm-profiles/{profile_id}
openapi: 3.1.0
info:
  title: Laminar API
  version: 1.0.0
  description: Public HTTP API for ingesting and managing data in a Laminar project.
  license:
    name: Apache 2.0
    identifier: Apache-2.0
servers:
  - url: https://api.lmnr.ai
    description: Laminar Cloud
security:
  - projectApiKey: []
tags:
  - name: Ingestion
    description: Send telemetry data to Laminar.
  - name: Traces
    description: Update trace data after ingestion.
  - name: SQL
    description: Query project data with read-only SQL.
  - name: Projects
    description: Resolve project information.
  - name: Datasets
    description: Read datasets and add datapoints.
  - name: Evaluations
    description: Create evaluation runs and record their results.
  - name: Labeling queues
    description: Add items to labeling queues.
  - name: Signals
    description: Manage automated evaluations of project traces.
  - name: LLM profiles
    description: Configure workspace LLM credentials and models for self-hosted Signals.
paths:
  /v1/llm-profiles/{profile_id}:
    parameters:
      - $ref: '#/components/parameters/LlmProfileId'
    patch:
      tags:
        - LLM profiles
      summary: Update an LLM profile
      description: >
        Updates an LLM profile. Omitted fields retain their stored values,
        `models` replaces the complete model list, and supplied secrets are
        merged with stored secrets.


        <Note>
          LLM profiles are available only on self-hosted deployments. Laminar Cloud returns `404 Not Found`. Removing a model used by a Signal returns `409 Conflict`.
        </Note>
      operationId: updateLlmProfile
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLlmProfileRequest'
      responses:
        '200':
          description: LLM profile updated. Secret values are masked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LlmProfile'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
components:
  parameters:
    LlmProfileId:
      name: profile_id
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/Uuid'
  schemas:
    UpdateLlmProfileRequest:
      type: object
      properties:
        name:
          type: string
          maxLength: 255
        provider:
          allOf:
            - $ref: '#/components/schemas/LlmProfileProvider'
          description: When changing the provider, `config` is required.
        config:
          $ref: '#/components/schemas/LlmProfileConfig'
        secrets:
          allOf:
            - $ref: '#/components/schemas/LlmProfileSecretsInput'
          description: >-
            Supplied values replace matching secrets; omitted values remain
            unchanged.
        models:
          type: array
          minItems: 1
          maxItems: 64
          uniqueItems: true
          items:
            type: string
            maxLength: 256
          description: Replaces the complete model list when supplied.
    LlmProfile:
      type: object
      required:
        - id
        - workspaceId
        - name
        - provider
        - config
        - models
        - secrets
        - createdAt
        - updatedAt
      properties:
        id:
          $ref: '#/components/schemas/Uuid'
        workspaceId:
          $ref: '#/components/schemas/Uuid'
        name:
          type: string
        provider:
          $ref: '#/components/schemas/LlmProfileProvider'
        config:
          $ref: '#/components/schemas/LlmProfileConfig'
        models:
          type: array
          items:
            type: string
        secrets:
          $ref: '#/components/schemas/LlmProfileSecrets'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Uuid:
      type: string
      format: uuid
    LlmProfileProvider:
      type: string
      enum:
        - openai_completions
        - openai_responses
        - gemini
        - bedrock
        - azure_chat_completions
        - azure_responses
        - azure_anthropic
        - custom
    LlmProfileConfig:
      type: object
      properties:
        auth:
          $ref: '#/components/schemas/LlmProfileAuth'
        region:
          type: string
          maxLength: 64
        resourceId:
          type: string
          maxLength: 256
        baseUrl:
          type: string
          format: uri
        apiVersion:
          type: string
          maxLength: 64
        headerNames:
          type: array
          maxItems: 32
          uniqueItems: true
          items:
            type: string
            maxLength: 256
      description: >-
        Provider-specific non-secret configuration. Azure requires exactly one
        of `resourceId` or `baseUrl`; Bedrock requires `region`; custom
        providers require `baseUrl`.
    LlmProfileSecretsInput:
      type: object
      writeOnly: true
      properties:
        apiKey:
          type: string
          format: password
          maxLength: 8192
        secretAccessKey:
          type: string
          format: password
          maxLength: 8192
        token:
          type: string
          format: password
          maxLength: 8192
        headers:
          type: object
          additionalProperties:
            type: string
            format: password
            maxLength: 8192
      description: >-
        Plaintext credentials. Required fields depend on the provider and
        authentication type.
    LlmProfileSecrets:
      type: object
      readOnly: true
      required:
        - apiKey
        - secretAccessKey
        - token
        - headers
      properties:
        apiKey:
          type:
            - string
            - 'null'
          description: Masked API key.
        secretAccessKey:
          type:
            - string
            - 'null'
          description: Masked AWS secret access key.
        token:
          type:
            - string
            - 'null'
          description: Masked bearer token.
        headers:
          type: array
          items:
            type: string
          description: Names of stored custom headers; values are never returned.
    Error:
      oneOf:
        - type: object
          properties:
            error:
              type: string
          required:
            - error
        - type: string
    LlmProfileAuth:
      oneOf:
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              const: api_key
        - type: object
          required:
            - type
            - accessKeyId
          properties:
            type:
              type: string
              const: aws_keys
            accessKeyId:
              type: string
              maxLength: 256
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              const: bearer_token
  responses:
    BadRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key.
    NotFound:
      description: The requested resource was not found in this project.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: A resource with the requested name already exists.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    projectApiKey:
      type: http
      scheme: bearer
      bearerFormat: Project API key
      description: A Laminar project API key.

````