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

# POST /admin/api/models/discover



## OpenAPI

````yaml /generated/openapi.json post /admin/api/models/discover
openapi: 3.1.0
info:
  description: >-
    Forwarding, management, portal and OAuth APIs generated from Rust types.
    Input and output schemas preserve their respective Serde contracts.
    Streaming events and WebSocket messages are documented alongside HTTP
    payloads.
  title: GPROXY HTTP API
  version: 4.2.1
servers: []
security:
  - bearer: []
  - anthropicKey: []
  - googleKey: []
  - queryKey: []
paths:
  /admin/api/models/discover:
    post:
      tags:
        - Management
      summary: POST /admin/api/models/discover
      parameters:
        - description: Administrative scope selected by the caller.
          in: header
          name: x-gproxy-admin-scope
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Input_DiscoverBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Output_DiscoveredModelDto'
                type: array
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_Envelope'
          description: Gateway error
      security:
        - consoleSession: []
        - bearer: []
        - anthropicKey: []
        - googleKey: []
components:
  schemas:
    Input_DiscoverBody:
      description: |-
        The two arguments `discover_models` takes. It is a request shape rather
        than a DTO because the sdk's own signature is two arguments — there is
        nothing to mirror.
      properties:
        credentialId:
          default: null
          type:
            - string
            - 'null'
        providerId:
          type: string
      required:
        - providerId
      type: object
    Output_DiscoveredModelDto:
      description: One model an upstream says it offers.
      properties:
        hasDefaultPrice:
          description: >-
            Whether the bundled catalog can price it without an operator writing
            a

            rule by hand.
          type: boolean
        hasPrice:
          description: A saved provider or global rule matches this upstream model.
          type:
            - boolean
            - 'null'
        known:
          description: Whether this provider already has a `provider_models` row for it.
          type: boolean
        metadata: true
        upstreamName:
          type: string
      required:
        - upstreamName
        - known
        - hasDefaultPrice
        - metadata
      type: object
    Output_Envelope:
      properties:
        error:
          $ref: '#/components/schemas/Output_EnvelopeBody'
      required:
        - error
      type: object
    Output_EnvelopeBody:
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object
  securitySchemes:
    bearer:
      scheme: bearer
      type: http
    anthropicKey:
      in: header
      name: x-api-key
      type: apiKey
    googleKey:
      in: header
      name: x-goog-api-key
      type: apiKey
    queryKey:
      in: query
      name: key
      type: apiKey
    consoleSession:
      in: cookie
      name: gproxy_session
      type: apiKey

````

## Related topics

- [POST /admin/api/models/discover/apply](https://gproxy.leenhawk.com/api-reference/management/post-adminapimodelsdiscoverapply.md)
- [Models and routes](https://gproxy.leenhawk.com/guides/models.md)
- [Providers & Credentials](https://gproxy.leenhawk.com/guides/providers.md)
- [POST /admin/api/credentials/{id}/models/discover](https://gproxy.leenhawk.com/api-reference/management/post-adminapicredentials-modelsdiscover.md)
- [POST /admin/api/models](https://gproxy.leenhawk.com/api-reference/management/post-adminapimodels.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.