The LLM Settings endpoints let each user choose and configure the AI backend that powers Ghostly’s assisted test generation. Settings are stored per-user in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Meza-dev/Ghostly/llms.txt
Use this file to discover all available pages before exploring further.
user_llm_settings table. When no per-user settings exist, Ghostly transparently falls back to environment variable configuration — the envFallback field in the GET response tells you which case applies. All endpoints in this group require a JWT (dashboard session); API key authentication is not accepted here.
API keys submitted through the PUT endpoint are masked in all subsequent responses. The raw key is never returned once saved. Only the first four and last four characters are exposed as a hint (e.g.
sk-t••••1234).GET /v1/settings/llm — Get current LLM settings
Returns the currently saved LLM configuration for the authenticated user, together with a live connectivity status check.Response — 200 OK
Always
true on success.The user’s saved settings, or
null if no per-user configuration has been saved yet.Live connectivity probe result.
true when no per-user settings exist but Ghostly detected a valid LLM configuration in the server’s environment variables. In this case settings will be null.curl example
Example response
PUT /v1/settings/llm — Save LLM settings
Saves or replaces the user’s LLM configuration. If anapiKey was previously stored and you want to remove it without supplying a new one, pass "clearApiKey": true.
Request body
The catalog ID of the provider to configure. Must match one of the IDs returned by
GET /v1/settings/llm/providers (e.g. "openai", "cursor-cli", "mistral").The model identifier to use. Must be a non-empty string; falls back to the provider’s
defaultModel if blank.The plaintext API key for the provider. Only required for providers where
needsApiKey is true. Omit this field (or leave it blank) to keep an existing key unchanged.Override the provider’s endpoint URL. Falls back to the provider’s
defaultBaseUrl when omitted. Required for providers where needsBaseUrl is true and no default is defined.Set to
true to remove any previously stored API key for this provider. Takes precedence over any value in apiKey.Response — 200 OK
Returns the updated settings object and a fresh connectivity status.Response — 400 Bad Request
Returned for the following cases:providerIddoes not match any entry in the catalogmodelis missing or blank (and no default can be resolved)apiKeyis missing for a provider that requires one (and no key was previously stored)baseUrlis missing for a provider that requires one (and no default URL exists)
curl example
POST /v1/settings/llm/test — Test the LLM connection
Runs a live connectivity check against the user’s currently saved LLM configuration and returns the result. No request body is required.Response — 200 OK
curl example
GET /v1/settings/llm/providers — List available providers
Returns the full provider catalog. Use this to populate a provider picker in a UI or validate aproviderId before saving settings.
Response — 200 OK
Returns{ ok: true, providers: ProviderEntry[] }. Each entry in the providers array has the following shape:
Unique identifier for the provider (e.g.
"openai", "cursor-cli", "ollama").Display name shown in the UI (e.g.
"OpenAI", "Cursor Agent CLI").Transport kind.
"cli" providers invoke a local binary; "http" providers call a REST endpoint.Short human-readable description of the provider.
Whether an API key must be supplied for this provider.
Whether a base URL must be supplied or confirmed for this provider.
The provider’s default endpoint URL, or
null for CLI providers.The model used when no explicit model is specified.
true for providers (like cursor-cli) that can select a model automatically.true if live model discovery is available via GET /v1/settings/llm/models.Static list of known model options (or fallback models for live-capable providers).
| id | label | kind | needsApiKey |
|---|---|---|---|
cursor-cli | Cursor Agent CLI | cli | No |
openai | OpenAI | http | Yes |
mistral | Mistral | http | Yes |
anthropic | Anthropic | http | Yes |
ollama | Ollama (local) | http | No |
openrouter | OpenRouter | http | Yes |
curl example
GET /v1/settings/llm/models — List models for a provider
Returns available models for the specified provider. For providers thatsupportsLiveModels (currently cursor-cli), this attempts to query the CLI for a live list. All other providers return the static modelOptions array from the catalog.
Query parameters
The provider ID to list models for. Defaults to
"cursor-cli" when omitted.Response — 200 OK
Always
true on success.The resolved provider ID (echo of the query param or the default).
Array of model objects available for this provider. Each item has an
id (model identifier string) and a label (human-readable display name)."static" if the list came from the catalog; "live" if it was fetched dynamically from the CLI; "fallback" if a live fetch was attempted but failed and the static catalog list was returned instead.