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

# Validate a provider key and discover its live model catalog

> Uses the supplied provider key only for live upstream validation and discovery. The key is not persisted by this operation. OAuth access requires protections:provision.



## OpenAPI

````yaml /api-reference/openapi.json post /oauth/protections/providers/{providerId}/models
openapi: 3.0.0
info:
  title: AIRCTRL API
  description: >-
    Programmatic access to AIRCTRL. Record values are encrypted by the client,
    so the API stores ciphertext and encrypted keys instead of plaintext record
    values.
  version: '1'
  contact: {}
servers:
  - url: https://api.airctrl.dev/v1
    description: Production
  - url: https://api.staging.airctrl.dev/v1
    description: QA
security: []
tags:
  - name: Context
    description: Find the accounts available to the caller.
  - name: Projects
    description: Create and manage projects.
  - name: Records
    description: Store and use client-encrypted records.
  - name: Audit
    description: Read record activity and access history.
  - name: Providers
    description: Discover supported AI providers.
  - name: Provider Credentials
    description: Manage encrypted provider credentials.
  - name: Gateways
    description: Create and operate AI gateways.
  - name: Usage
    description: Read gateway usage and spend data.
  - name: Service Accounts
    description: Read Service Account metadata and grant records.
paths:
  /oauth/protections/providers/{providerId}/models:
    post:
      tags:
        - OAuth
      summary: Validate a provider key and discover its live model catalog
      description: >-
        Uses the supplied provider key only for live upstream validation and
        discovery. The key is not persisted by this operation. OAuth access
        requires protections:provision.
      parameters:
        - in: path
          name: providerId
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                apiKey:
                  type: string
                  minLength: 1
                  writeOnly: true
              required:
                - apiKey
              additionalProperties: false
      responses:
        '200':
          description: Typed key-validity state and the live model catalog.
          content:
            application/json:
              schema:
                type: object
                required:
                  - ok
                  - data
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  data:
                    oneOf:
                      - type: object
                        required:
                          - invalidApiKey
                          - models
                        properties:
                          invalidApiKey:
                            type: boolean
                            enum:
                              - false
                          models:
                            type: array
                            items:
                              type: object
                              required:
                                - id
                                - name
                                - capabilities
                                - supportedCapabilities
                                - airctrlSupport
                                - pricing
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                canonicalId:
                                  type: string
                                aliases:
                                  type: array
                                  items:
                                    type: string
                                modes:
                                  type: array
                                  items:
                                    type: string
                                capabilities:
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - chat
                                      - vision
                                      - tools
                                      - streaming
                                      - responses
                                      - embeddings
                                      - image_generation
                                      - audio
                                      - realtime
                                      - moderation
                                      - ocr
                                      - completions
                                      - code_completion
                                      - video
                                      - native_completion
                                      - code_generation
                                      - generative_ui
                                      - research
                                      - document_generation
                                      - browser
                                supportedCapabilities:
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - chat
                                      - vision
                                      - tools
                                      - streaming
                                      - responses
                                      - embeddings
                                      - image_generation
                                      - audio
                                      - realtime
                                      - moderation
                                      - ocr
                                      - completions
                                      - code_completion
                                      - video
                                      - native_completion
                                      - code_generation
                                      - generative_ui
                                      - research
                                      - document_generation
                                      - browser
                                airctrlSupport:
                                  type: string
                                  enum:
                                    - supported
                                    - partial
                                    - unsupported
                                unsupportedReason:
                                  type: string
                                  enum:
                                    - unclassified_model
                                    - transport_missing
                                lifecycle:
                                  type: object
                                  required:
                                    - status
                                    - shutdownDate
                                  properties:
                                    status:
                                      type: string
                                      enum:
                                        - scheduled_shutdown
                                        - shutdown
                                    shutdownDate:
                                      type: string
                                      format: date
                                  additionalProperties: false
                                pricing:
                                  type: object
                                  nullable: true
                                  required:
                                    - billingUnit
                                    - inputPerMtok
                                    - outputPerMtok
                                    - cacheReadPerMtok
                                    - cacheWritePerMtok
                                    - unitPrice
                                    - currency
                                    - sourceName
                                    - sourceGeneratedAt
                                    - effectiveFrom
                                  properties:
                                    billingUnit:
                                      type: string
                                      enum:
                                        - per_1m_tokens
                                        - per_image
                                        - per_video
                                        - per_minute
                                        - per_second
                                        - per_1k_pages
                                        - per_1m_characters
                                        - per_request
                                        - composite
                                        - observed_cost
                                    inputPerMtok:
                                      type: number
                                      nullable: true
                                    outputPerMtok:
                                      type: number
                                      nullable: true
                                    cacheReadPerMtok:
                                      type: number
                                      nullable: true
                                    cacheWritePerMtok:
                                      type: number
                                      nullable: true
                                    unitPrice:
                                      type: number
                                      nullable: true
                                    currency:
                                      type: string
                                    sourceName:
                                      type: string
                                    sourceGeneratedAt:
                                      type: string
                                      format: date-time
                                      nullable: true
                                    effectiveFrom:
                                      type: string
                                      format: date-time
                                  additionalProperties: false
                              additionalProperties: false
                        additionalProperties: false
                      - type: object
                        required:
                          - invalidApiKey
                          - models
                        properties:
                          invalidApiKey:
                            type: boolean
                            enum:
                              - true
                          models:
                            type: array
                            items:
                              type: object
                              required:
                                - id
                                - name
                                - capabilities
                                - supportedCapabilities
                                - airctrlSupport
                                - pricing
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                canonicalId:
                                  type: string
                                aliases:
                                  type: array
                                  items:
                                    type: string
                                modes:
                                  type: array
                                  items:
                                    type: string
                                capabilities:
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - chat
                                      - vision
                                      - tools
                                      - streaming
                                      - responses
                                      - embeddings
                                      - image_generation
                                      - audio
                                      - realtime
                                      - moderation
                                      - ocr
                                      - completions
                                      - code_completion
                                      - video
                                      - native_completion
                                      - code_generation
                                      - generative_ui
                                      - research
                                      - document_generation
                                      - browser
                                supportedCapabilities:
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - chat
                                      - vision
                                      - tools
                                      - streaming
                                      - responses
                                      - embeddings
                                      - image_generation
                                      - audio
                                      - realtime
                                      - moderation
                                      - ocr
                                      - completions
                                      - code_completion
                                      - video
                                      - native_completion
                                      - code_generation
                                      - generative_ui
                                      - research
                                      - document_generation
                                      - browser
                                airctrlSupport:
                                  type: string
                                  enum:
                                    - supported
                                    - partial
                                    - unsupported
                                unsupportedReason:
                                  type: string
                                  enum:
                                    - unclassified_model
                                    - transport_missing
                                lifecycle:
                                  type: object
                                  required:
                                    - status
                                    - shutdownDate
                                  properties:
                                    status:
                                      type: string
                                      enum:
                                        - scheduled_shutdown
                                        - shutdown
                                    shutdownDate:
                                      type: string
                                      format: date
                                  additionalProperties: false
                                pricing:
                                  type: object
                                  nullable: true
                                  required:
                                    - billingUnit
                                    - inputPerMtok
                                    - outputPerMtok
                                    - cacheReadPerMtok
                                    - cacheWritePerMtok
                                    - unitPrice
                                    - currency
                                    - sourceName
                                    - sourceGeneratedAt
                                    - effectiveFrom
                                  properties:
                                    billingUnit:
                                      type: string
                                      enum:
                                        - per_1m_tokens
                                        - per_image
                                        - per_video
                                        - per_minute
                                        - per_second
                                        - per_1k_pages
                                        - per_1m_characters
                                        - per_request
                                        - composite
                                        - observed_cost
                                    inputPerMtok:
                                      type: number
                                      nullable: true
                                    outputPerMtok:
                                      type: number
                                      nullable: true
                                    cacheReadPerMtok:
                                      type: number
                                      nullable: true
                                    cacheWritePerMtok:
                                      type: number
                                      nullable: true
                                    unitPrice:
                                      type: number
                                      nullable: true
                                    currency:
                                      type: string
                                    sourceName:
                                      type: string
                                    sourceGeneratedAt:
                                      type: string
                                      format: date-time
                                      nullable: true
                                    effectiveFrom:
                                      type: string
                                      format: date-time
                                  additionalProperties: false
                              additionalProperties: false
                            maxItems: 0
                        additionalProperties: false
              examples:
                validCatalog:
                  summary: Valid key with one supported model
                  value:
                    ok: true
                    data:
                      invalidApiKey: false
                      models:
                        - id: model-standard
                          name: Standard Model
                          capabilities:
                            - chat
                          supportedCapabilities:
                            - chat
                          airctrlSupport: supported
                          pricing: null
                invalidKey:
                  summary: Provider rejected the key
                  value:
                    ok: true
                    data:
                      invalidApiKey: true
                      models: []
        '400':
          description: Missing or malformed provider key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    oneOf:
                      - type: string
                      - type: object
                        properties:
                          code:
                            type: string
                          message:
                            type: string
                        required:
                          - code
                          - message
                  code:
                    type: string
                  message:
                    type: string
                  error_description:
                    type: string
                  requestId:
                    type: string
                additionalProperties: true
        '403':
          description: OAuth scope or installation binding is invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    oneOf:
                      - type: string
                      - type: object
                        properties:
                          code:
                            type: string
                          message:
                            type: string
                        required:
                          - code
                          - message
                  code:
                    type: string
                  message:
                    type: string
                  error_description:
                    type: string
                  requestId:
                    type: string
                additionalProperties: true
        '502':
          description: The provider catalog could not be reached.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    oneOf:
                      - type: string
                      - type: object
                        properties:
                          code:
                            type: string
                          message:
                            type: string
                        required:
                          - code
                          - message
                  code:
                    type: string
                  message:
                    type: string
                  error_description:
                    type: string
                  requestId:
                    type: string
                additionalProperties: true
      security:
        - oauth2:
            - protections:provision
components:
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://app.airctrl.dev/oauth/authorize
          tokenUrl: https://api.airctrl.dev/v1/oauth/token
          refreshUrl: https://api.airctrl.dev/v1/oauth/token
          scopes:
            protections:provision: >-
              Atomically create the disclosed AIRCTRL resources for a protected
              external key.
            protections:read: Read only resources created by this OAuth connection.
            protections:update: >-
              Update allowlisted settings only on gateways created by this OAuth
              connection.
            protections:manage: >-
              Revoke, reactivate or rotate secrets only for protections created
              by this OAuth connection.
            protections:read-logs: >-
              Read request metadata only for protections created by this OAuth
              connection.
            protections:read-spend: >-
              Read token usage and spend only for protections created by this
              OAuth connection.
            offline_access: Receive rotating refresh tokens.

````

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