---
title: "Test LLM provider connection"
method: POST
path: "/api/v1/llm-providers/{name}/test"
tags: ["LLM Providers"]
---

# Test LLM provider connection

`POST /api/v1/llm-providers/{name}/test`

## Request

- Base URL: `https://orchestrator.getaxonflow.com`
- URL: `https://orchestrator.getaxonflow.com/api/v1/llm-providers/{name}/test`
- Auth: none declared
- TypeScript: <https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api/docs/api/v1/llm-providers/:name/test/post.ts> (a function with typed inputs; its response is checked against the schema)

Tests a provider connection by making a simple API call.
Returns success status and latency information.

## Path parameters

- `name` string, required

## Request body

- object
  - `prompt` string: Optional test prompt (default is simple greeting)
  - `model` string: Optional model to test with

## Response `200`

Provider test result

- object
  - `success` boolean
  - `provider` string
  - `latency_ms` number
  - `response` string: Model response (if successful)
  - `error` string: Error message (if failed)

## Other responses

- `401`: Unauthorized - missing or invalid organization scope (coded envelope)
- `404`: Provider not found
- `500`: The provider connection test failed. `error.code` is `TEST_FAILED`. This replaces a documented `503` with a `{success, error}` body that the handler never emitted in any shape - handleTestProvider answers a failed connection with 500 through the same coded writeError as its other refusals. The 503 was found by the error-family guard, which reported this operation as mixing the two families; it was not mixing them, it was documenting one response that did not exist.

---

[API](https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api.md) - [All operations](https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getaxonflow/apis/axonflow-orchestrator-api/revisions/f408ef3ec9dd?raw)
