---
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

---

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