> ## 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 available models

> Returns models available to the tenant. Each item includes its provider, context limit, and usage fields. An empty library returns an empty array.

A bounded keyset page ordered by normalized `model_id`, then normalized `provider`, then an opaque row identity. Every comparison runs under `COLLATE "C"`, so the order is byte-wise and stable across locales. Follow `next_cursor` to read the whole catalogue; a client that reads only the first page silently loses every model past it.

The response is conditionally revalidated. Every answer carries an `ETag` over the exact bytes served, plus `Cache-Control: private, no-cache` and `Vary: Authorization`. Send the tag back as `If-None-Match` and a match answers `304` with no body and the same headers. `private` is what stops a shared proxy handing one tenant's response to another even though the payload is identical for every authorized caller.




## OpenAPI

````yaml https://raw.githubusercontent.com/agentsfleet/agentsfleet/main/public/openapi.json get /v1/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/models:
    get:
      tags:
        - Model Library
      summary: List available models
      description: >
        Returns models available to the tenant. Each item includes its provider,
        context limit, and usage fields. An empty library returns an empty
        array.


        A bounded keyset page ordered by normalized `model_id`, then normalized
        `provider`, then an opaque row identity. Every comparison runs under
        `COLLATE "C"`, so the order is byte-wise and stable across locales.
        Follow `next_cursor` to read the whole catalogue; a client that reads
        only the first page silently loses every model past it.


        The response is conditionally revalidated. Every answer carries an
        `ETag` over the exact bytes served, plus `Cache-Control: private,
        no-cache` and `Vary: Authorization`. Send the tag back as
        `If-None-Match` and a match answers `304` with no body and the same
        headers. `private` is what stops a shared proxy handing one tenant's
        response to another even though the payload is identical for every
        authorized caller.
      operationId: get_model_library
      parameters:
        - name: limit
          in: query
          required: false
          description: Rows per page, 1..100. Defaults to 50.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: starting_after
          in: query
          required: false
          description: >-
            Opaque cursor from a previous page's `next_cursor`. Bound to the
            filters and page size that produced it. A cursor this endpoint never
            issued is `UZ-LIBRARY-001`. A real cursor carrying different filters
            or a different page size is `UZ-LIBRARY-002`, rather than a silently
            different page. Only the sort boundary is read from it — the filters
            applied are always the request's.
          schema:
            type: string
        - name: provider
          in: query
          required: false
          description: >-
            Exact match on the normalized provider. At most 128 bytes once
            normalized; empty after normalization is treated as absent.
          schema:
            type: string
            maxLength: 128
      responses:
        '200':
          description: One page of the model library catalogue.
          headers:
            ETag:
              description: Strong validator over the exact bytes served.
              schema:
                type: string
            Cache-Control:
              description: Always `private, no-cache` — store, but revalidate before reuse.
              schema:
                type: string
            Vary:
              description: Always `Authorization`.
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - version
                  - models
                  - total
                  - next_cursor
                properties:
                  version:
                    type: string
                    description: >-
                      Date of the most recently updated model, formatted as
                      YYYY-MM-DD in UTC.
                  models:
                    type: array
                    description: >-
                      The page's rows. Named `models` rather than `items`
                      because renaming a shipped `/v1` field is a breaking
                      change. `total` and `next_cursor` are added beside it, so
                      the page is navigable without breaking an existing client.
                    items:
                      type: object
                      required:
                        - id
                        - provider
                        - context_cap_tokens
                        - input_nanos_per_mtok
                        - cached_input_nanos_per_mtok
                        - output_nanos_per_mtok
                      properties:
                        id:
                          type: string
                          description: >-
                            The model_id. Provider hosting is encoded in the id
                            itself.
                        provider:
                          type: string
                        context_cap_tokens:
                          type: integer
                          format: int32
                        input_nanos_per_mtok:
                          type: integer
                          format: int64
                        cached_input_nanos_per_mtok:
                          type: integer
                          format: int64
                        output_nanos_per_mtok:
                          type: integer
                          format: int64
                  total:
                    type: integer
                    nullable: true
                    description: >-
                      Always null. Counting a keyset page costs the scan this
                      pagination exists to avoid. The key is present rather than
                      omitted, so no client need special-case its absence.
                  next_cursor:
                    type: string
                    nullable: true
                    description: Cursor for the next page, or null on the last.
        '304':
          description: >-
            The caller's `If-None-Match` matched the current tag. No body.
            Carries the same `ETag`, `Cache-Control` and `Vary` as the `200`. A
            `304` that omitted them would tell a cache to stop revalidating the
            very response it is holding.
          headers:
            ETag:
              description: Strong validator over the bytes the caller already holds.
              schema:
                type: string
            Cache-Control:
              description: Always `private, no-cache`.
              schema:
                type: string
            Vary:
              description: Always `Authorization`.
              schema:
                type: string
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '503':
          $ref: '#/components/responses/Error'
        default:
          $ref: '#/components/responses/Error'
components:
  responses:
    Error:
      description: RFC 7807 problem detail error response
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
  schemas:
    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.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Obtain a token via the CLI auth flow (POST /v1/auth/sessions) or GitHub
        OAuth

````