Sarvam AI
Cloudflare

Clef

Cloudflare's decision model. Ask typed questions about an input and get a probability for each answer.

  • Decisions
  • Vision
Provisioned Throughput

Best suited for

  1. 01

    Request routing

    Classify a support request and use the predicted probabilities to select a team or escalate.

  2. 02

    Scoring and classification

    Ask yes/no, choice or ordered-score questions to turn application state into typed decisions.

Benchmarks

Score (%)
  • Clef 94.2
  • Clef-flash 90.9
  • Kev 9B 84.8
  • Jev 79.7
  • DiffusionGemma Jev 74.3
  • Laya 14.3

Intent classification, macro-F1.

Score (%)
  • Clef 97.4
  • Jev 89.3
  • DiffusionGemma Jev 83.5
  • Kev 9B 79.0
  • Clef-flash 66.8
  • Laya 3.2

Intent classification with out-of-scope requests, macro-F1.

Score (%)
  • Kev 9B 80.0
  • Clef-flash 79.9
  • Jev 79.9
  • Clef 79.7
  • DiffusionGemma Jev 79.0
  • Laya 57.1

Selected quality.

Score (%)
  • Clef-flash 84.3
  • Clef 81.4
  • DiffusionGemma Jev 76.0
  • Jev 71.7
  • Kev 9B 57.8
  • Laya 29.0

Macro-F1.

API usage

Build with the Sarvam SDK

pip install -U "sarvamai>=0.1.43"V2 · Sarvam SDK · Decisions API
from sarvamai import SarvamAI​client = SarvamAI(api_subscription_key="YOUR_SARVAM_API_KEY")​response = client.decisions.create(    model="clef",    state="My Stripe integration stopped working and all checkout payments are failing.",    questions={        "urgent": {            "type": "noul",            "instructions": "Is this urgent and revenue-impacting?",        },        "department": {            "type": "choice",            "instructions": "Which team should handle this?",            "criteria": {                "billing": "Payments or invoices",                "technical": "Bugs or outages",                "sales": "New business enquiries",            },        },        "severity": {            "type": "score",            "instructions": "Rate the severity.",            "criteria": ["trivial", "minor", "moderate", "major", "critical"],        },    },)​answers = response.answersif answers["urgent"].noul > 0.5:    print("Escalate to", answers["department"].choice)
  1. 01 Install the Sarvam SDK

    Install sarvamai (Python 0.1.43+ or JavaScript 1.1.15+). Store your key in SARVAM_API_KEY.

  2. 02 Call the Decisions API

    Send POST /v2/systemone with model ID clef via client.decisions.create. The example sends one state and three typed questions.

    API reference
  3. 03 Validate your application

    Check probabilities and thresholds on representative states. Route confident answers automatically and send uncertain ones to review before production traffic.

Read API docs

Frequently asked questions

Explore other models

View catalogue

Build with frontier open-weight models. Served from India.