Pinter
ENID
Models
Lihat sebagai Markdown

Test LLM Provider Connectivity

POST/api/agents/models/test

Overview

Sends a lightweight probe completion to the model provider to verify that API keys, network routes, and quota allocations are functioning.

Authentication & Headers

  • Auth: Bearer Token (L1 / L2)
  • Required Header: API-Version: 1

Parameters & Request Body Fields

  • provider (string, required): Provider identifier (openai, anthropic, gemini).
  • model_name (string, required): Physical upstream model string (gpt-4o-mini).
  • api_key (string, required): Secret API credential key to test.

Body permintaan

application/json

idstring | null
providerstringwajib
model_idstringwajib
api_key_idstring | null
api_keystring | null
base_urlstring | null
default_parametersobject
{
  "id": "string",
  "provider": "string",
  "model_id": "string",
  "api_key_id": "string",
  "api_key": "string",
  "base_url": "string",
  "default_parameters": {}
}

Respons

200 Provider test passed

400 Bad Request - The request parameters or headers are invalid (e.g. unsupported API-Version).

401 Unauthorized - Missing, invalid, or expired JWT Bearer token.

403 Forbidden - Insufficient role permissions or resource access denied by RBAC policy.

404 Not Found - The requested resource ID was not found.

422 Validation Error

detailobject[]
detail[].locstring | integer[]wajib
detail[].msgstringwajib
detail[].typestringwajib
detail[].inputobject
detail[].ctxobject
{
  "detail": [
    {
      "loc": [
        null
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Contoh

curl -X POST "$PINTER_URL/api/agents/models/test" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"id":"string","provider":"string","model_id":"string","api_key_id":"string","api_key":"string","base_url":"string","default_parameters":{}}'