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

# modelProviders.test(draft): verifies a key without storing anything



## OpenAPI

````yaml /api-reference/openapi.json post /model-providers/test
openapi: 3.1.0
info:
  title: paddock API
  version: 1.0.0
  description: >-
    The paddock API. Send an API key, or a session token on its own session, as
    a bearer token.
servers:
  - url: https://api.paddock.build/v1
security:
  - bearer: []
paths:
  /model-providers/test:
    post:
      summary: 'modelProviders.test(draft): verifies a key without storing anything'
      operationId: testModelProviderDraft
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProviderDraft'
      responses:
        '200':
          description: The verification's outcome
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderTest'
        default:
          $ref: '#/components/responses/Error'
components:
  schemas:
    ProviderDraft:
      type: object
      additionalProperties: false
      required:
        - kind
        - apiKey
      properties:
        kind:
          $ref: '#/components/schemas/ProviderKind'
        baseUrl:
          type: string
        apiKey:
          type: string
        testModel:
          type: string
    ProviderTest:
      type: object
      required:
        - ok
        - method
        - models
        - error
      properties:
        ok:
          type: boolean
        method:
          description: How the key was verified.
          type: string
          enum:
            - list
            - request
        models:
          description: The IDs the provider lists; null when it lists none.
          oneOf:
            - type: array
              items:
                type: string
            - type: 'null'
        error:
          description: 'When not ok: what the provider answered.'
          type:
            - string
            - 'null'
    ProviderKind:
      type: string
      enum:
        - anthropic
        - openai
        - anthropic-compatible
        - openai-compatible
    ErrorBody:
      description: The body of every non-2xx response.
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
    ErrorObject:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
        details:
          type: object
    ErrorCode:
      type: string
      enum:
        - invalid_request
        - unauthorized
        - forbidden
        - not_found
        - conflict
        - payload_too_large
        - unsupported
        - unavailable
        - internal
  headers:
    RequestId:
      description: The request's ID, for support and logs
      schema:
        type: string
  responses:
    Error:
      description: Every non-2xx response
      headers:
        Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: An API key, or a session token on its own session

````

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