AI Gateway Admin

POST /ai/providers/test

Changed on

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    HTTP bearer

Request body

api_keystring password

The raw API key to test (may be empty for a self-hosted provider)

base_urlstring nullable

Optional custom base URL (required for "openai_compatible")

default_modelstring nullable

Model to send the test completion to. Required for "openai_compatible"; defaults to a small vendor model otherwise.

providerstring required

Provider ID: "openai", "anthropic", "xai", "gemini", "openrouter", "openai_compatible"

trust_private_addressboolean

Test as if the base URL's exact private address were trusted on the key. Requires settings:write.

Response

Test result

errorstring nullable

Error message if the test failed

latency_msinteger required

Response time in milliseconds

providerstring required
successboolean required

Changes

    • breaking

      removed the required property extensions from the response with the status

    • breaking

      removed the required property extensions from the response with the status

    • breaking

      removed the required property extensions from the response with the status