Validate Llm Connection
Validate an LLM provider API key and model availability.
Two callable shapes:
- Inline - raw
apiKey+ optionalbaseUrlsupplied directly, for example to test a new key before saving it. - Saved connection -
savedConnectionIdreferences a saved LLM connection; Streamkap loads itsapiKey,baseUrlandproviderserver-side, so the stored secret never leaves the server.
Calls the provider’s free list-models endpoint to check key validity
and model existence. apiKey is required unless the provider is
ollama or savedConnectionId is set (422 otherwise). 404 if
savedConnectionId does not match a saved connection.
Per-tenant rate limit: 30 req/min -> 429 with Retry-After.
/agents/validate-llmAuthorizationBearer token · headerrequiredapplication/jsonproviderAgentLlmProviderEnumrequiredUnified LLM provider enum.
A single AgentLlmConnection carries one provider and a set of
capabilities (chat / embedding). Each provider supports a fixed set of
capabilities, validated on every write.
anthropicopenaiopenai-responsesollamaazureazure-openaibedrockqwenopenai-compatiblemodelstringapiKeystringRaw key - never stored
baseUrlstring | nullShow propertiesHide properties
stringnullsavedConnectionIdstring | nullIf set, Streamkap uses the provider, apiKey and baseUrl of the tenant's saved LLM connection with this id and ignores the inline apiKey / baseUrl.
Show propertiesHide properties
stringnullSuccessful Response
objectValidation Error
detailValidationError[]Show propertiesHide properties
ValidationErrorlocstring | integer[]requiredShow propertiesHide properties
string | integerstringintegermsgstringrequiredtypestringrequiredinputanyctxobject