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

# List the tenant's model registry

> One entry per configured model; two entries can share a `secret_ref`. Each entry is joined to its secret's non-secret metadata (provider, kind, base_url, has_key) — `api_key` is never serialised. `active` is computed against the tenant's current provider selection (`GET /v1/tenants/me/provider`).

The response is a bounded page ordered by `created_at` descending, then `id` descending. Page forward by sending the response's `next_cursor` back as `starting_after`; a `null` `next_cursor` is the last page. Cursors are bound to the tenant and the `limit` that produced them, so changing `limit` mid-pagination requires starting from the first page again.




## OpenAPI

````yaml https://raw.githubusercontent.com/agentsfleet/agentsfleet/main/public/openapi.json get /v1/tenants/me/models
openapi: 3.1.0
info:
  title: agentsfleet Control Plane API
  version: 1.0.0
  description: API for managing workspaces, fleets, triggers, and runs.
  contact:
    name: agentsfleet
    url: https://agentsfleet.net
servers:
  - url: https://api.agentsfleet.net
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Health
    description: System status and readiness probes
    x-mintlify:
      navigation: Health
  - name: Authentication
    description: Command Line Interface (CLI) sign-in sessions and GitHub sign-in
    x-mintlify:
      navigation: Authentication
  - name: Workspaces
    description: Create and manage workspaces
    x-mintlify:
      navigation: Workspaces
  - name: Tenant
    description: Manage tenant provider settings and models
    x-mintlify:
      navigation: Tenant
  - name: auth-identity-events
    description: >-
      Process signed account events from Clerk. This route is not for customer
      fleets.
    x-mintlify:
      navigation: Auth Identity Events
  - name: Fleets
    description: Create, configure, and run fleets
    x-mintlify:
      navigation: Fleets
  - name: Schedules
    description: Manage and receive scheduled Fleet events
    x-mintlify:
      navigation: Schedules
  - name: Memory
    description: Read and search saved fleet memory
    x-mintlify:
      navigation: Memory
  - name: Secrets
    description: Manage named secrets for fleets in a workspace
    x-mintlify:
      navigation: Secrets
  - name: Admin
    description: Manage shared provider keys and models
    x-mintlify:
      navigation: Admin
  - name: Billing
    description: Read tenant balances and charge records
    x-mintlify:
      navigation: Billing
  - name: Integration Grants
    description: Manage fleet access to third-party services
    x-mintlify:
      navigation: Integration Grants
  - name: Connectors
    description: Connect workspaces to third-party providers
    x-mintlify:
      navigation: Connectors
  - name: Fleet Keys
    description: Manage keys that let external clients call a fleet
    x-mintlify:
      navigation: Fleet Keys
  - name: API Keys
    description: Manage tenant admin API keys
    x-mintlify:
      navigation: API Keys
  - name: Webhooks
    description: Receive signed events and approval decisions
    x-mintlify:
      navigation: Webhooks
  - name: Approvals
    description: List, inspect, and resolve pending approvals
    x-mintlify:
      navigation: Approvals
  - name: Fleet
    description: Enroll and manage runners
    x-mintlify:
      navigation: Fleet
  - name: Fleet Bundles
    description: Manage fleet source bundles in a workspace
    x-mintlify:
      navigation: Fleet Bundles
  - name: Fleet library
    description: Browse and add reusable fleet sources
    x-mintlify:
      navigation: Fleet library
  - name: Model Library
    description: List models available to the tenant
    x-mintlify:
      navigation: Model Library
