# AISettingsApi

All URIs are relative to *http://localhost:8081*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**deleteSettings**](#deletesettings) | **DELETE** /api/v1/settings/ai | Reset my AI settings|
|[**getSettings**](#getsettings) | **GET** /api/v1/settings/ai | Get my AI settings|
|[**listModels**](#listmodels) | **POST** /api/v1/settings/ai/models | List the provider\&#39;s chat models|
|[**saveSettings**](#savesettings) | **PUT** /api/v1/settings/ai | Save my AI settings|
|[**testConnection**](#testconnection) | **POST** /api/v1/settings/ai/test | Test AI provider connection|

# **deleteSettings**
> deleteSettings()

Remove my chat-LLM override and go back to the server default model.

### Example

```typescript
import {
    AISettingsApi,
    Configuration
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new AISettingsApi(configuration);

const { status, data } = await apiInstance.deleteSettings();
```

### Parameters
This endpoint does not have any parameters.


### Return type

void (empty response body)

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getSettings**
> AiSettingsResponse getSettings()

Current user\'s chat-LLM override. The API key is never returned — only hasApiKey and its last characters.

### Example

```typescript
import {
    AISettingsApi,
    Configuration
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new AISettingsApi(configuration);

const { status, data } = await apiInstance.getSettings();
```

### Parameters
This endpoint does not have any parameters.


### Return type

**AiSettingsResponse**

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **listModels**
> AiModelsResponse listModels(listAiModelsRequest)

Ask the provider which chat models this key can use, so the picker reflects what exists today rather than a list baked into a release. Falls back to a built-in list (source=FALLBACK) when the provider cannot be reached. POST rather than GET because the key travels in the body, never in a query string; omit apiKey to use the stored key.

### Example

```typescript
import {
    AISettingsApi,
    Configuration,
    ListAiModelsRequest
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new AISettingsApi(configuration);

let listAiModelsRequest: ListAiModelsRequest; //

const { status, data } = await apiInstance.listModels(
    listAiModelsRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **listAiModelsRequest** | **ListAiModelsRequest**|  | |


### Return type

**AiModelsResponse**

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **saveSettings**
> AiSettingsResponse saveSettings(saveAiSettingsRequest)

Set the chat LLM to use for my conversations. Omit apiKey to keep the previously stored key.

### Example

```typescript
import {
    AISettingsApi,
    Configuration,
    SaveAiSettingsRequest
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new AISettingsApi(configuration);

let saveAiSettingsRequest: SaveAiSettingsRequest; //

const { status, data } = await apiInstance.saveSettings(
    saveAiSettingsRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **saveAiSettingsRequest** | **SaveAiSettingsRequest**|  | |


### Return type

**AiSettingsResponse**

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **testConnection**
> AiConnectionTestResult testConnection(saveAiSettingsRequest)

Send a minimal completion request with the submitted settings (falls back to the stored key when apiKey is omitted).

### Example

```typescript
import {
    AISettingsApi,
    Configuration,
    SaveAiSettingsRequest
} from '@openfilz-sdk/typescript';

const configuration = new Configuration();
const apiInstance = new AISettingsApi(configuration);

let saveAiSettingsRequest: SaveAiSettingsRequest; //

const { status, data } = await apiInstance.testConnection(
    saveAiSettingsRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **saveAiSettingsRequest** | **SaveAiSettingsRequest**|  | |


### Return type

**AiConnectionTestResult**

### Authorization

[keycloak_auth](../README.md#keycloak_auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

