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

# ALTER AI PROVIDER

> Update the properties of an existing AI provider.

Updates the `PROPERTIES` of an existing AI provider. Supplied keys are merged into the provider's
current properties (existing keys are overwritten, unmentioned keys are kept). The provider `TYPE`
cannot be changed.

## Syntax

```SQL theme={null}
ALTER AI PROVIDER [IF EXISTS] <provider_name>
SET ("key" = "value" [, ...])
```

## Parameters

| Parameter | Description |
| - | - |
| `IF EXISTS` | Do nothing (instead of erroring) when the provider does not exist. |
| `provider_name` | Name of the provider to alter. |
| `SET (...)` | `"key" = "value"` pairs to merge. Allowed keys are the same as for the provider's `TYPE` (see [`CREATE AI PROVIDER`](/documents/4.2/sql-reference/sql-statements/cluster-management/ai_provider/CREATE_AI_PROVIDER)). |

## Examples

Rotate the API key and raise the timeout of a provider:

```sql theme={null}
ALTER AI PROVIDER openai SET (
    "api_key"    = "sk-new-...",
    "timeout_ms" = "20000"
);
```

## See also

* [`CREATE AI PROVIDER`](/documents/4.2/sql-reference/sql-statements/cluster-management/ai_provider/CREATE_AI_PROVIDER)
* [`SHOW AI PROVIDERS`](/documents/4.2/sql-reference/sql-statements/cluster-management/ai_provider/SHOW_AI_PROVIDERS)
* [`DESC AI PROVIDER`](/documents/4.2/sql-reference/sql-statements/cluster-management/ai_provider/DESC_AI_PROVIDER)


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