---
title: "Test Provider Key"
method: POST
path: "/api/me/provider-keys/{provider}/test"
tags: ["me"]
---

# Test Provider Key

`POST /api/me/provider-keys/{provider}/test`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/me/provider-keys/{provider}/test`
- Auth: none declared

Probe the upstream provider with the supplied key. No DB write.

Used by the AI Providers page to validate a pasted key before save.

Surfaces the probe's diagnostic ``message``/``error_class`` so the UI can
distinguish "no probe configured" (cannot validate, save anyway) from a
transient failure (timed out / rate limited / provider error - retry).

## Path parameters

- `provider` string, required

## Headers

- `x-impersonate-identity-id` string, nullable

## Request body

- TestProviderKeyRequest
  - `api_key` string, required

## Response `200`

Successful Response

- TestProviderKeyResponse
  - `provider` string, required
  - `valid` boolean, nullable, required
  - `validation_error` string, nullable, required
  - `error_class` string, nullable
  - `scope_required` boolean
  - `scope_label` string, nullable
  - `provider_scope` string, nullable
  - `scope_outcome` string, nullable
  - `scope_candidates` string[]
  - `scope_detail` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/thinqos/apis/thinqos-api.md) · [All operations](https://skmtc.dev/thinqos/apis/thinqos-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thinqos/apis/thinqos-api/revisions/5387b4ded614?raw)
