Models / Perplexity

Decider 27B

$0.04/Mtok in

Perplexity's decision model: typed answers with probabilities, text or image state, $0.04 per million input tokens and free output.

Playground

Try it in the browser

Playground$0.04 in / $0 out per 1M tokens

Facts

At a glance

Availability

Live

Pricing

$0.04 / M input · $0 / M output

Endpoint

Decisions

/v1/decisions

Capabilities

noul, choice

API

Call it from code

cURL
curl https://api.companyfabric.com/v1/decisions \
  -H "Authorization: Bearer $COMPANYFABRIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "perplexity/decider-27b",
    "state": "Second time this month my card was charged twice. Refund me or I cancel.",
    "questions": {
      "category": {
        "type": "choice",
        "instructions": "What is this ticket about?",
        "criteria": { "billing": "Charges, refunds", "technical": "Bugs, errors", "other": null }
      },
      "urgent": { "type": "noul", "instructions": "Does this need a reply within the hour?" },
      "churn_risk": {
        "type": "score",
        "instructions": "How likely is this customer to leave?",
        "criteria": ["No signal", "Frustrated", "Threatens to cancel"]
      }
    }
  }'
# → { "model": "perplexity/decider-27b",
#     "answers": {
#       "category":   { "type": "choice", "choice": "billing", "confidence": 0.97, "probabilities": { … } },
#       "urgent":     { "type": "noul",   "noul": 0.88 },
#       "churn_risk": { "type": "score",  "score": 1.8, "confidence": 0.81, "probabilities": { … } }
#     },
#     "usage": { "input_tokens": 142, "output_tokens": 0, "cost_usd": 0.0000063 } }
Node
const res = await fetch("https://api.companyfabric.com/v1/decisions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.COMPANYFABRIC_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "perplexity/decider-27b",
    state: "Second time this month my card was charged twice. Refund me or I cancel.",
    questions: {
      category: {
        type: "choice",
        instructions: "What is this ticket about?",
        criteria: { billing: "Charges, refunds", technical: "Bugs, errors", other: null },
      },
      urgent: { type: "noul", instructions: "Does this need a reply within the hour?" },
      churn_risk: {
        type: "score",
        instructions: "How likely is this customer to leave?",
        criteria: ["No signal", "Frustrated", "Threatens to cancel"],
      },
    },
  }),
})
const { answers, usage } = await res.json()

// Probabilities, not prose. Threshold them; a noul near 0.5 means "unsure",
// so fail closed and hand those to a human.
if (answers.urgent.noul > 0.7 && answers.category.choice === "billing") {
  // route to the billing on-call queue
}
console.log(usage.cost_usd) // what this call cost, same number as the dashboard
Python
import os, requests

res = requests.post(
    "https://api.companyfabric.com/v1/decisions",
    headers={"Authorization": f"Bearer {os.environ['COMPANYFABRIC_API_KEY']}"},
    json={
        "model": "perplexity/decider-27b",
        "state": "Second time this month my card was charged twice. Refund me or I cancel.",
        "questions": {
            "category": {
                "type": "choice",
                "instructions": "What is this ticket about?",
                "criteria": {"billing": "Charges, refunds", "technical": "Bugs, errors", "other": None},
            },
            "urgent": {"type": "noul", "instructions": "Does this need a reply within the hour?"},
            "churn_risk": {
                "type": "score",
                "instructions": "How likely is this customer to leave?",
                "criteria": ["No signal", "Frustrated", "Threatens to cancel"],
            },
        },
    },
    timeout=30,
).json()

answers = res["answers"]
print(answers["category"]["choice"], answers["urgent"]["noul"], res["usage"]["cost_usd"])

FAQ

Frequently asked questions

How much does Decider 27B cost?

$0.04 / M input · $0 / M output. The exact cost of each call is shown before you run it and metered to your prepaid balance, no subscription required.

Why use Decider 27B on CompanyFabric instead of going direct?

One key and one balance across every model in the library, at pricing at parity with or below the direct API. Switching models is a one-line change.

Is Decider 27B available through the OpenAI SDK?

No: POST /v1/decisions with "perplexity/decider-27b", a state (text or JSON) and typed questions (noul, choice, score). The answer is probabilities, not text, so there is nothing to parse. The code samples above show the request and response.

Explore

Related model APIs

One key. Every model. Exact prices.

Run Decider 27B with free starter credits. Free starter credits included, no subscription required.