---
title: "Test an inference gateway provider before adding it"
method: POST
path: "/v1/inference-providers/test-connection"
tags: ["Inference Providers"]
---

# Test an inference gateway provider before adding it

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

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/inference-providers/test-connection`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Sends one short test prompt through AI Gateway to the trusted catalog provider with an unsaved organization credential (credential, apiKeys, or reuseCredentialFrom for Amazon Bedrock), the destination settings and one catalog model. Nothing is stored and no usage is recorded. ok=false carries a message for the admin that never contains the key. May consume a few tokens on the provider account. Requires the gatewayProviderTest feature, the Manage Gateway providers permission and enabled Gateway management; a person must send it, never the agent or an API key. Limited to 20 tests per member and 60 per organization every ten minutes.

## Request body

- object
  - `providerId` string, required
  - `model` string, required
  - `settings` object
    - `project` string
    - `location` string
    - `resourceName` string
    - `apiVersion` string
    - `region` string
    - `upstreamBaseUrl` string
  - `credential` object
    - `kind` 'api_key' | 'api_key_map' | 'aws_keys' | 'gcp_service_account' | 'oauth_google' | 'oauth_azure' | 'aws_sso', required
    - `secret` string, required
  - `apiKeys` object
  - `reuseCredentialFrom` string, typeid: Amazon Bedrock only: copy the organization AWS keys of another Amazon Bedrock provider in this organization, server-side. Mutually exclusive with credential and apiKeys.

## Response `200`

Test an inference gateway provider before adding it

- GatewayProviderTestResult
  - `ok` boolean, required
  - `model` string, required
  - `status` integer, nullable, required
  - `code` string, nullable, required
  - `message` string, nullable, required

## Other responses

- `400`: Invalid request or provider configuration.
- `401`: Sign-in required.
- `403`: Access denied or Gateway management disabled.
- `404`: Resource not found.
- `409`: Selection or resource conflict.
- `429`: Too many tests. Try again later.

## Changes

- **2026-10-28** `1f502c82a6e0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/inference-providers/test-connection/post.md)

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) - [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openworklabs/apis/den-api/revisions/4a8b581467c2?raw)
