LLMs API
LLMs API documentation for .NET SDK
All URIs are relative to *http://localhost:8080*
| Method | HTTP request | Description |
|---|---|---|
| CreateLLM | POST /v1/llms | Create a new LLM |
| DeleteLLM | DELETE /v1/llms/{id} | Delete an LLM |
| GetLLM | GET /v1/llms/{id} | Get an LLM by ID |
| ListLLMs | GET /v1/llms | List LLMs |
| UpdateLLM | PUT /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
| Name | Type | Description | Notes |
|---|---|---|---|
| lLMCreationRequest | LLMCreationRequest | LLM configuration details |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 201 | Successfully created LLM with status information | * Location - URL of the created LLM resource |
| 400 | Invalid request - missing required fields or invalid format | - |
| 401 | Unauthorized - invalid or missing API key | - |
| 403 | Forbidden - insufficient permissions to create LLMs | - |
| 409 | Conflict - LLM already exists with identical owner_id, provider_type, endpoint_url, api_path, model_identifier, and credentials_fingerprint | - |
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
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | The 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 code | Description | Response headers |
|---|---|---|
| 204 | LLM successfully deleted | - |
| 400 | Invalid request - LLM ID in invalid format | - |
| 401 | Unauthorized - invalid or missing API key | - |
| 403 | Forbidden - insufficient permissions to delete this LLM | - |
| 404 | Not found - LLM with the specified ID does not exist | - |
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
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | The unique identifier of the LLM to retrieve |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successfully retrieved LLM | - |
| 400 | Invalid request - LLM ID in invalid format | - |
| 401 | Unauthorized - invalid or missing API key | - |
| 403 | Forbidden - insufficient permissions to view this LLM | - |
| 404 | Not found - LLM with the specified ID does not exist | - |
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
| Name | Type | Description | Notes |
|---|---|---|---|
| ownerId | 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] |
| providerType | string? | Filter LLMs by provider type (e.g., OPENAI, VLLM, OLLAMA, etc.) | [optional] |
| label | string? | Filter by label value. Multiple label filters can be specified (e.g., ?label.environment=production&label.team=ai) | [optional] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successfully retrieved LLMs | - |
| 400 | Invalid request - invalid filter parameters or pagination token | - |
| 401 | Unauthorized - invalid or missing API key | - |
| 403 | Forbidden - insufficient permissions to list LLMs | - |
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
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | The unique identifier of the LLM to update | |
| lLMUpdateRequest | LLMUpdateRequest | LLM update details |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successfully updated LLM | - |
| 400 | Invalid request - ID format or update parameters invalid | - |
| 401 | Unauthorized - invalid or missing API key | - |
| 403 | Forbidden - insufficient permissions to update this LLM | - |
| 404 | Not found - LLM with the specified ID does not exist | - |