> ## 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/credentials/{id}/models/test



## OpenAPI

````yaml /generated/openapi.json post /admin/api/credentials/{id}/models/test
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/credentials/{id}/models/test:
    post:
      tags:
        - Management
      summary: POST /admin/api/credentials/{id}/models/test
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - 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_Model'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_ModelTestResultDto'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_Envelope'
          description: Gateway error
      security:
        - consoleSession: []
        - bearer: []
        - anthropicKey: []
        - googleKey: []
components:
  schemas:
    Input_Model:
      properties:
        model:
          type: string
      required:
        - model
      type: object
    Output_ModelTestResultDto:
      properties:
        credentialLabel:
          type:
            - string
            - 'null'
        error:
          type:
            - string
            - 'null'
        latencyMs:
          format: uint64
          minimum: 0
          type: integer
        model:
          type: string
        ok:
          type: boolean
        reply:
          type:
            - string
            - 'null'
        status:
          description: The upstream's HTTP status, or 0 when nothing was answered.
          format: uint16
          maximum: 65535
          minimum: 0
          type: integer
        usage:
          anyOf:
            - $ref: '#/components/schemas/Output_UsageTokensDto'
            - type: 'null'
          description: >-
            What the upstream reported it spent. Absent when it reported
            nothing,

            which is not the same as zero.
      required:
        - ok
        - latencyMs
        - status
        - model
        - usage
        - reply
        - credentialLabel
        - error
      type: object
    Output_Envelope:
      properties:
        error:
          $ref: '#/components/schemas/Output_EnvelopeBody'
      required:
        - error
      type: object
    Output_UsageTokensDto:
      description: Token counts exactly as the upstream reported them.
      properties:
        cacheCreation:
          items:
            $ref: '#/components/schemas/Output_CacheCreationDto'
          type: array
        cachedInputTokens:
          format: uint64
          minimum: 0
          type:
            - integer
            - 'null'
        inputTokens:
          description: Ordinary input, excluding cache reads and cache writes.
          format: uint64
          minimum: 0
          type:
            - integer
            - 'null'
        outputTokens:
          description: Total output, reasoning included.
          format: uint64
          minimum: 0
          type:
            - integer
            - 'null'
        reasoningTokens:
          description: A subset of `output_tokens`, never additive with it.
          format: uint64
          minimum: 0
          type:
            - integer
            - 'null'
      required:
        - inputTokens
        - outputTokens
        - cachedInputTokens
        - cacheCreation
        - reasoningTokens
      type: object
    Output_EnvelopeBody:
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object
    Output_CacheCreationDto:
      description: >-
        Reported cache writes for one retention duration. None means unknown
        TTL.
      properties:
        tokens:
          format: uint64
          minimum: 0
          type: integer
        ttlSeconds:
          format: uint64
          minimum: 0
          type:
            - integer
            - 'null'
      required:
        - tokens
        - ttlSeconds
      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/credentials/{id}/models/discover](https://gproxy.leenhawk.com/api-reference/management/post-adminapicredentials-modelsdiscover.md)
- [POST /admin/api/models/test](https://gproxy.leenhawk.com/api-reference/management/post-adminapimodelstest.md)
- [POST /admin/api/credentials/{id}/quota-probe](https://gproxy.leenhawk.com/api-reference/management/post-adminapicredentials-quota-probe.md)
- [POST /admin/api/credentials/{id}/quota-diagnostics](https://gproxy.leenhawk.com/api-reference/management/post-adminapicredentials-quota-diagnostics.md)
- [POST /admin/api/credentials](https://gproxy.leenhawk.com/api-reference/management/post-adminapicredentials.md)


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