Skip to main content
Docs vCurrentAPI
Version: Current

SDKs, sandbox and tooling

Ready-to-use clients, a Postman collection and a test environment to integrate fast and safely.

Copia um prompt pronto com fluxo de integração, payload e exemplos.

Sandbox (test keys)

Use an sm_test_... key for integration: it behaves like production but is not billed — the response carries billing_status: "not_charged". Request a test key (is_test) from SauBit. For an isolated homologation, request a staging environment.

Postman collection

Download and import: saubit.postman_collection.json. Set the baseUrl (https://api.saubit.com.br) and apiKey (your sm_test_...) variables.

Python SDK

pip install requests
from saubit_client import SauBitClient # sdks/python/saubit_client.py

sb = SauBitClient(api_key="sm_test_...")
res = sb.check(
[{"name": "Varfarina", "dose": 5, "dose_unit": "mg"},
{"name": "Aspirina", "dose": 100, "dose_unit": "mg"}],
conditions=["insuficiência renal"],
)
print(res["prescription_risk_level"], res["clinical_context_assessment"])

Node / TypeScript SDK (Node ≥ 18)

import { SauBitClient } from "./saubit.mjs"; // sdks/node/saubit.mjs

const sb = new SauBitClient({ apiKey: "sm_test_..." });
const res = await sb.check({
medications: [{ name: "Varfarina", dose: 5, dose_unit: "mg" }, { name: "Aspirina", dose: 100, dose_unit: "mg" }],
conditions: ["insuficiência renal"],
});
console.log(res.prescription_risk_level);

Go SDK (stdlib)

sb := saubit.New("sm_test_...") // sdks/go/saubit.go
res, _ := sb.Check(saubit.CheckInput{
Medications: []map[string]any{
{"name": "Varfarina", "dose": 5, "dose_unit": "mg"},
{"name": "Aspirina", "dose": 100, "dose_unit": "mg"},
},
Conditions: []string{"insuficiência renal"},
})
fmt.Println(res["prescription_risk_level"])

PHP SDK (ext-curl)

require 'SauBitClient.php'; // sdks/php/SauBitClient.php
use SauBit\SauBitClient;

$sb = new SauBitClient('sm_test_...');
$res = $sb->check(
[['name' => 'Varfarina', 'dose' => 5, 'dose_unit' => 'mg'],
['name' => 'Aspirina', 'dose' => 100, 'dose_unit' => 'mg']],
['conditions' => ['insuficiência renal']]
);
echo $res['prescription_risk_level'];

C# / .NET SDK (6+)

using SauBit; // sdks/dotnet/SauBitClient.cs
var sb = new SauBitClient("sm_test_...");
var res = await sb.CheckAsync(new object[] {
new { name = "Varfarina", dose = 5, dose_unit = "mg" },
new { name = "Aspirina", dose = 100, dose_unit = "mg" }
}, conditions: new[] { "insuficiência renal" });
Console.WriteLine(res.GetProperty("prescription_risk_level").GetString());

Java SDK (JDK 11+, Jackson)

var sb = new SauBitClient("sm_test_..."); // sdks/java/SauBitClient.java
var res = sb.check(
List.of(
Map.of("name", "Varfarina", "dose", 5, "dose_unit", "mg"),
Map.of("name", "Aspirina", "dose", 100, "dose_unit", "mg")),
Map.of("conditions", List.of("insuficiência renal")));
System.out.println(res.get("prescription_risk_level"));

All SDKs expose the same surface: check, recheck, batch, compare, chat, analysis_status, record_decision, fhir_check, cds_services, usage_summary. The files live under sdks/ in the repo.

Interactive reference

The full "Try it" reference (curl, Python, JavaScript, PHP, Go, Java) is at API Reference (Scalar). See also the System flows.