Inference Providers

Test a custom OpenAI-compatible provider before saving it

Changed on

Sends one short test prompt through AI Gateway to {baseUrl}/chat/completions with the unsaved API key (or, with inferenceProviderId, the saved key of that custom provider, only for its saved address's origin) and the model settings on screen. Nothing is stored and no usage is recorded. ok=false carries a message for the admin that never contains the key, and step says which setup step the failure belongs to (connection: address or key; model: that model's id or settings; null: try again later). May consume a few tokens on the provider account. Requires the Manage Gateway providers permission and enabled Gateway management; a person must send it, never the agent or an API key. Shares the provider test limit of 20 tests per member and 60 per organization every ten minutes.

post/v1/inference-providers/custom/test-connection

Request

  • Base URL
    https://api.openworklabs.com
  • Auth
    • API key in header x-api-key
    • or HTTP bearer

Request body

object required
baseUrl, string required
apiKey, string
inferenceProviderId, string
model, object required

Response

Test a custom OpenAI-compatible provider before saving it

union required
object required
OR
object required

Changes

    • breaking

      the response's body type changed from no type to object for status

    • info

      removed subschema #2 from the response body anyOf list for the response status

    • info

      added the optional property message to the response with the status

    1 more change in this revision