---
title: "Tests an LLM provider connection"
method: POST
path: "/apiops/projects/{projectName}/llm-providers/{providerName}/test-connection/"
tags: ["LlmProvider"]
---

# Tests an LLM provider connection

`POST /apiops/projects/{projectName}/llm-providers/{providerName}/test-connection/`

## Request

- Base URL: `http://167.86.118.166:32080`
- URL: `http://167.86.118.166:32080/apiops/projects/{projectName}/llm-providers/{providerName}/test-connection/`
- Auth: none declared
- TypeScript: <https://skmtc.dev/apinizer/apis/apinizer-management-apis/docs/apiops/projects/:projectName/llm-providers/:providerName/test-connection/post.ts> (a function with typed inputs; its response is checked against the schema)

Tests an LLM provider connection Manager-side (in-process, does not persist the configuration). Unlike ApiOpsVectorDb's test-connection, the request body is OPTIONAL here: if omitted, the stored provider (resolved by name) is tested as-is; if supplied, blank apiKey/apiSecret/serviceAccountJson fields are backfilled from the stored provider — but only when the connection target (endpoint/authScheme/authHeaderName/providerType/deploymentType) is unchanged, otherwise the credential must be re-supplied.

## Path parameters

- `projectName` string, required
- `providerName` string, required

## Request body

- LlmProvider: LLM provider value to be added. The internal '_class' discriminator is optional — it is derived automatically when omitted.
  - `id` string
  - `projectId` string
  - `name` string
  - `description` string
  - `enabled` boolean
  - `projectName` string
  - `providerType` 'OPENAI' | 'ANTHROPIC' | 'AZURE_OPENAI' | 'BEDROCK' | 'VERTEX' | 'COHERE' | 'MISTRAL' | 'DEEPSEEK' | 'GROQ' | 'MOONSHOT' | 'ZHIPU' | 'QWEN_DASHSCOPE' | 'XAI' | 'GOOGLE_AI_STUDIO' | 'TOGETHER' | 'FIREWORKS' | 'CEREBRAS' | 'HUGGINGFACE' | 'OPENROUTER' | 'PERPLEXITY' | 'NVIDIA_NIM' | 'VLLM' | 'OLLAMA' | 'CUSTOM_OPENAI_COMPAT' | 'VOYAGE' | 'TYPESAFE' | 'TEI' | 'OTHER'
  - `wireProtocol` 'OPENAI_COMPATIBLE' | 'ANTHROPIC' | 'GEMINI' | 'BEDROCK' | 'VLLM' | 'TYPESAFE' | 'TEI'
  - `defaultChatCompletionPath` string
  - `defaultEmbeddingPath` string
  - `defaultAudioTranscriptionPath` string
  - `defaultAudioSpeechPath` string
  - `defaultImageGenerationPath` string
  - `defaultResponsesPath` string
  - `endpoint` string
  - `apiVersion` string
  - `organizationId` string
  - `authScheme` 'BEARER' | 'API_KEY_HEADER' | 'BASIC' | 'AWS_SIGV4' | 'OAUTH2' | 'NONE' | 'CUSTOM'
  - `authHeaderName` string
  - `credentialSource` 'GATEWAY' | 'CLIENT'
  - `apiKeyLocation` 'HEADER' | 'QUERY'
  - `apiKeyPrefix` string
  - `allowClientOverride` boolean
  - `apiKey` string
  - `apiSecret` string
  - `supportedModels` LlmModel[]
    - `modelId` string
    - `enabled` boolean
    - `displayName` string
    - `contextWindow` integer
    - `maxOutputTokens` integer
    - `pricePerMillionInput` number
    - `pricePerMillionOutput` number
    - `pricePerMillionCached` number
    - `pricePerMillionCacheWrite` number
    - `cacheWritePricesByTtl` LlmCacheWritePrice[]
      - `ttl` string
      - `pricePerMillion` number
    - `contextTierPrices` LlmContextTierPrice[]
      - `aboveTokens` integer
      - `inputFactor` number
      - `outputFactor` number
    - `serviceTierPrices` LlmServiceTierPrice[]
      - `tier` 'BATCH' | 'PRIORITY' | 'FLEX' | 'CUSTOM'
      - `name` string
      - `inputFactor` number
      - `outputFactor` number
    - `pricePerImage` number
    - `pricePerAudioMinute` number
    - `pricePerCharacterTts` number
    - `capabilities` string[]
    - `modality` 'TEXT' | 'VISION' | 'AUDIO' | 'EMBEDDING' | 'RERANK' | 'MULTIMODAL' | 'IMAGE'
    - `aclEnabled` boolean
    - `aclEntries` LlmModelAclEntry[]
      - `subjectType` 'CONSUMER' | 'APPLICATION' | 'ORGANIZATION'
      - `subjectId` string
      - `subjectName` string
      - `organizationId` string
      - `organizationName` string
  - `onlyListedModels` boolean
  - `coldStartRetryEnabled` boolean
  - `lastHealthCheckAt` string, date-time
  - `healthStatus` 'UNKNOWN' | 'HEALTHY' | 'DOWN'
  - `lastLatencyMs` integer
  - `deploymentType` 'CLOUD' | 'ON_PREM' | 'OTHER'
  - `region` string
  - `serviceAccountJson` string
  - `builtIn` boolean
  - `builtInKey` string
  - `metadata` LlmProviderMetadataEntry[]
    - `key` string
    - `value` string
    - `secret` boolean
  - `resolvedEndpoint` string
  - `effectiveApiKeyPrefix` string
  - `resolvedDefaultEmbeddingPath` string
  - `resolvedDefaultAudioSpeechPath` string
  - `resolvedDefaultResponsesPath` string
  - `resolvedApiVersion` string
  - `resolvedOrganizationId` string
  - `clientProvidedCredential` boolean
  - `resolvedAuthHeaderName` string
  - `resolvedDefaultChatCompletionPath` string
  - `resolvedDefaultAudioTranscriptionPath` string
  - `resolvedDefaultImageGenerationPath` string
  - `apiKeyInQuery` boolean
  - `resolvedRegion` string

