SDKs
First-class SDKs for Python and TypeScript. Both wrap the REST API with typed interfaces, sensible defaults, and async support.
Python SDK
Installation
bash
pip install kubbiSend a single-content kubbi
python
from kubbi import KubbiClient
client = KubbiClient(api_key="kb_your_api_key")
result = client.send(
content="sensitive data here",
content_type="text/plain",
ttl_seconds=3600,
max_retrievals=1,
)
print(result.claim_url)
# https://api.kubbi.ai/r/abc123xyzSend multiple files in one kubbi
python
result = client.send_files(
files=[
{"name": "config.json", "content": '{"env":"prod"}', "content_type": "application/json", "role": "config"},
{"name": "notes.md", "content": "# Notes\nDeploy instructions.", "content_type": "text/markdown", "role": "instructions"},
],
ttl_seconds=3600,
max_retrievals=1,
)
print(result.claim_url)
print(result.file_count) # 2Claim a kubbi
Consumer functions are standalone — no API key needed.
python
from kubbi import claim
result = claim("https://api.kubbi.ai/r/abc123xyz")
print(result.content)
# "sensitive data here"
print(result.content_type)
# "text/plain"Inspect before claiming
python
from kubbi import inspect
meta = inspect("https://api.kubbi.ai/r/abc123xyz")
print(meta.status) # "active"
print(meta.content_type) # "text/plain"
print(meta.retrieval_count) # 0
print(meta.max_retrievals) # 1Delete a kubbi early
python
client.delete("d290f1ee-6c54-4b01-90e6-d701748f0851")
# Payload is wiped immediately. Further claims return 410 Gone.Async usage
python
from kubbi import AsyncKubbiClient, aclaim
async with AsyncKubbiClient(api_key="kb_your_api_key") as client:
result = await client.send(content="data", content_type="text/plain", ttl_seconds=600)
claimed = await aclaim(result.claim_url)TypeScript SDK
Installation
bash
npm install @kubbi.ai/sdkSend a single-content kubbi
typescript
import { KubbiClient } from "@kubbi.ai/sdk";
const client = new KubbiClient({ apiKey: "kb_your_api_key" });
const result = await client.send({
content: "sensitive data here",
contentType: "text/plain",
ttlSeconds: 3600,
maxRetrievals: 1,
});
console.log(result.claimUrl);
// https://api.kubbi.ai/r/abc123xyzSend multiple files in one kubbi
typescript
const result = await client.sendFiles({
files: [
{ name: "config.json", content: '{"env":"prod"}', contentType: "application/json", role: "config" },
{ name: "notes.md", content: "# Notes\nDeploy instructions.", contentType: "text/markdown", role: "instructions" },
],
ttlSeconds: 3600,
maxRetrievals: 1,
});
console.log(result.claimUrl);
console.log(result.fileCount); // 2Claim a kubbi
Consumer methods are static on KubbiClient — no API key needed.
typescript
const result = await KubbiClient.claim("https://api.kubbi.ai/r/abc123xyz");
console.log(result.content);
// "sensitive data here"
console.log(result.contentType);
// "text/plain"Inspect before claiming
typescript
const meta = await KubbiClient.inspect("https://api.kubbi.ai/r/abc123xyz");
console.log(meta.status); // "active"
console.log(meta.contentType); // "text/plain"
console.log(meta.retrievalCount); // 0
console.log(meta.maxRetrievals); // 1Delete a kubbi early
typescript
await client.delete("d290f1ee-6c54-4b01-90e6-d701748f0851");
// Payload is wiped immediately. Further claims return 410 Gone.REST API (no SDK)
The SDKs are thin wrappers around a standard REST API. If your language or runtime is not covered, use the API directly. See the API Reference for every endpoint.
Create with curl· bash
curl -X POST https://api.kubbi.ai/api/v1/kubbis \
-H "Authorization: Bearer kb_your_api_key" \
-H "Content-Type: application/json" \
-d '{"content":"secret","content_type":"text/plain","ttl_seconds":3600,"max_retrievals":1}'Claim with curl (empty POST, no body needed)· bash
curl -X POST https://api.kubbi.ai/r/abc123xyz/claim