GoodMemGoodMem
ReferenceAPIREST APIDecision Models

Create a decision model

POST /v1/decision-models: Saves the connection settings for a decision model.

Saves the connection settings for a decision model. Requires CREATE_DECISION_MODEL for the new model and its owner. You can register the same provider connection more than once, but each registration must have a unique UUID. Credentials are omitted from the response.

POST
/v1/decision-models
x-api-key<token>

In: header

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
displayNamestring

Name shown in the console and CLI.

description?string | null

Optional description.

providerTypeDecisionModelProviderType

Provider used by this model. This cannot be changed after creation.

Value in"JEV" | "LAYA" | "CLEF"
endpointUrlstring

Base URL of the provider, starting with http:// or https://. Do not include a query string, fragment, or username and password.

apiPath?string | null

Path appended to endpointUrl when sending a request. Jev and Laya use /v1/systemone if omitted. Clef requires the path for your account and model.

modelIdentifierstring

Model identifier accepted by the provider.

credentials?ApiKey (CREDENTIAL_KIND_API_KEY) | GcpAdc (CREDENTIAL_KIND_GCP_ADC) | None (omit this field)

API key for the provider, supplied in credentials.apiKey.inlineSecret with kind set to CREDENTIAL_KIND_API_KEY. May be omitted for Laya when the endpoint allows anonymous access.

Example{"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"}}

Structured credential payload describing how GoodMem should authenticate with an upstream provider.

kindstring

Credential strategy — fixed to CREDENTIAL_KIND_API_KEY for this variant

apiKeyApiKeyAuth

Configuration when kind is CREDENTIAL_KIND_API_KEY

Example{"inlineSecret":"sk-1234567890abcdef","secretRef":{"uri":"vault://path/to/secret"},"headerName":"Authorization","prefix":"Bearer "}
labels?object | null

Optional annotations to aid operators (e.g., "owner=vertex")

Propertiesproperties <= 20

Empty Object

Structured credential payload describing how GoodMem should authenticate with an upstream provider.

kindstring

Credential strategy — fixed to CREDENTIAL_KIND_GCP_ADC for this variant

gcpAdcGcpAdcAuth

Configuration when kind is CREDENTIAL_KIND_GCP_ADC

Example{"scopes":["https://www.googleapis.com/auth/cloud-platform"],"quotaProjectId":"my-quota-project"}
labels?object | null

Optional annotations to aid operators (e.g., "owner=vertex")

Propertiesproperties <= 20

Empty Object

configuration?object | null

Provider settings. Supported keys are image_preview (Jev only), timeout_millis, and max_response_bytes. These settings cannot change which features the model supports.

Empty Object

labels?object | null

Labels for filtering and organization.

Empty Object

version?string | null

Optional version label.

monitoringEndpoint?string | null

Optional URL for the provider health or metrics endpoint. Must start with http:// or https://.

ownerId?string | null

UUID of the principal that will own the model. If omitted, the authenticated principal becomes the owner.

Formatuuid
decisionModelId?string | null

Optional UUID for the new model. GoodMem generates one if omitted. A UUID that is already in use returns 409; reusing connection settings is allowed.

Formatuuid

Response Body

curl -X POST "https://your-goodmem-server.example.com/v1/decision-models" \  -H "GoodMem-Timeout-Ms: 30000" \  -H "Content-Type: application/json" \  -d '{    "credentials": {      "apiKey": {        "inlineSecret": "sk-1234567890abcdef",        "secretRef": {          "uri": "vault://path/to/secret"        },        "headerName": "Authorization",        "prefix": "Bearer "      }    }  }'
{
  "decisionModelId": "a426a8bc-ce04-41fc-a635-cb0d9e15bae3",
  "displayName": "string",
  "description": "string",
  "providerType": "JEV",
  "endpointUrl": "string",
  "apiPath": "string",
  "modelIdentifier": "string",
  "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"
    }
  },
  "configuration": {},
  "labels": {
    "property1": "string",
    "property2": "string"
  },
  "version": "string",
  "monitoringEndpoint": "string",
  "ownerId": "4d206909-730f-409a-88f6-dcfaa8fc28cc",
  "capabilities": {
    "questionTypes": [
      "string"
    ],
    "media": [
      {
        "kind": "IMAGE",
        "mimeTypes": [
          "string"
        ],
        "placements": [
          "string"
        ],
        "limits": [
          {
            "type": "MAX_ITEMS",
            "value": 0
          }
        ]
      }
    ],
    "limits": [
      {
        "type": "MAX_QUESTIONS",
        "value": 0
      }
    ],
    "contextBoundLimits": [
      "string"
    ],
    "semantics": [
      {
        "questionType": "CHOICE",
        "confidence": "ADJUSTED_TOP_PROBABILITY",
        "output": "CANDIDATE_IDENTIFIER"
      }
    ],
    "inputOverflow": "REJECTS"
  },
  "createdAt": 0,
  "updatedAt": 0,
  "createdById": "e13e432a-5323-4484-a91d-b5969bc564d9",
  "updatedById": "d8bc6076-4141-4a88-80b9-0eb31643066f"
}
Empty
Empty
Empty
Empty
Empty
Empty
Empty
Empty