All models

Levanto Sage 2

Private TEE
Verified
levanto/sage-2

Sage is a decision model: send text and typed questions (yes/no, choice, score) and get calibrated probabilities back instead of generated text. Choice and score distributions sum to 1. Call it through /v1/systemone.

Input / 1M tokens
$0.07
Output / 1M tokens
$2
Cache read / 1M tokens
—
Context window
32K tokens

Privacy & execution

This model supports private inference inside a hardware-isolated Trusted Execution Environment (TEE), protecting data while it is processed. HTTPS protects data in transit; client-to-model end-to-end encryption depends on the model and integration.

Attestation provides cryptographic evidence of the execution environment’s identity and configuration. Where response signatures are available, you can also verify the integrity of the request and response.

Verification documentation
01

Make your first request

Call /v1/systemone over HTTPS.

Get an API key and replace the API key placeholder below.

Submit context in state and typed questions in questions. Questions support probability (noul), choice, and score answers. The response contains answers and token usage. Streaming and the chat playground are unavailable for decision models.

curl --fail-with-body -D - "https://cloud-api.near.ai/v1/systemone" \ -H "Authorization: Bearer <YOUR-NEAR-AI-CLOUD-API-KEY>" \ -H "Content-Type: application/json" \ -d '{ "model": "levanto/sage-2", "state": "I was charged twice. Please help.", "questions": { "billing": { "type": "noul", "instructions": "Is this about billing?" } } }'

Copy the X-Generation-Id response header, then retrieve its receipt using the same API key:

GENERATION_ID="<X-Generation-Id response header>" curl --fail-with-body "https://cloud-api.near.ai/v1/signature/${GENERATION_ID}?signing_algo=ed25519" \ -H "Authorization: Bearer <YOUR-NEAR-AI-CLOUD-API-KEY>"

Check signature_kind: gateway is a Gateway receipt, not proof of TEE execution; provider_tee identifies a provider TEE receipt. Fetching a receipt alone does not verify it. Verification checks the signature and hashes of the exact request and response bytes. System One does not support end-to-end encryption.

This HTTP example uses HTTPS. Use the SDK below to verify deployment evidence and the response signature.

02

Build and Verify with the SDK

Use the official TypeSafe SDK in JavaScript or Python, or the NEAR AI SDK in Rust or Go, to call the model and verify its response.

Verification guide

Set NEARAI_API_KEY before running an example. System One supports JSON requests with E2EE and OHTTP disabled.

Setup

npm install @nearai/inference-sdk @typesafe-ai/sdk

Example

import { InferenceClient } from "@nearai/inference-sdk/node"; import { TypeSafeClient, noul } from "@typesafe-ai/sdk"; const apiKey = process.env.NEARAI_API_KEY; if (!apiKey) throw new Error("Set NEARAI_API_KEY first."); const inference = new InferenceClient({ apiKey, baseUrl: "https://cloud-api.near.ai/v1", e2ee: false, ohttp: false, }); const typesafe = new TypeSafeClient({ apiKey, baseURL: "https://cloud-api.near.ai", fetch: inference.fetch, compression: false, retry: { maxRetries: 0 }, }); const { data, response } = await typesafe.systemOne({ model: "levanto/sage-2", state: { message: "I was charged twice. Please help." }, questions: { billing: noul("Is this about billing?") }, }).withResponse(); // Use the NEAR receipt ID, which is separate from TypeSafe's requestId. const id = response.headers.get("X-Generation-Id"); if (!id) throw new Error("Missing System One receipt ID."); const verified = await inference.verifyResponse(id); console.log(data.answers); console.log("Verified signer:", verified.signatureKind);

JavaScript SDK guide