---
title: "Update Gateway Provider"
method: PATCH
path: "/v1/gateway/providers/{provider_id}/"
tags: ["Gateway"]
---

# Update Gateway Provider

`PATCH /v1/gateway/providers/{provider_id}/`

## Request

- Base URL: `https://logfire-api.pydantic.dev/api`
- URL: `https://logfire-api.pydantic.dev/api/v1/gateway/providers/{provider_id}/`
- Auth: OAuth 2
  - Authorization code: `api/oauth/authorize`
  - Token URL: `/api/oauth/token` scopes: `organization:write_gateway`
- TypeScript: <https://skmtc.dev/pydantic/apis/pydantic-logfire-api/docs/v1/gateway/providers/:provider_id/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update pricing requirements, credentials, or Bedrock, Azure, and Vertex endpoint settings for a Gateway provider.

## Path parameters

- `provider_id` string, uuid, required

## Request body

- union
  - GatewayProviderConfigurationUpdate
    - `provider` union, required
      - FixedApiKeyProviderPatch
        - `vendor` 'openai' | 'anthropic' | 'doubleword' | 'google-gla' | 'groq' | 'huggingface' | 'mistral', required
        - `config` FixedApiKeyProviderPatchConfig, required
          - `credentials` ApiKeyCredentials, required
            - `type` 'api-key', required
            - `value` string, password, required
      - BedrockProviderPatch
        - `vendor` 'bedrock', required
        - `config` union, required
          - BedrockApiProviderPatchConfig
            - `api` 'runtime' | 'mantle', required
            - `region` string
            - `credentials` ApiKeyCredentials
              - …
          - BedrockRegionProviderPatchConfig
            - `region` string, required
            - `api` 'runtime' | 'mantle'
            - `credentials` ApiKeyCredentials
              - …
          - BedrockCredentialsProviderPatchConfig
            - `credentials` ApiKeyCredentials, required
              - …
            - `api` 'runtime' | 'mantle'
            - `region` string
      - AzureProviderPatch
        - `vendor` 'azure', required
        - `config` AzureProviderPatchConfig, required
          - `credentials` AzureApiKeyCredentials, required
            - `type` 'api-key', required
            - `value` string, password, required
          - `endpoint` string
      - GoogleVertexProviderPatch
        - `vendor` 'google-vertex', required
        - `config` GoogleVertexProviderPatchConfig, required
          - `credentials` GoogleServiceAccountJsonCredentials, required
            - `type` 'service-account-json', required
            - `value` string, password, required
          - `endpoint` string
    - `pricing` GatewayProviderPricingInput
      - `required` boolean, required
  - GatewayProviderPricingUpdate
    - `pricing` GatewayProviderPricingInput, required
      - `required` boolean, required
    - `provider` union
      - FixedApiKeyProviderPatch
        - `vendor` 'openai' | 'anthropic' | 'doubleword' | 'google-gla' | 'groq' | 'huggingface' | 'mistral', required
        - `config` FixedApiKeyProviderPatchConfig, required
          - `credentials` ApiKeyCredentials, required
            - `type` 'api-key', required
            - `value` string, password, required
      - BedrockProviderPatch
        - `vendor` 'bedrock', required
        - `config` union, required
          - BedrockApiProviderPatchConfig
            - `api` 'runtime' | 'mantle', required
            - `region` string
            - `credentials` ApiKeyCredentials
              - …
          - BedrockRegionProviderPatchConfig
            - `region` string, required
            - `api` 'runtime' | 'mantle'
            - `credentials` ApiKeyCredentials
              - …
          - BedrockCredentialsProviderPatchConfig
            - `credentials` ApiKeyCredentials, required
              - …
            - `api` 'runtime' | 'mantle'
            - `region` string
      - AzureProviderPatch
        - `vendor` 'azure', required
        - `config` AzureProviderPatchConfig, required
          - `credentials` AzureApiKeyCredentials, required
            - `type` 'api-key', required
            - `value` string, password, required
          - `endpoint` string
      - GoogleVertexProviderPatch
        - `vendor` 'google-vertex', required
        - `config` GoogleVertexProviderPatchConfig, required
          - `credentials` GoogleServiceAccountJsonCredentials, required
            - `type` 'service-account-json', required
            - `value` string, password, required
          - `endpoint` string

## Response `200`

Successful Response

- GatewayProviderRead
  - `id` string, uuid, required
  - `slug` string, required
  - `provider` union, required
    - FixedApiKeyProviderRead
      - `vendor` 'openai' | 'anthropic' | 'doubleword' | 'google-gla' | 'groq' | 'huggingface' | 'mistral', required
    - BedrockProviderRead
      - `vendor` 'bedrock', required
      - `config` BedrockProviderReadConfig, required
        - `api` 'runtime' | 'mantle', required
        - `region` string, required
    - AzureProviderRead
      - `vendor` 'azure', required
      - `config` AzureProviderReadConfig, required
        - `endpoint` string, required
    - GoogleVertexProviderRead
      - `vendor` 'google-vertex', required
      - `config` GoogleVertexProviderReadConfig, required
        - `endpoint` string, required
  - `pricing` GatewayProviderPricingOutput, required
    - `required` boolean, required
  - `created_at` string, date-time, required

## Other responses

- `403`: The organization plan does not include Gateway provider management
- `404`: Provider not found
- `409`: Provider configuration is not supported by this API
- `422`: The request is not valid, or the endpoint is not allowed for this organization
- `429`: Rate limit exceeded
- `503`: Provider stored, but Gateway did not confirm the refresh

---

[API](https://skmtc.dev/pydantic/apis/pydantic-logfire-api.md) - [All operations](https://skmtc.dev/pydantic/apis/pydantic-logfire-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pydantic/apis/pydantic-logfire-api/revisions/7996e45256f4?raw)
