From 05c5a8fd9c01f5ea1a0069302399b94337ef38a9 Mon Sep 17 00:00:00 2001 From: Rohit Agarwal Date: Sun, 27 Sep 2026 17:04:23 +0530 Subject: [PATCH 1/3] Add Decisions API reference page API pages are stubs that pull from the Portkey-AI/openapi spec, so a new endpoint needs its own stub and nav entry to appear. Co-Authored-By: Claude Opus 5.5 --- api-reference/inference-api/decisions.mdx | 4 ++++ docs.json | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 api-reference/inference-api/decisions.mdx diff --git a/api-reference/inference-api/decisions.mdx b/api-reference/inference-api/decisions.mdx new file mode 100644 index 00000000..98599af4 --- /dev/null +++ b/api-reference/inference-api/decisions.mdx @@ -0,0 +1,4 @@ +--- +title: "Decisions" +openapi: post /decisions +--- diff --git a/docs.json b/docs.json index dc7df0ed..6d3857c2 100644 --- a/docs.json +++ b/docs.json @@ -808,6 +808,12 @@ "api-reference/inference-api/rerank" ] }, + { + "group": "Decisions", + "pages": [ + "api-reference/inference-api/decisions" + ] + }, { "group": "OCR", "pages": [ @@ -3335,6 +3341,12 @@ "api-reference/inference-api/rerank" ] }, + { + "group": "Decisions", + "pages": [ + "api-reference/inference-api/decisions" + ] + }, { "group": "OCR", "pages": [ From ea29a9774053ed6a35f03bec896bfe326c158783 Mon Sep 17 00:00:00 2001 From: Rohit Agarwal Date: Tue, 29 Sep 2026 01:40:57 +0530 Subject: [PATCH 2/3] Add Decisions page to the Universal API group Add a product page for /v1/decisions in both Portkey and aigw docs, list it after Responses in the Universal API nav, and link it from the Universal API endpoint list. Co-Authored-By: Claude Opus 5.5 --- aigw/product/ai-gateway/decisions-api.mdx | 87 +++++++++++++++++++ aigw/product/ai-gateway/universal-api.mdx | 2 +- docs.json | 6 +- product/ai-gateway/decisions-api.mdx | 100 ++++++++++++++++++++++ product/ai-gateway/universal-api.mdx | 2 +- 5 files changed, 193 insertions(+), 4 deletions(-) create mode 100644 aigw/product/ai-gateway/decisions-api.mdx create mode 100644 product/ai-gateway/decisions-api.mdx diff --git a/aigw/product/ai-gateway/decisions-api.mdx b/aigw/product/ai-gateway/decisions-api.mdx new file mode 100644 index 00000000..5ec9c9ef --- /dev/null +++ b/aigw/product/ai-gateway/decisions-api.mdx @@ -0,0 +1,87 @@ +--- +title: "Decisions" +description: "Get typed judgments (probability, choice, or score) from models through the Prisma AIRS AI Gateway's /v1/decisions endpoint." +--- + + +Available on all AI Gateway plans. + + +The Decisions API returns a **typed judgment** instead of generated text. You send a `state` and a set of `questions`. The model returns one typed answer for each question. + +Use it for classification, routing, scoring, and yes/no checks, where you need a structured answer and not free text. + + + `/v1/decisions` is currently available through [TypeSafe's Jev models](/aigw/integrations/llms/typesafe). It does not support streaming. + + +## Quick Start + +```sh cURL +curl https://aigw.portkey.ai/v1/decisions \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $PORTKEY_API_KEY" \ + -H "x-portkey-provider: typesafe" \ + -d '{ + "model": "jev-latest", + "state": "Help! My payouts have been failing for 3 days.", + "questions": { + "department": { + "type": "choice", + "instructions": "Which team should handle this?", + "criteria": { "billing": "Payments", "technical": "Bugs" } + } + } + }' +``` + +Response: + +```json +{ + "model": "jev-1.13.0", + "answers": { + "department": { + "type": "choice", + "choice": "billing", + "probabilities": { "billing": 0.88, "technical": 0.12 }, + "confidence": 0.81 + } + }, + "usage": { "input_tokens": 296, "output_tokens": 20 }, + "provider": "typesafe" +} +``` + +## Question Types + +Each entry in `questions` sets a `type`. The type sets the shape of the answer: + +| Type | Use for | Answer shape | +|:---|:---|:---| +| `noul` | A yes/no judgment | `{ noul: <0–1 probability> }` | +| `choice` | One label from a fixed set | `{ choice, probabilities, confidence }` | +| `score` | A position on a scale | `{ score, legend, probabilities, confidence }` | + +`criteria` gives the type-specific detail. For a `choice` question, it is the set of labels. + +## Gateway Features + +Decisions requests go through the same gateway as other endpoints: + +- **Routing** — Retries, fallbacks, load balancing, and circuit breaking through [Configs](/aigw/product/ai-gateway/configs) +- **Caching** — [Simple and semantic caching](/aigw/product/ai-gateway/cache-simple-and-semantic) +- **Guardrails** — Before-request checks on the `state` field only. See [Guardrails for Decisions](/aigw/product/guardrails/decisions-guardrails) +- **Observability** — Logs, cost tracking, and analytics in [Observability](/aigw/product/observability) + + + + Provider setup and pricing + + + All API formats + + + Scan `state` before it reaches the model + + diff --git a/aigw/product/ai-gateway/universal-api.mdx b/aigw/product/ai-gateway/universal-api.mdx index 06c65025..7571b89a 100644 --- a/aigw/product/ai-gateway/universal-api.mdx +++ b/aigw/product/ai-gateway/universal-api.mdx @@ -400,7 +400,7 @@ The AI Gateway blocks requests to private and reserved IP ranges by default to p - **Gateway to Other APIs** — Proxy requests to any provider endpoint - **[Assistants API](/aigw/api-reference/assistants/create-assistant)** — OpenAI Assistants with persistent threads - **[Completions](/aigw/api-reference/completions/create-completion)** — Legacy text completion endpoint -- **Decisions** — Typed judgments (choice, score, probability) via `/v1/decisions`, currently available through [TypeSafe's Jev models](/aigw/integrations/llms/typesafe) +- **[Decisions](/aigw/product/ai-gateway/decisions-api)** — Typed judgments (choice, score, probability) via `/v1/decisions`, currently available through [TypeSafe's Jev models](/aigw/integrations/llms/typesafe) ### Multimodal Capabilities diff --git a/docs.json b/docs.json index 6d3857c2..3ab7d22c 100644 --- a/docs.json +++ b/docs.json @@ -63,7 +63,8 @@ "product/ai-gateway/universal-api", "product/ai-gateway/chat-completions", "product/ai-gateway/messages-api", - "product/ai-gateway/responses-api" + "product/ai-gateway/responses-api", + "product/ai-gateway/decisions-api" ] }, "product/ai-gateway/configs", @@ -1492,7 +1493,8 @@ "aigw/product/ai-gateway/universal-api", "aigw/product/ai-gateway/chat-completions", "aigw/product/ai-gateway/messages-api", - "aigw/product/ai-gateway/responses-api" + "aigw/product/ai-gateway/responses-api", + "aigw/product/ai-gateway/decisions-api" ] }, "aigw/product/ai-gateway/configs", diff --git a/product/ai-gateway/decisions-api.mdx b/product/ai-gateway/decisions-api.mdx new file mode 100644 index 00000000..44d249d1 --- /dev/null +++ b/product/ai-gateway/decisions-api.mdx @@ -0,0 +1,100 @@ +--- +title: "Decisions" +description: "Get typed judgments (probability, choice, or score) from models through Portkey's /v1/decisions endpoint." +--- + + +Available on all Portkey [plans](https://portkey.ai/pricing). + + +The Decisions API returns a **typed judgment** instead of generated text. You send a `state` and a set of `questions`. The model returns one typed answer for each question. + +Use it for classification, routing, scoring, and yes/no checks, where you need a structured answer and not free text. + + + `/v1/decisions` is currently available through [TypeSafe's Jev models](/integrations/llms/typesafe). It does not support streaming. + + +## Quick Start + +```sh cURL +curl https://api.portkey.ai/v1/decisions \ + -H "Content-Type: application/json" \ + -H "x-portkey-api-key: $PORTKEY_API_KEY" \ + -H "x-portkey-provider: typesafe" \ + -H "Authorization: Bearer $TYPESAFE_API_KEY" \ + -d '{ + "model": "jev-latest", + "state": "Help! My payouts have been failing for 3 days.", + "questions": { + "department": { + "type": "choice", + "instructions": "Which team should handle this?", + "criteria": { "billing": "Payments", "technical": "Bugs" } + } + } + }' +``` + +Response: + +```json +{ + "model": "jev-1.13.0", + "answers": { + "department": { + "type": "choice", + "choice": "billing", + "probabilities": { "billing": 0.88, "technical": 0.12 }, + "confidence": 0.81 + } + }, + "usage": { "input_tokens": 296, "output_tokens": 20 }, + "provider": "typesafe" +} +``` + +## Question Types + +Each entry in `questions` sets a `type`. The type sets the shape of the answer: + +| Type | Use for | Answer shape | +|:---|:---|:---| +| `noul` | A yes/no judgment | `{ noul: <0–1 probability> }` | +| `choice` | One label from a fixed set | `{ choice, probabilities, confidence }` | +| `score` | A position on a scale | `{ score, legend, probabilities, confidence }` | + +`criteria` gives the type-specific detail. For a `choice` question, it is the set of labels. + +## Gateway Features + +Decisions requests go through the same gateway as other endpoints: + +- **Routing** — Retries, fallbacks, load balancing, and circuit breaking through [Configs](/product/ai-gateway/configs) +- **Caching** — [Simple and semantic caching](/product/ai-gateway/cache-simple-and-semantic) +- **Guardrails** — Before-request checks on the `state` field only. See [Guardrails for Decisions](/product/guardrails/decisions-guardrails) +- **Observability** — Logs, cost tracking, and analytics in [Observability](/product/observability) + +## API Reference + +- [Create a Decision](/api-reference/inference-api/decisions) -- `POST /v1/decisions` + + + + Provider setup and pricing + + + Decisions API reference + + + All API formats + + + Scan `state` before it reaches the model + + + + +import PrismaAirsCta from "/snippets/prisma-airs-cta.mdx"; + + diff --git a/product/ai-gateway/universal-api.mdx b/product/ai-gateway/universal-api.mdx index 44ef247f..78167080 100644 --- a/product/ai-gateway/universal-api.mdx +++ b/product/ai-gateway/universal-api.mdx @@ -552,7 +552,7 @@ Portkey blocks requests to private and reserved IP ranges by default to prevent - **[Gateway to Other APIs](/api-reference/inference-api/gateway-for-other-apis)** — Proxy requests to any provider endpoint - **[Assistants API](/api-reference/inference-api/assistants-api/assistants/create-assistant)** — OpenAI Assistants with persistent threads - **[Completions](/api-reference/inference-api/completions)** — Legacy text completion endpoint -- **Decisions** — Typed judgments (choice, score, probability) via `/v1/decisions`, currently available through [TypeSafe's Jev models](/integrations/llms/typesafe) +- **[Decisions](/product/ai-gateway/decisions-api)** — Typed judgments (choice, score, probability) via `/v1/decisions`, currently available through [TypeSafe's Jev models](/integrations/llms/typesafe) ### Multimodal Capabilities From 097a282d557d423cb87b6c2bfedbb44d8c0cdf6e Mon Sep 17 00:00:00 2001 From: Vrushank Vyas Date: Tue, 29 Sep 2026 11:52:43 +0530 Subject: [PATCH 3/3] Add Decisions to the Prisma AIRS API reference PaloAltoNetworks/openapi#4 added POST /decisions to the Prisma AIRS spec. Sync the Inference nav from it, and link the aigw Decisions page to the generated reference page. Also drop the plan-tier box, which does not apply to Prisma AIRS. Co-Authored-By: Claude Opus 5.5 --- aigw/product/ai-gateway/decisions-api.mdx | 11 +++++++---- docs.json | 10 ++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/aigw/product/ai-gateway/decisions-api.mdx b/aigw/product/ai-gateway/decisions-api.mdx index 5ec9c9ef..70afac00 100644 --- a/aigw/product/ai-gateway/decisions-api.mdx +++ b/aigw/product/ai-gateway/decisions-api.mdx @@ -3,10 +3,6 @@ title: "Decisions" description: "Get typed judgments (probability, choice, or score) from models through the Prisma AIRS AI Gateway's /v1/decisions endpoint." --- - -Available on all AI Gateway plans. - - The Decisions API returns a **typed judgment** instead of generated text. You send a `state` and a set of `questions`. The model returns one typed answer for each question. Use it for classification, routing, scoring, and yes/no checks, where you need a structured answer and not free text. @@ -74,10 +70,17 @@ Decisions requests go through the same gateway as other endpoints: - **Guardrails** — Before-request checks on the `state` field only. See [Guardrails for Decisions](/aigw/product/guardrails/decisions-guardrails) - **Observability** — Logs, cost tracking, and analytics in [Observability](/aigw/product/observability) +## API Reference + +- [Create a Decision](/aigw/api-reference/decisions/create-decisions) -- `POST /v1/decisions` + Provider setup and pricing + + Decisions API reference + All API formats diff --git a/docs.json b/docs.json index 3ab7d22c..8c415901 100644 --- a/docs.json +++ b/docs.json @@ -2277,6 +2277,16 @@ "POST /completions" ] }, + { + "group": "Decisions", + "openapi": { + "source": "https://raw.githubusercontent.com/PaloAltoNetworks/openapi/refs/heads/main/openapi.yaml", + "directory": "aigw/api-reference" + }, + "pages": [ + "POST /decisions" + ] + }, { "group": "Embeddings", "openapi": {