GoodMem
ReferenceClient SDKs.NET SDK

LLMs API

LLMs API documentation for .NET SDK

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

MethodHTTP requestDescription
CreateLLMPOST /v1/llmsCreate a new LLM
DeleteLLMDELETE /v1/llms/{id}Delete an LLM
GetLLMGET /v1/llms/{id}Get an LLM by ID
ListLLMsGET /v1/llmsList LLMs
UpdateLLMPUT /v1/llms/{id}Update an LLM

CreateLLM

CreateLLMResponse CreateLLM (LLMCreationRequest lLMCreationRequest)

Create a new LLM

Creates a new LLM configuration for text generation services. LLMs represent connections to different language model API services (like OpenAI, vLLM, etc.) and include all the necessary configuration to use them for text generation. DUPLICATE DETECTION: Returns ALREADY_EXISTS if another LLM exists with identical {endpoint_url, api_path, model_identifier} after URL canonicalization. The api_path field defaults to '/v1/chat/completions' if omitted. Requires CREATE_LLM_OWN permission (or CREATE_LLM_ANY for admin users).

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Pairsystems.Goodmem.Client.Api;
using Pairsystems.Goodmem.Client.Client;
using Pairsystems.Goodmem.Client.Model;

namespace Example
{
    public class CreateLLMExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "[http://localhost";](http://localhost";)
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new LLMsApi(httpClient, config, httpClientHandler);
            var lLMCreationRequest = new LLMCreationRequest(); // LLMCreationRequest | LLM configuration details

            try
            {
                // Create a new LLM
                CreateLLMResponse result = apiInstance.CreateLLM(lLMCreationRequest);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling LLMsApi.CreateLLM: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the CreateLLMWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Create a new LLM
    `ApiResponse<CreateLLMResponse>` response = apiInstance.CreateLLMWithHttpInfo(lLMCreationRequest);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling LLMsApi.CreateLLMWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

NameTypeDescriptionNotes
lLMCreationRequestLLMCreationRequestLLM configuration details

Return type

CreateLLMResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201Successfully created LLM with status information* Location - URL of the created LLM resource
400Invalid request - missing required fields or invalid format-
401Unauthorized - invalid or missing API key-
403Forbidden - insufficient permissions to create LLMs-
409Conflict - LLM already exists with identical owner_id, provider_type, endpoint_url, api_path, model_identifier, and credentials_fingerprint-

↑ Back to .NET SDK

DeleteLLM

void DeleteLLM (string id)

Delete an LLM

Permanently deletes an LLM configuration. This operation cannot be undone and removes the LLM record and securely deletes stored credentials. IMPORTANT: This does NOT invalidate or delete any previously generated content using this LLM - existing generations remain accessible. Requires DELETE_LLM_OWN permission for LLMs you own (or DELETE_LLM_ANY for admin users).

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Pairsystems.Goodmem.Client.Api;
using Pairsystems.Goodmem.Client.Client;
using Pairsystems.Goodmem.Client.Model;

namespace Example
{
    public class DeleteLLMExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "[http://localhost";](http://localhost";)
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new LLMsApi(httpClient, config, httpClientHandler);
            var id = 550e8400-e29b-41d4-a716-446655440000;  // string | The unique identifier of the LLM to delete

            try
            {
                // Delete an LLM
                apiInstance.DeleteLLM(id);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling LLMsApi.DeleteLLM: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the DeleteLLMWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Delete an LLM
    apiInstance.DeleteLLMWithHttpInfo(id);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling LLMsApi.DeleteLLMWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

NameTypeDescriptionNotes
idstringThe unique identifier of the LLM to delete

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status codeDescriptionResponse headers
204LLM successfully deleted-
400Invalid request - LLM ID in invalid format-
401Unauthorized - invalid or missing API key-
403Forbidden - insufficient permissions to delete this LLM-
404Not found - LLM with the specified ID does not exist-

↑ Back to .NET SDK

GetLLM

LLMResponse GetLLM (string id)

Get an LLM by ID

Retrieves the details of a specific LLM configuration by its unique identifier. Requires READ_LLM_OWN permission for LLMs you own (or READ_LLM_ANY for admin users to view any user's LLMs). This is a read-only operation with no side effects.

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Pairsystems.Goodmem.Client.Api;
using Pairsystems.Goodmem.Client.Client;
using Pairsystems.Goodmem.Client.Model;

namespace Example
{
    public class GetLLMExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "[http://localhost";](http://localhost";)
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new LLMsApi(httpClient, config, httpClientHandler);
            var id = 550e8400-e29b-41d4-a716-446655440000;  // string | The unique identifier of the LLM to retrieve

            try
            {
                // Get an LLM by ID
                LLMResponse result = apiInstance.GetLLM(id);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling LLMsApi.GetLLM: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the GetLLMWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Get an LLM by ID
    `ApiResponse<LLMResponse>` response = apiInstance.GetLLMWithHttpInfo(id);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling LLMsApi.GetLLMWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

NameTypeDescriptionNotes
idstringThe unique identifier of the LLM to retrieve

Return type

LLMResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Successfully retrieved LLM-
400Invalid request - LLM ID in invalid format-
401Unauthorized - invalid or missing API key-
403Forbidden - insufficient permissions to view this LLM-
404Not found - LLM with the specified ID does not exist-

↑ Back to .NET SDK

ListLLMs

ListLLMsResponse ListLLMs (string? ownerId = null, string? providerType = null, string? label = null)

List LLMs

Retrieves a list of LLM configurations accessible to the caller, with optional filtering. PERMISSION-BASED FILTERING: With LIST_LLM_OWN permission, you can only see your own LLMs (owner_id filter is ignored if set to another user). With LIST_LLM_ANY permission, you can see all LLMs or filter by any owner_id. This is a read-only operation with no side effects.

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Pairsystems.Goodmem.Client.Api;
using Pairsystems.Goodmem.Client.Client;
using Pairsystems.Goodmem.Client.Model;

namespace Example
{
    public class ListLLMsExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "[http://localhost";](http://localhost";)
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new LLMsApi(httpClient, config, httpClientHandler);
            var ownerId = 550e8400-e29b-41d4-a716-446655440000;  // string? | Filter LLMs by owner ID. With LIST_LLM_ANY permission, omitting this shows all accessible LLMs; providing it filters by that owner. With LIST_LLM_OWN permission, only your own LLMs are shown regardless of this parameter. (optional) 
            var providerType = OPENAI;  // string? | Filter LLMs by provider type (e.g., OPENAI, VLLM, OLLAMA, etc.) (optional) 
            var label = ?label.environment=production&label.team=ai;  // string? | Filter by label value. Multiple label filters can be specified (e.g., ?label.environment=production&label.team=ai) (optional) 

            try
            {
                // List LLMs
                ListLLMsResponse result = apiInstance.ListLLMs(ownerId, providerType, label);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling LLMsApi.ListLLMs: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the ListLLMsWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // List LLMs
    `ApiResponse<ListLLMsResponse>` response = apiInstance.ListLLMsWithHttpInfo(ownerId, providerType, label);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling LLMsApi.ListLLMsWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

NameTypeDescriptionNotes
ownerIdstring?Filter LLMs by owner ID. With LIST_LLM_ANY permission, omitting this shows all accessible LLMs; providing it filters by that owner. With LIST_LLM_OWN permission, only your own LLMs are shown regardless of this parameter.[optional]
providerTypestring?Filter LLMs by provider type (e.g., OPENAI, VLLM, OLLAMA, etc.)[optional]
labelstring?Filter by label value. Multiple label filters can be specified (e.g., ?label.environment=production&label.team=ai)[optional]

Return type

ListLLMsResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Successfully retrieved LLMs-
400Invalid request - invalid filter parameters or pagination token-
401Unauthorized - invalid or missing API key-
403Forbidden - insufficient permissions to list LLMs-

↑ Back to .NET SDK

UpdateLLM

LLMResponse UpdateLLM (string id, LLMUpdateRequest lLMUpdateRequest)

Update an LLM

Updates an existing LLM configuration including display information, endpoint configuration, model parameters, credentials, and labels. All fields are optional - only specified fields will be updated. IMPORTANT: provider_type is IMMUTABLE after creation and cannot be changed. Requires UPDATE_LLM_OWN permission for LLMs you own (or UPDATE_LLM_ANY for admin users).

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Pairsystems.Goodmem.Client.Api;
using Pairsystems.Goodmem.Client.Client;
using Pairsystems.Goodmem.Client.Model;

namespace Example
{
    public class UpdateLLMExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "[http://localhost";](http://localhost";)
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new LLMsApi(httpClient, config, httpClientHandler);
            var id = 550e8400-e29b-41d4-a716-446655440000;  // string | The unique identifier of the LLM to update
            var lLMUpdateRequest = new LLMUpdateRequest(); // LLMUpdateRequest | LLM update details

            try
            {
                // Update an LLM
                LLMResponse result = apiInstance.UpdateLLM(id, lLMUpdateRequest);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling LLMsApi.UpdateLLM: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the UpdateLLMWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Update an LLM
    `ApiResponse<LLMResponse>` response = apiInstance.UpdateLLMWithHttpInfo(id, lLMUpdateRequest);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling LLMsApi.UpdateLLMWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

NameTypeDescriptionNotes
idstringThe unique identifier of the LLM to update
lLMUpdateRequestLLMUpdateRequestLLM update details

Return type

LLMResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200Successfully updated LLM-
400Invalid request - ID format or update parameters invalid-
401Unauthorized - invalid or missing API key-
403Forbidden - insufficient permissions to update this LLM-
404Not found - LLM with the specified ID does not exist-

↑ Back to .NET SDK