---
title: "List Agent Models Live"
method: POST
path: "/agents/models/live"
tags: ["Agents"]
---

# List Agent Models Live

`POST /agents/models/live`

Return the provider's live model list using the caller's API key.

The key is forwarded directly to the provider's ``/v1/models`` endpoint
(or Ollama's ``/api/tags``) and not persisted. Response shape matches
``GET /agents/models`` per provider so the FE can swap the static fallback
for the live list without changing the dropdown contract.

422 if ``apiKey`` is missing for a non-Ollama provider. 400 with the
provider's own error message on invalid key / connection failure.
Per-tenant rate limit: 30 req/min/bucket -> 429 with ``Retry-After``.

## Request body

- ListProviderModelsRequest — Request body for POST /agents/models/live. Same two shapes as ``ValidateLlmRequest`` minus ``model`` - this endpoint lists every model the caller's credentials can see, it doesn't check a specific one. ``savedConnectionId`` bypasses the inline-``apiKey`` requirement identically. ``capability`` scopes which models the response should include: - ``chat`` — runs the chat-capable + tool-capable filters; returns each model with its per-(provider, model) tuning matrix attached, since the FE renders temperature / reasoning controls off that blob. - ``embedding`` — runs the embedding-capable filter; returns each model as ``{value, label}`` (no tuning matrix — embedding endpoints accept no temperature / reasoning controls). A second validator rejects (provider, capability) pairs that contradict :data:`PROVIDER_CAPABILITIES` (e.g. ``provider=anthropic`` + ``capability=embedding``) before the BE wastes a round-trip on a request the matrix already pinned as impossible.
  - `provider` 'anthropic' | 'openai' | 'openai-responses' | 'ollama' | 'azure' | 'azure-openai' | 'bedrock' | 'qwen' | 'openai-compatible', required — Unified LLM provider enum. A single ``AgentLlmConnection`` row carries one provider and a set of capabilities (chat / embedding). ``PROVIDER_CAPABILITIES`` below pins which capabilities each provider can serve — picked by the FE Connections drawer and re-validated server-side on every write.
  - `capability` 'chat' | 'embedding', required — What a saved LLM connection can power. ``chat`` covers agent runtime + system-prompt suggestion + test-run. ``embedding`` covers knowledge-base embedding generation. A single connection can carry both when the provider supports both (OpenAI / Azure / Ollama) — one saved credential, two capabilities.
  - `apiKey` string — Raw key - never stored
  - `baseUrl` string, nullable
  - `savedConnectionId` string, nullable — If set, BE resolves provider/apiKey/baseUrl from the saved llmConnection by id.

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/streamkap/apis/streamkap-rest-api.md) · [All operations](https://skmtc.net/streamkap/apis/streamkap-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/streamkap/streamkap-rest-api/versions/8aea6143d003/schema)