## Response `200`

successful operation!

- ApiOpsResponseSuccess
  - `status` 'SUCCESS' | 'FAILURE'
  - `resultMessage` string
  - `resultList` string[]
  - `resultCount` integer
  - `deploymentResult` DeploymentResult
    - `envName` string
    - `podName` string
    - `podIp` string
    - `success` boolean
    - `detail` string
    - `responseTime` integer
    - `detailList` unknown[]
      - unknown
    - `firstFromApiResultList` unknown
  - `unresolvedReferences` string[]
  - `advisories` ApiOpsAdvisoryDTO[]
    - `level` string
    - `key` string
    - `params` object

## Other responses

- `401`: not authorized for this operation!
- `500`: internal error!

## Changes

- **2026-10-28** `e083046b24cd`: 3 warning
  - removed the request property `resolvedApiKey`
  - removed the request property `resolvedApiSecret`
  - removed the request property `resolvedServiceAccountJson`
- **2026-10-20** `d1a546deccf0`: 12 breaking
  - request property `authScheme` was restricted to a list of enum values
  - request property `deploymentType` was restricted to a list of enum values
  - request property `healthStatus` was restricted to a list of enum values
  - request property `providerType` was restricted to a list of enum values
  - …8 more
  - …this revision’s changelog is incomplete
- **2026-10-16** `68680081f7b0`: 2 warning
  - removed the request property `providerRpmLimit`
  - removed the request property `providerTpmLimit`
- **2026-10-15** `51883cd4f16c`: 1 info
  - request property `coldStartRetryEnabled` deprecated
- **2026-10-15** `2fd6c7ebffb5`: 1 info
  - added the new optional request property `onlyListedModels`

[Operation history](https://skmtc.dev/apinizer/apis/apinizer-management-apis/changes/apiops/projects/:projectName/llm-providers/:providerName/test-connection/post.md)

---

[API](https://skmtc.dev/apinizer/apis/apinizer-management-apis.md) - [All operations](https://skmtc.dev/apinizer/apis/apinizer-management-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/apinizer/apis/apinizer-management-apis/revisions/e083046b24cd?raw)
