Large Language Models

Discover LLMs

Probes an external LLM provider endpoint and returns the model configurations most likely to work. The provider type and API dialect are inferred from the credential and the URI when type is omitted.

Nothing is persisted. Combine a returned candidate with a name and the credential you supplied here and submit it to POST /v2/llms.

Discovery live-tests at most three models per detected endpoint — with both OpenAI dialects probed, at most six upstream generation calls — and returns every usable model the endpoint advertises.

post/v2/llms/discover

Headers

Request-Timeoutinteger

The platform makes a best effort to complete the request in the specified seconds, or it times out.

Request-Timeout-Millisinteger

The platform makes a best effort to complete the request in the specified milliseconds, or it times out.

Request body

uristring uri

The provider endpoint URI: an http or https URL including a host. Accepts a base URL, a full chat/completions URL, or a Vertex generateContent URL; each is reduced to the provider's base endpoint. Optional when the credential itself identifies the provider: Anthropic (sk-ant-…) and OpenAI (sk-…) API keys, Bedrock credentials (endpoint derived from the region), vertex_service_account/vertex_access_token credentials (endpoint derived from the project and region), and the Gemini api_key credential (endpoint defaults to Google AI Studio). Required for any other credential, including the Gemini service_account credential, which declares no project or region.

type'openai-compatible' | 'openai-responses' | 'vertex-ai' | 'anthropic'

The LLM provider type, identifying which authentication and configuration apply. New values may be added as providers are onboarded; clients should ignore values they do not recognize rather than fail.

headersobject

Additional HTTP headers to send with the probe requests.

test_model_parametersobject

Extra parameters passed to the live verification call (e.g. max_tokens for providers that require it).

Example request

{
  "uri": "https://api.openai.com/v1/chat/completions",
  "type": "openai-compatible",
  "auth": {
    "type": "bearer",
    "token": "abcdef......"
  },
  "test_model_parameters": {
    "max_tokens": 512
  }
}

Response

The discovered LLM configurations.

Example response

{
  "candidates": [
    {
      "type": "openai-compatible",
      "uri": "https://api.openai.com/v1/chat/completions"
    }
  ]
}

Changes

Changed in 1 of the 7 revisions of this API.1