Models
Test LLM Provider Connectivity
POST
/api/agents/models/testOverview
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 | nullproviderstringwajibmodel_idstringwajibapi_key_idstring | nullapi_keystring | nullbase_urlstring | nulldefault_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[]wajibdetail[].msgstringwajibdetail[].typestringwajibdetail[].inputobjectdetail[].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":{}}'