Skip to content
Streamkap
Esc
↑↓navigate↵open⌘Jpreview

Validate Llm Connection

Validate an LLM provider API key and model availability.

Two callable shapes:

  • Inline - raw apiKey + optional baseUrl supplied directly, for example to test a new key before saving it.
  • Saved connection - savedConnectionId references a saved LLM connection; Streamkap loads its apiKey, baseUrl and provider server-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.

POST/agents/validate-llm
Authorization
AuthorizationBearer token · headerrequired
Request body
requiredapplication/json
providerAgentLlmProviderEnumrequired

Unified 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.

Allowed:anthropicopenaiopenai-responsesollamaazureazure-openaibedrockqwenopenai-compatible
modelstring
max length 200 · default: ""
apiKeystring

Raw key - never stored

max length 512 · default: ""
baseUrlstring | null
Show properties
Any of:
string
string
null
null
savedConnectionIdstring | null

If 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 properties
Any of:
string
string
null
null
Responses
200

Successful Response

object
422

Validation Error

detailValidationError[]
Show properties
Array of ValidationError
locstring | integer[]required
Show properties
Array of string | integer
Any of:
string
string
integer
integer
msgstringrequired
typestringrequired
inputany
ctxobject
Request
curl -X POST 'https://api.streamkap.com/agents/validate-llm' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "provider": "anthropic",
  "model": "",
  "apiKey": "",
  "baseUrl": "string",
  "savedConnectionId": "string"
}'
Response
{}