> ## Documentation Index
> Fetch the complete documentation index at: https://docs.streamkap.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Agent 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``.



## OpenAPI

````yaml /openapi/openapi.json post /agents/models/live
openapi: 3.1.0
info:
  title: Streamkap REST API
  description: >-
    The Streamkap REST API allows you to programmatically manage your CDC
    pipelines, sources, destinations, transforms, and more.


    Authenticate using a bearer token obtained from the [Access
    Token](/api-reference/auth/access-token) endpoint with your API client
    credentials.
  contact:
    name: Streamkap Support
    url: https://streamkap.com/
    email: support@streamkap.com
  license:
    name: Proprietary
  version: 2.0.0
servers:
  - url: https://api.streamkap.com
    description: Production
security: []
tags:
  - name: Agents
    description: Create, deploy, and manage Flink-based AI agents.
  - name: Agents Observability
    description: >-
      Read-only views over the MCP audit log: agent rollup, sessions, spans,
      histograms, external-agent verify.
  - name: Alerts
    description: Manage alert subscribers, preferences, and notification credentials.
  - name: Authentication
    description: Obtain and refresh access tokens, manage client credentials and roles.
  - name: Billing
    description: Retrieve usage metrics, summaries, and export billing data.
  - name: Consumer Groups
    description: List, inspect, and reset Kafka consumer group offsets.
  - name: Dashboard
    description: Retrieve organisation-level statistics and overview data.
  - name: Destinations
    description: Create, configure, and manage data destinations and their lifecycle.
  - name: Kafka Access
    description: Manage Kafka users and their access permissions.
  - name: Logs
    description: Query and summarise system logs.
  - name: Pipelines
    description: Create, configure, and manage CDC pipelines and their lifecycle.
  - name: Project Keys
    description: Manage project keys that bundle API credentials and optional Kafka access.
  - name: Schema Registry
    description: Browse schema subjects, versions, and retrieve schema definitions.
  - name: Services
    description: View and switch service metadata.
  - name: Sources
    description: >-
      Create, configure, and manage data sources, snapshots, and their
      lifecycle.
  - name: Tags
    description: Create, update, and manage resource tags for organisation.
  - name: Topics
    description: Browse topic details, statistics, configurations, metrics, and messages.
  - name: Transforms
    description: >-
      Create, deploy, and manage data transforms, unit tests, and implementation
      details.
paths:
  /agents/models/live:
    post:
      tags:
        - Agents
      summary: List Agent Models Live
      description: >-
        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``.
      operationId: listAgentModelsLive
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListProviderModelsRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Listagentmodelslive
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - FronteggHTTPAuthentication: []
components:
  schemas:
    ListProviderModelsRequest:
      properties:
        provider:
          $ref: '#/components/schemas/AgentLlmProviderEnum'
        capability:
          $ref: '#/components/schemas/ConnectionCapability'
          description: >-
            Which model list the FE wants. ``chat`` filters to chat +
            tool-capable models; ``embedding`` filters to embedding-capable
            models. Must be in ``PROVIDER_CAPABILITIES[provider]``.
        apiKey:
          type: string
          maxLength: 512
          title: Apikey
          description: Raw key - never stored
          default: ''
        baseUrl:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Baseurl
        savedConnectionId:
          anyOf:
            - type: string
              maxLength: 100
            - type: 'null'
          title: Savedconnectionid
          description: >-
            If set, BE resolves provider/apiKey/baseUrl from the saved
            llmConnection by id.
      additionalProperties: false
      type: object
      required:
        - provider
        - capability
      title: ListProviderModelsRequest
      description: >-
        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.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentLlmProviderEnum:
      type: string
      enum:
        - anthropic
        - openai
        - openai-responses
        - ollama
        - azure
        - azure-openai
        - bedrock
        - qwen
        - openai-compatible
      title: AgentLlmProviderEnum
      description: >-
        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.
    ConnectionCapability:
      type: string
      enum:
        - chat
        - embedding
      title: ConnectionCapability
      description: |-
        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.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    FronteggHTTPAuthentication:
      type: http
      scheme: bearer

````