---
title: "Test a custom LLM provider endpoint"
method: POST
path: "/v1/llm-providers/test-connection"
tags: ["LLM Providers"]
---

# Test a custom LLM provider endpoint

`POST /v1/llm-providers/test-connection`

Probes an OpenAI-compatible endpoint (Azure AI Foundry, LiteLLM, vLLM, gateways) with the given credential: normalizes common base-URL mistakes, calls GET /models, and returns the model ids the endpoint actually serves — on Azure these are the deployment names. Nothing is stored.

## Request body

- object
  - `api` string, required
  - `apiKey` string
  - `modelIds` string[]

## Response `200`

Probe completed (ok=false carries a human hint).

- LlmProviderTestConnectionResponse
  - `result` object, required
    - `ok` boolean, required
    - `vendor` 'azure' | 'openai-compatible', required
    - `normalizedApi` string, nullable, required
    - `attempted` string[], required
    - `models` object[], required
      - `id` string, required
    - `hint` string, nullable, required
    - `status` number, nullable, required
  - `verifications` object[]
    - `id` string, required
    - `status` 'ok' | 'adjusted' | 'failed', required
    - `npm` '@ai-sdk/openai-compatible' | '@ai-sdk/openai', required
    - `message` string, nullable, required

## Other responses

- `400` — The probe request was invalid.
- `401` — The caller must be signed in to test provider endpoints.

---

[API](https://skmtc.net/openworklabs/apis/den-api.md) · [All operations](https://skmtc.net/openworklabs/apis/den-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openworklabs/den-api/versions/805150503452/schema)
