---
title: "✨ Update model provider connection"
method: PATCH
path: "/api/model-provider-connections/{id}/"
tags: ["Model Provider Connection"]
---

# ✨ Update model provider connection

`PATCH /api/model-provider-connections/{id}/`

<Card href="https://humansignal.com/goenterprise">
        <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
        <p style="margin-top: 10px; font-size: 14px;">
            This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
        </p>
    </Card>
Update a specific model provider connection by ID.

## Path parameters

- `id` integer, required

## Request body

- PatchedModelProviderConnectionRequest
  - `api_key` string, nullable — Model provider API key
  - `auth_token` string, nullable — Model provider Auth token
  - `budget_alert_threshold` number, double, nullable — Budget alert threshold for the given provider connection
  - `cached_available_models` string, nullable — List of available models from the provider
  - `deployment_name` string, nullable — Azure OpenAI deployment name
  - `endpoint` string, nullable — Azure OpenAI endpoint
  - `google_application_credentials` string, nullable — The content of GOOGLE_APPLICATION_CREDENTIALS json file
  - `google_location` string, nullable — Google project location
  - `google_project_id` string, nullable — Google project ID
  - `is_internal` boolean, nullable — Whether the model provider connection is internal, not visible to the user
  - `provider` 'OpenAI' | 'AzureOpenAI' | 'AzureAIFoundry' | 'VertexAI' | 'Gemini' | 'Anthropic' | 'Custom' — * `OpenAI` - OpenAI * `AzureOpenAI` - AzureOpenAI * `AzureAIFoundry` - AzureAIFoundry * `VertexAI` - VertexAI * `Gemini` - Gemini * `Anthropic` - Anthropic * `Custom` - Custom
  - `scope` 'Organization' | 'User' | 'Model' — * `Organization` - Organization * `User` - User * `Model` - Model

## Response `200`

- ModelProviderConnection
  - `budget_alert_threshold` number, double, nullable — Budget alert threshold for the given provider connection
  - `budget_last_reset_date` string, date-time, nullable, required — Date and time the budget was last reset
  - `budget_limit` number, double, nullable, required — Budget limit for the model provider connection (null if unlimited)
  - `budget_reset_period` 'Monthly' | 'Yearly', required — * `Monthly` - Monthly * `Yearly` - Yearly
  - `budget_total_spent` number, double, nullable, required — Tracked total budget spent for the given provider connection within the current budget period
  - `cached_available_models` string, nullable — List of available models from the provider
  - `created_at` string, date-time, required
  - `created_by` UserSimple, required — A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations
    - `avatar` string, nullable, required
    - `email` string, email
    - `first_name` string
    - `id` integer, required
    - `last_name` string
    - `username` string, required
  - `deployment_name` string, nullable — Azure OpenAI deployment name
  - `endpoint` string, nullable — Azure OpenAI endpoint
  - `google_location` string, nullable — Google project location
  - `google_project_id` string, nullable — Google project ID
  - `id` integer, required
  - `is_internal` boolean, nullable — Whether the model provider connection is internal, not visible to the user
  - `model_params` object, required — JSON schema for the model parameters available for the provider
  - `organization` integer, nullable, required
  - `provider` 'OpenAI' | 'AzureOpenAI' | 'AzureAIFoundry' | 'VertexAI' | 'Gemini' | 'Anthropic' | 'Custom' — * `OpenAI` - OpenAI * `AzureOpenAI` - AzureOpenAI * `AzureAIFoundry` - AzureAIFoundry * `VertexAI` - VertexAI * `Gemini` - Gemini * `Anthropic` - Anthropic * `Custom` - Custom
  - `scope` 'Organization' | 'User' | 'Model' — * `Organization` - Organization * `User` - User * `Model` - Model
  - `updated_at` string, date-time, required

---

[API](https://skmtc.net/humansignal/apis/label-studio-api.md) · [All operations](https://skmtc.net/humansignal/apis/label-studio-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/humansignal/label-studio-api/revisions/1d13f90af57a/schema)
