protect
Invoke
Overview
Getting Started
SDK/API
- Python SDK Reference
- TypeScript SDK Reference
How-to Guides
- Overview
- Conversational AI
- Retrieval-Augmented Generation
- Agentic AI
Cookbooks
- Use Cases
- Features
Integrations
Concepts
- Metrics
- Projects
- Logging
- Datasets
- Annotations
- Experiments
- Playground
API Reference
- health
- auth
- evaluate
- observe
- protect
- trace
- log_stream
- experiment
- feedback
- API Reference
References
protect
Invoke
POST
/
v1
/
protect
/
invoke
curl --request POST \
--url https://api.galileo.ai/v1/protect/invoke \
--header 'Content-Type: application/json' \
--header 'Galileo-API-Key: <api-key>' \
--data '{
"prioritized_rulesets": [
{
"rules": [
{
"metric": "<string>",
"operator": "gt",
"target_value": "<string>"
}
],
"action": {
"type": "OVERRIDE",
"subscriptions": [
{
"statuses": [
"triggered"
],
"url": "<string>"
}
],
"choices": [
"<string>"
]
},
"description": "<string>"
}
],
"payload": {
"input": "<string>",
"output": "<string>"
},
"project_name": "<string>",
"project_id": "<string>",
"stage_name": "<string>",
"stage_id": "<string>",
"stage_version": 123,
"timeout": 300,
"metadata": {},
"headers": {}
}'
{
"status": "<string>",
"text": "<string>",
"trace_metadata": {
"id": "<string>",
"received_at": 123,
"response_at": 123,
"execution_time": 123
}
}
Authorizations
Body
application/json
Response
200
application/json
Successful Response
The response is of type object
.
The response is of type object
.
The response is of type object
.
curl --request POST \
--url https://api.galileo.ai/v1/protect/invoke \
--header 'Content-Type: application/json' \
--header 'Galileo-API-Key: <api-key>' \
--data '{
"prioritized_rulesets": [
{
"rules": [
{
"metric": "<string>",
"operator": "gt",
"target_value": "<string>"
}
],
"action": {
"type": "OVERRIDE",
"subscriptions": [
{
"statuses": [
"triggered"
],
"url": "<string>"
}
],
"choices": [
"<string>"
]
},
"description": "<string>"
}
],
"payload": {
"input": "<string>",
"output": "<string>"
},
"project_name": "<string>",
"project_id": "<string>",
"stage_name": "<string>",
"stage_id": "<string>",
"stage_version": 123,
"timeout": 300,
"metadata": {},
"headers": {}
}'
{
"status": "<string>",
"text": "<string>",
"trace_metadata": {
"id": "<string>",
"received_at": 123,
"response_at": 123,
"execution_time": 123
}
}