Galileo Technologies Protect API
The protect API from Galileo Technologies — 7 operation(s) for protect.
The protect API from Galileo Technologies — 7 operation(s) for protect.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/galileo-technologies:galileo-technologies-protect-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Galileo API Server Protect API
version: 0.0.0+orbit
servers:
- url: https://api.galileo.ai
description: Galileo API Server - galileo-v2
tags:
- name: Protect
paths:
/protect/invoke:
post:
tags:
- Protect
summary: Invoke
operationId: invoke_protect_invoke_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ProtectRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/ProtectResponse'
- $ref: '#/components/schemas/InvokeResponse'
title: Response Invoke Protect Invoke Post
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- APIKeyHeader: []
- ClassicAPIKeyHeader: []
- OAuth2PasswordBearer: []
- HTTPBasic: []
/projects/{project_id}/stages:
post:
tags:
- Protect
summary: Create Stage
description: 'Create a stage for a project, optionally seeding a first version.
Args:
stage_request: The stage to create, including its type and (for central stages) rulesets.
ctx: Async request context.
project: The project to create the stage in, resolved from the URL.
Returns:
The created stage, with its current version set if it''s a central stage.
Raises:
HTTPException: 422 if the project isn''t a protect or gen_ai project.'
operationId: create_stage_projects__project_id__stages_post
security:
- APIKeyHeader: []
- ClassicAPIKeyHeader: []
- OAuth2PasswordBearer: []
- HTTPBasic: []
parameters:
- name: project_id
in: path
required: true
schema:
type: string
format: uuid4
title: Project Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/StageWithRulesets'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/StageDB'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
get:
tags:
- Protect
summary: Get Stage
description: 'Get a stage by ID or by (project ID and name).
Args:
project_id: Project the stage belongs to, resolved from the URL.
stage_name: Stage name to look up (used with project_id when stage_id is omitted).
stage_id: Stage ID to look up directly.
ctx: Async request context.
Returns:
The matching stage.
Raises:
HTTPException: 422 if neither stage_id nor stage_name is provided.
GalileoServerException: 404 if the stage exists but belongs to a different project.'
operationId: get_stage_projects__project_id__stages_get
security:
- APIKeyHeader: []
- ClassicAPIKeyHeader: []
- OAuth2PasswordBearer: []
- HTTPBasic: []
parameters:
- name: project_id
in: path
required: true
schema:
type: string
format: uuid4
title: Project Id
- name: stage_name
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Stage Name
- name: stage_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid4
- type: 'null'
title: Stage Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/StageDB'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/projects/{project_id}/stages/paginated:
get:
tags:
- Protect
summary: List Stages Paginated
description: 'List the stages of a project.
`get_stage` resolves one stage the caller can already name. This lists them, so a
caller can report on a project''s stages without knowing any name. That matters
because a Protect invoke call with an unknown stage name creates that stage, so a
project can hold stages nobody configured.
Args:
project_id: Project to list stages for, resolved from the URL.
request: Pagination, taken from the query string.
ctx: Async request context.
Returns:
One page of the project''s stages, oldest first.'
operationId: list_stages_paginated_projects__project_id__stages_paginated_get
security:
- APIKeyHeader: []
- ClassicAPIKeyHeader: []
- OAuth2PasswordBearer: []
- HTTPBasic: []
parameters:
- name: project_id
in: path
required: true
schema:
type: string
format: uuid4
title: Project Id
- name: starting_token
in: query
required: false
schema:
type: integer
maximum: 1000000
minimum: 0
default: 0
title: Starting Token
- name: limit
in: query
required: false
schema:
type: integer
maximum: 500
minimum: 1
default: 100
title: Limit
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ListStageResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/projects/{project_id}/stages/{stage_id}:
post:
tags:
- Protect
summary: Update Stage
description: 'Create a new centralized-ruleset version for a central stage and set it as current.
Args:
project_id: Project the stage belongs to, resolved from the URL.
stage_id: Stage to update.
stage_version_rulesets: The new rulesets for the version.
ctx: Async request context.
Returns:
The updated stage, defaulted to the new version.
Raises:
GalileoServerException: 404 if the stage belongs to a different project.
HTTPException: 422 if the stage isn''t a central stage.'
operationId: update_stage_projects__project_id__stages__stage_id__post
security:
- APIKeyHeader: []
- ClassicAPIKeyHeader: []
- OAuth2PasswordBearer: []
- HTTPBasic: []
parameters:
- name: project_id
in: path
required: true
schema:
type: string
format: uuid4
title: Project Id
- name: stage_id
in: path
required: true
schema:
type: string
format: uuid4
title: Stage Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RulesetsMixin'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/StageDB'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
put:
tags:
- Protect
summary: Pause Stage
description: 'Pause or unpause a stage.
Args:
project_id: Project the stage belongs to, resolved from the URL.
stage_id: Stage to update.
pause: New paused state.
ctx: Async request context.
Returns:
The updated stage.
Raises:
GalileoServerException: 404 if the stage belongs to a different project.'
operationId: pause_stage_projects__project_id__stages__stage_id__put
security:
- APIKeyHeader: []
- ClassicAPIKeyHeader: []
- OAuth2PasswordBearer: []
- HTTPBasic: []
parameters:
- name: project_id
in: path
required: true
schema:
type: string
format: uuid4
title: Project Id
- name: stage_id
in: path
required: true
schema:
type: string
format: uuid4
title: Stage Id
- name: pause
in: query
required: false
schema:
type: boolean
default: false
title: Pause
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/StageDB'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/protect/invoke:
post:
tags:
- Protect
summary: Invoke
operationId: invoke_v1_protect_invoke_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ProtectRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/ProtectResponse'
- $ref: '#/components/schemas/InvokeResponse'
title: Response Invoke V1 Protect Invoke Post
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- APIKeyHeader: []
- ClassicAPIKeyHeader: []
- OAuth2PasswordBearer: []
- HTTPBasic: []
/v2/protect/invoke:
post:
tags:
- Protect
summary: Invoke
operationId: invoke_v2_protect_invoke_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ProtectRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/ProtectResponse'
- $ref: '#/components/schemas/InvokeResponse'
title: Response Invoke V2 Protect Invoke Post
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- APIKeyHeader: []
- ClassicAPIKeyHeader: []
- OAuth2PasswordBearer: []
- HTTPBasic: []
/public/v1/protect/invoke:
post:
tags:
- Protect
summary: Invoke
operationId: invoke_public_v1_protect_invoke_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ProtectRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/ProtectResponse'
- $ref: '#/components/schemas/InvokeResponse'
title: Response Invoke Public V1 Protect Invoke Post
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- APIKeyHeader: []
- ClassicAPIKeyHeader: []
- OAuth2PasswordBearer: []
- HTTPBasic: []
/public/v2/protect/invoke:
post:
tags:
- Protect
summary: Invoke
operationId: invoke_public_v2_protect_invoke_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ProtectRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/ProtectResponse'
- $ref: '#/components/schemas/InvokeResponse'
title: Response Invoke Public V2 Protect Invoke Post
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- APIKeyHeader: []
- ClassicAPIKeyHeader: []
- OAuth2PasswordBearer: []
- HTTPBasic: []
components:
schemas:
PassthroughAction:
properties:
type:
type: string
const: PASSTHROUGH
title: Type
default: PASSTHROUGH
subscriptions:
items:
$ref: '#/components/schemas/SubscriptionConfig'
type: array
title: Subscriptions
description: List of subscriptions to send a notification to when this action is applied and the ruleset status matches any of the configured statuses.
type: object
title: PassthroughAction
RulesetResult:
properties:
status:
type: string
description: Status of the execution.
rules:
items:
$ref: '#/components/schemas/Rule'
type: array
minItems: 1
title: Rules
description: List of rules to evaluate. Atleast 1 rule is required.
action:
oneOf:
- $ref: '#/components/schemas/OverrideAction'
- $ref: '#/components/schemas/PassthroughAction'
title: Action
description: Action to take if all the rules are met.
discriminator:
propertyName: type
mapping:
OVERRIDE: '#/components/schemas/OverrideAction'
PASSTHROUGH: '#/components/schemas/PassthroughAction'
description:
anyOf:
- type: string
- type: 'null'
title: Description
description: Description of the ruleset.
rule_results:
items:
$ref: '#/components/schemas/RuleResult'
type: array
title: Rule Results
description: Results of the rule execution.
type: object
title: RulesetResult
StageType:
type: string
enum:
- local
- central
title: StageType
ListStageResponse:
properties:
starting_token:
type: integer
title: Starting Token
default: 0
limit:
type: integer
title: Limit
default: 100
paginated:
type: boolean
title: Paginated
default: false
next_starting_token:
anyOf:
- type: integer
- type: 'null'
title: Next Starting Token
stages:
items:
$ref: '#/components/schemas/StageDB'
type: array
title: Stages
type: object
required:
- stages
title: ListStageResponse
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
ActionResult:
properties:
type:
$ref: '#/components/schemas/ActionType'
description: Type of action that was taken.
value:
type: string
title: Value
description: Value of the action that was taken.
type: object
required:
- type
- value
title: ActionResult
RuleResult:
properties:
status:
type: string
description: Status of the execution.
metric:
type: string
title: Metric
description: Name of the metric.
operator:
$ref: '#/components/schemas/RuleOperator'
description: Operator to use for comparison.
target_value:
anyOf:
- type: string
- type: number
- type: integer
- items: {}
type: array
- type: 'null'
title: Target Value
description: Value to compare with for this metric (right hand side).
value:
anyOf:
- {}
- type: 'null'
title: Value
description: Result of the metric computation.
execution_time:
anyOf:
- type: number
- type: 'null'
title: Execution Time
description: Execution time for the rule in seconds.
type: object
required:
- metric
- operator
- target_value
title: RuleResult
StageDB:
properties:
name:
type: string
title: Name
description: Name of the stage. Must be unique within the project.
project_id:
type: string
format: uuid4
title: Project Id
description: ID of the project to which this stage belongs.
description:
anyOf:
- type: string
- type: 'null'
title: Description
description: Optional human-readable description of the goals of this guardrail.
type:
$ref: '#/components/schemas/StageType'
description: Type of the stage.
default: local
paused:
type: boolean
title: Paused
description: Whether the action is enabled. If False, the action will not be applied.
default: false
created_by:
type: string
format: uuid4
title: Created By
id:
type: string
format: uuid4
title: Id
version:
anyOf:
- type: integer
- type: 'null'
title: Version
type: object
required:
- name
- project_id
- created_by
- id
title: StageDB
TraceMetadata:
properties:
id:
type: string
format: uuid4
title: Id
description: Unique identifier for the request.
received_at:
type: integer
title: Received At
description: Time the request was received by the server in nanoseconds.
response_at:
type: integer
title: Response At
description: Time the response was sent by the server in nanoseconds.
execution_time:
type: number
title: Execution Time
description: Execution time for the request (in seconds).
default: -1
type: object
title: TraceMetadata
SubscriptionConfig:
properties:
statuses:
items:
$ref: '#/components/schemas/ExecutionStatus'
type: array
title: Statuses
description: List of statuses that will cause a notification to be sent to the configured URL.
default:
- triggered
url:
type: string
minLength: 1
format: uri
title: Url
description: URL to send the event to. This can be a webhook URL, a message queue URL, an event bus or a custom endpoint that can receive an HTTP POST request.
type: object
required:
- url
title: SubscriptionConfig
RuleOperator:
type: string
enum:
- gt
- lt
- gte
- lte
- eq
- neq
- contains
- all
- any
- empty
- not_empty
title: RuleOperator
ProtectResponse:
properties:
status:
type: string
description: Status of the request after processing the rules.
text:
type: string
title: Text
description: Text from the request after processing the rules.
trace_metadata:
$ref: '#/components/schemas/TraceMetadata'
additionalProperties: true
type: object
required:
- text
- trace_metadata
title: ProtectResponse
description: Protect response schema with custom OpenAPI title.
StageWithRulesets:
properties:
prioritized_rulesets:
items:
$ref: '#/components/schemas/Ruleset'
type: array
title: Prioritized Rulesets
description: Rulesets to be applied to the payload.
name:
type: string
title: Name
description: Name of the stage. Must be unique within the project.
project_id:
type: string
format: uuid4
title: Project Id
description: ID of the project to which this stage belongs.
description:
anyOf:
- type: string
- type: 'null'
title: Description
description: Optional human-readable description of the goals of this guardrail.
type:
$ref: '#/components/schemas/StageType'
description: Type of the stage.
default: local
paused:
type: boolean
title: Paused
description: Whether the action is enabled. If False, the action will not be applied.
default: false
type: object
required:
- name
- project_id
title: StageWithRulesets
ActionType:
type: string
enum:
- OVERRIDE
- PASSTHROUGH
title: ActionType
InvokeResponse:
properties:
status:
type: string
description: Status of the execution.
api_version:
type: string
title: Api Version
default: 1.0.0
text:
type: string
title: Text
description: Text from the request after processing the rules.
trace_metadata:
$ref: '#/components/schemas/TraceMetadata'
stage_metadata:
$ref: '#/components/schemas/StageMetadata'
ruleset_results:
items:
$ref: '#/components/schemas/RulesetResult'
type: array
title: Ruleset Results
description: Results of the rule execution.
metric_results:
additionalProperties:
$ref: '#/components/schemas/MetricComputation'
type: object
title: Metric Results
description: Results of the metric computation.
action_result:
$ref: '#/components/schemas/ActionResult'
metadata:
anyOf:
- additionalProperties:
type: string
type: object
- type: 'null'
title: Metadata
description: Optional additional metadata. This being echoed back from the request.
headers:
anyOf:
- additionalProperties:
type: string
type: object
- type: 'null'
title: Headers
description: Optional additional HTTP headers that should be included in the response.
type: object
required:
- text
- trace_metadata
- stage_metadata
- action_result
title: InvokeResponse
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
ExecutionStatus:
type: string
enum:
- triggered
- failed
- error
- timeout
- paused
- not_triggered
- skipped
title: ExecutionStatus
description: Status of the execution.
Rule:
properties:
metric:
type: string
title: Metric
description: Name of the metric.
operator:
$ref: '#/components/schemas/RuleOperator'
description: Operator to use for comparison.
target_value:
anyOf:
- type: string
- type: number
- type: integer
- items: {}
type: array
- type: 'null'
title: Target Value
description: Value to compare with for this metric (right hand side).
type: object
required:
- metric
- operator
- target_value
title: Rule
MetricComputation:
properties:
value:
anyOf:
- type: number
- type: integer
- type: string
- items:
anyOf:
- type: number
- type: integer
- type: string
- type: 'null'
type: array
- additionalProperties:
anyOf:
- type: number
- type: integer
- type: string
- type: 'null'
type: object
- type: 'null'
title: Value
execution_time:
anyOf:
- type: number
- type: 'null'
title: Execution Time
status:
type: string
error_message:
anyOf:
- type: string
- type: 'null'
title: Error Message
type: object
title: MetricComputation
Ruleset:
properties:
rules:
items:
$ref: '#/components/schemas/Rule'
type: array
minItems: 1
title: Rules
description: List of rules to evaluate. Atleast 1 rule is required.
action:
oneOf:
- $ref: '#/components/schemas/OverrideAction'
- $ref: '#/components/schemas/PassthroughAction'
title: Action
description: Action to take if all the rules are met.
discriminator:
propertyName: type
mapping:
OVERRIDE: '#/components/schemas/OverrideAction'
PASSTHROUGH: '#/components/schemas/PassthroughAction'
description:
anyOf:
- type: string
- type: 'null'
title: Description
description: Description of the ruleset.
type: object
title: Ruleset
StageMetadata:
properties:
project_id:
type: string
format: uuid4
title: Project Id
stage_id:
type: string
format: uuid4
title: Stage Id
stage_name:
type: string
title: Stage Name
stage_version:
type: integer
title: Stage Version
stage_type:
$ref: '#/components/schemas/StageType'
type: object
required:
- project_id
- stage_id
- stage_name
- stage_version
- stage_type
title: StageMetadata
RulesetsMixin:
properties:
prioritized_rulesets:
items:
$ref: '#/components/schemas/Ruleset'
type: array
title: Prioritized Rulesets
description: Rulesets to be applied to the payload.
type: object
title: RulesetsMixin
Payload:
properties:
input:
anyOf:
- type: string
- type: 'null'
title: Input
description: Input text to be processed.
output:
anyOf:
- type: string
- type: 'null'
title: Output
description: Output text to be processed.
type: object
title: Payload
ProtectRequest:
properties:
prioritized_rulesets:
items:
$ref: '#/components/schemas/Ruleset'
type: array
title: Prioritized Rulesets
description: Rulesets to be applied to the payload.
payload:
$ref: '#/components/schemas/Payload'
description: Payload to be processed.
project_name:
anyOf:
- type: string
- type: 'null'
title: Project Name
description: Project name.
project_id:
anyOf:
- type: string
format: uuid4
- type: 'null'
title: Project Id
description: Project ID.
stage_name:
anyOf:
- type: string
- type: 'null'
title: Stage Name
description: Stage name.
stage_id:
anyOf:
- type: string
format: uuid4
- type: 'null'
title: Stage Id
description: Stage ID.
stage_version:
anyOf:
- type: integer
- type: 'null'
title: Stage Version
description: Stage version to use for the request, if it's a central stage with a previously registered version.
timeout:
type: number
title: Timeout
description: Optional timeout for the guardrail execution in seconds. This is not the timeout for the request. If not set, a default timeout of 5 minutes will be used.
default: 300.0
metadata:
anyOf:
- additionalProperties:
type: string
type: object
- type: 'null'
title: Metadata
description: Optional additional metadata. This will be echoed back in the response.
headers:
anyOf:
- additionalProperties:
type: string
type: object
- type: 'null'
title: Headers
description: Optional additional HTTP headers that should be included in the response.
type: object
required:
- payload
title: ProtectRequest
description: Protect request schema with custom OpenAPI title.
OverrideAction:
properties:
type:
type: string
const: OVERRIDE
title: Type
default: OVERRIDE
subscriptions:
items:
$ref: '#/components/schemas/SubscriptionConfig'
type: array
title: Subscriptions
description: List of subscriptions to send a notification to when this action is applied and the ruleset status matches any of the configured statuses.
choices:
items:
type: string
type: array
minItems: 1
title: Choices
description: List of choices to override the response with. If there are multiple choices, one will be chosen at random when applying this action.
type: object
required:
- choices
title: OverrideAction
securitySchemes:
APIKeyHeader:
type: apiKey
in: header
name: Splunk-AO-API-Key
ClassicAPIKeyHeader:
type: apiKey
in: header
name: Galileo-API-Key
OAuth2PasswordBearer:
type: oauth2
flows:
password:
scopes: {}
tokenUrl: https://api.galileo.ai/login
HTTPBasic:
type: http
scheme: basic
x-provenance:
method: harvested
publisher: Galileo Technologies
source: https://api.galileo.ai/openapi.json
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)