paths:
  /v1/tenants/me/models:
    get:
      tags:
        - Tenant
      summary: List the tenant's model registry
      description: >
        One entry per configured model; two entries can share a `secret_ref`.
        Each entry is joined to its secret's non-secret metadata (provider,
        kind, base_url, has_key) — `api_key` is never serialised. `active` is
        computed against the tenant's current provider selection (`GET
        /v1/tenants/me/provider`).


        The response is a bounded page ordered by `created_at` descending, then
        `id` descending. Page forward by sending the response's `next_cursor`
        back as `starting_after`; a `null` `next_cursor` is the last page.
        Cursors are bound to the tenant and the `limit` that produced them, so
        changing `limit` mid-pagination requires starting from the first page
        again.
      operationId: list_tenant_model_entries
      parameters:
        - name: limit
          in: query
          required: false
          description: >
            Rows per page. An out-of-range value is rejected, never clamped
            (`UZ-LIBRARY-003`). Clamping would hand back a short page that a
            caller could mistake for the whole set.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: starting_after
          in: query
          required: false
          description: >
            Opaque cursor from the previous page's `next_cursor`. Compose
            nothing here. A value this endpoint did not issue is rejected
            (`UZ-LIBRARY-001`). One issued for a different tenant or page size
            is rejected distinctly (`UZ-LIBRARY-002`). A cursor whose boundary
            row has since changed is not an error. It continues from that
            boundary, and may return an empty page.
          schema:
            type: string
      responses:
        '200':
          description: Model registry page
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantModelEntryList'
        '400':
          $ref: '#/components/responses/Error'
          description: >
            `limit` out of range (`UZ-LIBRARY-003`), or `starting_after` is
            malformed (`UZ-LIBRARY-001`) or issued for a different query
            (`UZ-LIBRARY-002`). A rejected cursor never falls back to an unpaged
            read.
        '500':
          $ref: '#/components/responses/Error'
          description: >
            The page would have exceeded its encoded-body ceiling
            (`UZ-LIBRARY-005`). The endpoint refuses rather than truncating,
            because a caller cannot distinguish a short page from a complete
            one. Retrying is pointless without changing the request — this
            reports a server-side invariant breach, not a transient fault.
        default:
          $ref: '#/components/responses/Error'
components:
  schemas:
    TenantModelEntryList:
      type: object
      required:
        - models
        - total
        - next_cursor
        - platform_default_available
      properties:
        models:
          type: array
          description: >
            One page of entries, at most `limit` of them. Named `models` rather
            than the usual `items` because renaming a shipped v1 field is a
            breaking change. The pagination keys below were added beside it
            instead.
          items:
            $ref: '#/components/schemas/TenantModelEntry'
        total:
          type: integer
          nullable: true
          description: >
            Always `null` here. Keyset pagination does not count the full set,
            because that costs the scan the pagination exists to avoid. `null`
            is the documented "not computed" value. The key is always present,
            so clients need no branch for its absence.
        next_cursor:
          type: string
          nullable: true
          description: >
            Pass as `starting_after` to fetch the next page. `null` on the last
            page. Opaque — its encoding is not part of this API and may change.
        platform_default_available:
          type: boolean
          description: True when a shared default model is available.
        platform_default:
          type: object
          description: >
            The active platform default's identity — present exactly when
            `platform_default_available` is true (both derive from the same
            read). Lets the Models page render the Default row's model,
            provider, and context without a second request.
          required:
            - provider
            - model
            - context_cap_tokens
          properties:
            provider:
              type: string
            model:
              type: string
            context_cap_tokens:
              type: integer
              format: int64
            input_nanos_per_mtok:
              type: integer
              format: int64
              nullable: true
            cached_input_nanos_per_mtok:
              type: integer
              format: int64
              nullable: true
            output_nanos_per_mtok:
              type: integer
              format: int64
              nullable: true
    TenantModelEntry:
      type: object
      required:
        - id
        - model_id
        - secret_ref
        - kind
        - has_key
        - active
        - created_at
      properties:
        id:
          type: string
          format: uuid
        model_id:
          type: string
        secret_ref:
          type: string
        provider:
          type: string
          nullable: true
        kind:
          type: string
          enum:
            - provider_key
            - custom_endpoint
            - custom_secret
        base_url:
          type: string
          nullable: true
        has_key:
          type: boolean
          description: Whether the referenced secret's body carries a non-empty api_key.
        context_cap_tokens:
          type: integer
          format: int64
          nullable: true
          description: >-
            From the model-caps catalogue when the provider/model is known;
            omitted otherwise.
        input_nanos_per_mtok:
          type: integer
          format: int64
          nullable: true
          description: >-
            Input-token price in nanos per 1M tokens when the model is in the
            platform library.
        cached_input_nanos_per_mtok:
          type: integer
          format: int64
          nullable: true
          description: Cached-input-token price in nanos per 1M tokens when available.
        output_nanos_per_mtok:
          type: integer
          format: int64
          nullable: true
          description: >-
            Output-token price in nanos per 1M tokens when the model is in the
            platform library.
        active:
          type: boolean
          description: >-
            True when (secret_ref, model_id) matches the tenant's current
            provider selection.
        created_at:
          type: integer
          format: int64
    ErrorBody:
      type: object
      description: RFC 7807 problem detail error response (application/problem+json)
      required:
        - docs_uri
        - title
        - detail
        - error_code
        - request_id
      properties:
        docs_uri:
          type: string
          format: uri
          description: Stable link to documentation for this error code
          example: https://docs.agentsfleet.net/api-reference/error-codes#UZ-AGT-009
        title:
          type: string
          description: Short human-readable label, same for every occurrence of this code
          example: Fleet not found
        detail:
          type: string
          description: Instance-specific context describing what went wrong
          example: No fleet with id 'abc123' in this workspace.
        error_code:
          type: string
          description: Machine-readable error code
          example: UZ-AGT-009
        request_id:
          type: string
          description: Correlation ID for this request
        current_state:
          type: string
          description: >-
            Resource state that blocked the requested change. Present only on
            409 responses.
          example: paused
        user_message:
          type: string
          description: >
            Plain message safe to show to a user. Present only when an error
            defines one.


            Use `detail` or `title` when this field is absent.
          example: >-
            We couldn't find that Fleet. It may have been deleted, or the ID
            doesn't match one in this workspace.
        etag:
          type: string
          description: >-
            Resource version returned on 412 responses so the caller can refetch
            and retry.
  responses:
    Error:
      description: RFC 7807 problem detail error response
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Obtain a token via the CLI auth flow (POST /v1/auth/sessions) or GitHub
        OAuth

````