---
title: "Update an AI provider"
method: PATCH
path: "/v1/projects/{project_id}/ai-providers/{ai_provider_id}"
tags: ["AI Providers"]
---

# Update an AI provider

`PATCH /v1/projects/{project_id}/ai-providers/{ai_provider_id}`

## Request

- Base URL: `https://api.naturali.ai`
- URL: `https://api.naturali.ai/v1/projects/{project_id}/ai-providers/{ai_provider_id}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.naturali.ai/authorize`, token URL `https://api.naturali.ai/token`, scopes: `mcp:access`)

Updates an AI provider configuration

## Path parameters

- `ai_provider_id` string, required

## Request body

- object
  - `name` string
  - `provider` 'openai' | 'anthropic' | 'google' | 'xai' | 'groq' | 'ollama' | 'azure' | 'bedrock' | 'vertex' | 'gateway' | 'custom' | 'naturali': LLM provider
  - `default_model` string
  - `secret_id` string, nullable
  - `base_url` string
  - `config` object

## Response `200`

AI provider updated successfully

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: AI provider not found

---

[API](https://skmtc.dev/naturali/apis/naturali-ai-api.md) · [All operations](https://skmtc.dev/naturali/apis/naturali-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/naturali/apis/naturali-ai-api/revisions/e4905b78f422?raw)
