APIInference

Inference Connections_preview Models

The same list for a connection that isn't saved yet. The key is used for this request only and never stored or returned.

POST
/inference/connections/models

The same list for a connection that isn't saved yet. The key is used for this request only and never stored or returned.

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

Bearer token authentication. Send an API key (a saai_api_-prefixed token) as Authorization: Bearer <token>.

Required permission

manage_inference

Request Body

application/json
  1. body

An unsaved connection to list models for: the fields create takes.

provider_type*ProviderType

The API a connection speaks. Each type sets its own base URL form and whether an API key is required.

Value in"openai""anthropic"
credential_mode?CredentialMode

Defaults to shared_key. A subscription query returns a fixed list, so it needs no base_url or api_key.

Value in"shared_key""subscription"
base_url?string

Required for a shared_key query.

Lengthlength <= 2048
api_key?string

Write-only: used for this request only, never stored or returned. Required for a shared_key query.

Lengthlength <= 4096

Response Body

The request has succeeded.

application/json
  1. response
models*array<>
Example Request
curl -X POST 'https://your-org.aisecurity.services.us.connect.secureauth.com/api/v1/inference/connections/models' \  -H 'Content-Type: application/json' \  -d '{  "provider_type": "openai"}'
Example Response
{  "models": [    {      "id": "string",      "name": "string"    }  ]}