v3
latestOpenAPI 3.1.0Proprietary2026-08-07266348629.6 KBAgents
Validate Llm Connection
Validate an LLM provider API key and model availability.
Two callable shapes:
- Inline - raw apiKey + optional baseUrl supplied directly. Used when the user is pasting a fresh key in the form.
- Saved connection - savedConnectionId references a stored llmConnection; BE loads the decrypted apiKey + baseUrl + provider server-side so the browser never holds the plaintext.
Calls the provider's free list-models endpoint to check key validity and model existence. The "apiKey required unless ollama or saved" rule is enforced by the request model's @model_validator. Per-tenant rate limit: 30 req/min/bucket -> 429 with Retry-After.
post/agents/validate-llm
Request body
Response
Successful Response
object required