---
title: "Test an AI provider connection."
method: POST
path: "/v1/ai/test"
tags: ["AI"]
---

# Test an AI provider connection.

`POST /v1/ai/test`

## Headers

- `X-AI-Base-Url` string, required
- `X-AI-Api-Key` string
- `X-AI-Model` string, required

## Response `200`

- object
  - `data` ResAITestConnection
    - `endpoint` string
    - `latency_ms` integer
    - `model` string
    - `ok` boolean
  - `status` string

## Other responses

- `400` — Fail due to resource not exists
- `401` — Server understand request but refuse to authorize it
- `502` — Unexpected error occurred
- `503` — Unexpected error occurred

## Changes

- **2026-09-16** `15ae2821b57b` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/improwised/apis/untitled-api/changes/v1/ai/test/post.md)

---

[API](https://skmtc.dev/improwised/apis/untitled-api.md) · [All operations](https://skmtc.dev/improwised/apis/untitled-api/llms.txt) · [OpenAPI document](https://skmtc.dev/improwised/apis/untitled-api/revisions/15ae2821b57b?raw)
