Smoke-test a model through the gateway
curl --request POST \
--url https://{host}/v2/workspaces/slug:llm-gateway/webhooks/v1/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"modelId": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({modelId: '<string>'})
};
fetch('https://{host}/v2/workspaces/slug:llm-gateway/webhooks/v1/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:llm-gateway/webhooks/v1/test"
payload = { "modelId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"response": {},
"dimensions": 123
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"status": 123,
"retryAfter": 123,
"provider": "<string>",
"model": "<string>",
"provider_error_type": "<string>"
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"status": 123,
"retryAfter": 123,
"provider": "<string>",
"model": "<string>",
"provider_error_type": "<string>"
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"status": 123,
"retryAfter": 123,
"provider": "<string>",
"model": "<string>",
"provider_error_type": "<string>"
}Test
Smoke-test a model through the gateway
Calls the gateway with a minimal request to verify a model is reachable. Used by the platform Models admin page (Test button).
type: "embeddings"→ callsOpenAI.embeddingswithinput: "Salut"and returns{ ok, dimensions, response }.type: "completions"(default) → callsOpenAI.chat-completionwith a single-turn user message and aget_weathertool definition, returns{ ok, response }.
On error, the call is wrapped in a try/catch and returns
{ ok: false, response: <error> }.
POST
/
v1
/
test
Smoke-test a model through the gateway
curl --request POST \
--url https://{host}/v2/workspaces/slug:llm-gateway/webhooks/v1/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"modelId": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({modelId: '<string>'})
};
fetch('https://{host}/v2/workspaces/slug:llm-gateway/webhooks/v1/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:llm-gateway/webhooks/v1/test"
payload = { "modelId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"response": {},
"dimensions": 123
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"status": 123,
"retryAfter": 123,
"provider": "<string>",
"model": "<string>",
"provider_error_type": "<string>"
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"status": 123,
"retryAfter": 123,
"provider": "<string>",
"model": "<string>",
"provider_error_type": "<string>"
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"status": 123,
"retryAfter": 123,
"provider": "<string>",
"model": "<string>",
"provider_error_type": "<string>"
}Authorizations
BearerAuthOrgApiKeyAuth
User-bound credential carrying an identity: either a session JWT
or a user access token (at:*) generated from the user settings UI.
Send as Authorization: Bearer <token>.
Org API keys (iak_*) are not accepted here - they carry
no user identity. Use the x-prismeai-api-key header instead
(see OrgApiKeyAuth).
Body
application/json
Was this page helpful?