For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Contact usJoin our Discord
HomeAdministration & GovernanceDevelopment and IntegrationAgent ForgeAPI ReferenceSDK Docs
HomeAdministration & GovernanceDevelopment and IntegrationAgent ForgeAPI ReferenceSDK Docs
  • API Reference
    • POSTResponses
    • POSTChat Completions
    • POSTCompletions
    • POSTEmbeddings
    • POSTAudio Transcription
    • POSTDocuments Extract
    • POSTRerank
    • POSTTokenize
    • POSTDetokenize
    • POSTFactuality
    • POSTInjection
    • POSTPII
    • POSTToxicity
    • GETModels
    • GETMCP Servers
    • GETMCP Tools
  • Valid Inputs
    • Enumerations for API
LogoLogo
Contact usJoin our Discord
API Reference

Injection

POST
https://{your-pg.api-domain}.com/injection
POST
/injection
$curl -X POST https://{your-pg.api-domain}.com/injection \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "prompt": "A short poem may be a stylistic choice or it may be that you have said what you intended to say in a more concise way.",
> "detect": true
>}'
1{
2 "id": "injection-nYb6vl44Uy6gQQ2pmBYYirGquP8vnDyj",
3 "object": "injection_check",
4 "created": 1717675539,
5 "checks": [
6 {
7 "index": 0,
8 "probability": 0.5,
9 "status": "success"
10 }
11 ]
12}
Injection detects potential prompt injection attacks.
Was this page helpful?
Previous

PII

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
promptstring or list of stringsRequired
detectbooleanRequired
Whether to detect potential injection attacks.

Response

Successful response.
idstring
Unique ID for the injection check.
objectstring

Type of object (injection_check).

createdinteger
Timestamp of when the injection check was created.
checkslist of objects
The set of vectorized data.

Errors

400
Bad Request Error
403
Forbidden Error