Clef
Clef is a 27B open-weight decision model. Like Sarvam Prism, it answers typed questions about an input on the Decisions API: you send a state and a map of questions, and it returns a probability for every option of every question in one pass. It generates no text, so there is nothing to parse.
Unlike Sarvam Prism, Clef also reads images, and it takes up to 65,536 tokens per request.
Clef is available on Provisioned Throughput: capacity is set up for your workload and enabled for your organisation. Without access, requests return 404 not_found_error and the model isn’t listed in GET /v2/models. Contact us to request access. See Provisioned Throughput.
At a glance
Quickstart
Response:
Probabilities are rounded here; the API returns full floats. For what each field means, see Read the answers.
Questions about images
Send images in images, as base64 data URIs. The questions are answered about the state and the
images together. Remote http(s) image URLs return 400.
The sarvamai SDK’s decisions.create doesn’t have an images argument yet, so pass the images as an
extra body field:
In the JavaScript SDK, put images directly in the request object: client.decisions.create({ model: "clef", state, questions, images: [image] }). Its requestOptions can’t add body fields.
Over HTTP, send images in the request body:
Question rules
The question types are the same as on Sarvam Prism (Question types), with these rules on Clef:
- Always send
instructions(ornoulcriteria). The question ID is not used as the question. - Any key in a question other than
type,instructions, andcriteriareturns422, including misspellings such asinstruction. temperaturereturns422.max_tokensandstreamare accepted and ignored: Clef always answers in one JSON response.chat_template_kwargsmust be empty or absent; a non-empty value returns400.videosand other unknown top-level fields are ignored.
Limits
- 65,536 tokens per request, counting the state, every question and its options, and images. The state is counted once, however many questions you ask.
- The state is never truncated. A request over the limit fails with
400 invalid_request_error, and the message gives the count, such as “the prompt needs 70141 tokens (70001 for the state), but holds at most 65536”. Shorten the state, or split a long document across requests. - Ask several questions about the same state in one request: they are answered together, in one pass.
Differences from Sarvam Prism
Errors
Every error carries message, code, and request_id; validation errors also carry param.