---
title: "Test Provider Connection"
method: POST
path: "/v1/provider-credentials/test"
tags: ["providers"]
---

# Test Provider Connection

`POST /v1/provider-credentials/test`

Test provider credentials without storing them (for the add/edit form).

Resolves the implementation from ``provider_type`` (honoring the
``*-compatible`` aliases) or the ``instance`` name, then lists the provider's
models with the supplied credentials. Nothing is persisted and the key is
never echoed.

## Request body

- TestProviderRequest — Credentials to test before saving (from the add-provider form).
  - `api_base` string, nullable
  - `api_key` string, nullable
  - `client_args` object, nullable
  - `instance` string, nullable — Provider/instance name; the impl when no provider_type.
  - `provider_type` string, nullable

## Response `200`

Successful Response

- TestProviderResponse — Result of a live provider connection test.
  - `discovery_unsupported` boolean — True when the test failed only because this backend serves no model-listing endpoint, so the credentials could not be verified this way but may still work for requests.
  - `error` string, nullable
  - `model_count` integer, required
  - `ok` boolean, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-07-31** `ea473885237b` — 1 info
  - added the optional property `discovery_unsupported` to the response with the `200` status
- **2026-07-20** `d9a87177ce4a` — 1 info
  - the endpoint scheme security `XApiKeyAuth` was added to the API
- **2026-07-20** `57a38fb88fa7` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/mozilla-ai/apis/otari/changes/v1/provider-credentials/test/post.md)

---

[API](https://skmtc.dev/mozilla-ai/apis/otari.md) · [All operations](https://skmtc.dev/mozilla-ai/apis/otari/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mozilla-ai/otari/revisions/7f178e92b56c/schema)
