GoodMemGoodMem
ReferenceAPIREST APILLMs

List LLMs

GET /v1/llms: Retrieves a list of LLM configurations accessible to the caller, with optional filtering.

GET
/v1/llms

Retrieves a list of LLM configurations accessible to the caller, with optional filtering.

LABEL FILTERS: Label filters accept either label.<key>=<value> or label[key]=value (for example, label.environment=production or label[environment]=production).

AUTHORIZATION: Requires LIST_LLM on the GoodMem instance. Each returned LLM must also be visible through READ_LLM; unauthorized LLMs are filtered in PostgreSQL. The ownerId parameter filters that already-authorized result set and does not grant additional visibility. This is a read-only operation with no side effects.

Authorization

ApiKeyAuth
headerx-api-key<token>

Query Parameters

ownerId?string

Filter the already-authorized result set by owner principal UUID. Omitting this parameter does not bypass per-LLM READ_LLM filtering.

providerType?string

Filter LLMs by provider type. Allowed values match the LLMProviderType schema.

Value in"OPENAI""LITELLM_PROXY""OPEN_ROUTER""DASHSCOPE""VLLM""OLLAMA""LLAMA_CPP""CUSTOM_OPENAI_COMPATIBLE"
label?

Filter by label key-value pairs. Label filters accept either label.<key>=<value> or label[key]=value (for example, label.environment=production or label[environment]=production).

Example
{  "environment": "production",  "team": "nlp"}

Header Parameters

GoodMem-Timeout-Ms?integer

Optional waiting budget in milliseconds, measured from REST servlet ingress and shared across all internal gRPC calls. Supply one decimal integer from 1 to 86400000. Omission adds no deadline. Existing shorter deadlines still apply. Expiry returns HTTP 504 before streaming starts; after streaming starts, no successful completion event is sent. Use SSE or opt into GoodMem-Stream-Terminal for an explicit terminal outcome. Retrieval work is cooperatively cancelled. An accepted mutation may still commit after timeout or disconnect; a failed response does not imply rollback.

Formatint64
Range1 <= value <= 86400000

Response Body

Successfully retrieved LLMs

application/json
  1. response

Response containing a list of LLM configurations

llms*array<>

List of LLM configurations matching the request filters

Example Request
curl -X GET 'https://your-goodmem-server.example.com/v1/llms?ownerId=550e8400-e29b-41d4-a716-446655440000&providerType=OPENAI' \  -H 'GoodMem-Timeout-Ms: 30000'
Example Response
{  "llms": [    {      "llmId": "550e8400-e29b-41d4-a716-446655440000",      "displayName": "GPT-4 Turbo",      "description": "OpenAI's GPT-4 Turbo model for chat completions",      "providerType": "OPENAI",      "endpointUrl": "https://api.openai.com/v1",      "apiPath": "/chat/completions",      "modelIdentifier": "gpt-4-turbo-preview",      "credentials": {        "apiKey": {          "inlineSecret": "sk-1234567890abcdef",          "secretRef": {            "uri": "vault://path/to/secret"          },          "headerName": "Authorization",          "prefix": "Bearer "        },        "gcpAdc": {          "scopes": [            "https://www.googleapis.com/auth/cloud-platform"          ],          "quotaProjectId": "my-quota-project"        }      },      "version": "1.0.0",      "monitoringEndpoint": "https://monitoring.example.com/llms/status",      "capabilities": {        "supportsChat": true,        "supportsCompletion": true,        "supportsFunctionCalling": true,        "supportsSystemMessages": true,        "supportsStreaming": true,        "supportsSamplingParameters": true      },      "defaultSamplingParams": {        "maxTokens": 2048,        "temperature": 0.7,        "topP": 0.9,        "topK": 50,        "frequencyPenalty": 0,        "presencePenalty": 0,        "stopSequences": [          "\n\n",          "END"        ]      },      "maxContextLength": 32768,      "ownerId": "550e8400-e29b-41d4-a716-446655440000",      "createdAt": 1617293472000,      "updatedAt": 1617293472000,      "createdById": "550e8400-e29b-41d4-a716-446655440000",      "updatedById": "550e8400-e29b-41d4-a716-446655440000"    }  ]}