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

# Discover Models Preview

> Discover models from a provider API using the provided API key, without requiring a saved config.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/provider-configs/discover-preview
openapi: 3.1.0
info:
  description: >-
    Modular and extensible framework for building AI agents. This API requires
    JWT Bearer token authentication for most endpoints. Include your JWT token
    in the Authorization header. Public endpoints include /, /health, /docs,
    /redoc, and /openapi.json.
  title: AgentArea API
  version: 0.1.0
servers: []
security:
  - bearer: []
paths:
  /v1/provider-configs/discover-preview:
    post:
      tags:
        - v1
        - protected
        - provider-configs
      summary: Discover Models Preview
      description: >-
        Discover models from a provider API using the provided API key, without
        requiring a saved config.
      operationId: discover_models_preview_v1_provider_configs_discover_preview_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DiscoverPreviewRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscoverPreviewResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    DiscoverPreviewRequest:
      properties:
        api_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Key
        endpoint_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Endpoint Url
        provider_key:
          title: Provider Key
          type: string
      required:
        - provider_key
      title: DiscoverPreviewRequest
      type: object
    DiscoverPreviewResponse:
      properties:
        discovered:
          title: Discovered
          type: integer
        models:
          items:
            $ref: '#/components/schemas/DiscoverPreviewModelResponse'
          title: Models
          type: array
        new_models:
          title: New Models
          type: integer
      required:
        - discovered
        - new_models
        - models
      title: DiscoverPreviewResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    DiscoverPreviewModelResponse:
      properties:
        context_window:
          title: Context Window
          type: integer
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        display_name:
          title: Display Name
          type: string
        id:
          title: Id
          type: string
        input_cost_per_token:
          anyOf:
            - type: number
            - type: 'null'
          title: Input Cost Per Token
        is_new:
          default: false
          title: Is New
          type: boolean
        max_output_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Output Tokens
        model_name:
          title: Model Name
          type: string
        output_cost_per_token:
          anyOf:
            - type: number
            - type: 'null'
          title: Output Cost Per Token
        supports_function_calling:
          default: false
          title: Supports Function Calling
          type: boolean
        supports_reasoning:
          default: false
          title: Supports Reasoning
          type: boolean
        supports_vision:
          default: false
          title: Supports Vision
          type: boolean
      required:
        - id
        - model_name
        - display_name
        - context_window
      title: DiscoverPreviewModelResponse
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearer:
      bearerFormat: JWT
      description: JWT Bearer token for authentication
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````