Skip to content
orukDocs Guide

SDK version 0.1.0

Python and TypeScript SDKs

Small typed clients for multipart upload, stable errors, request IDs, timeouts, and bounded retries. Both packages use the same public API contract and contain no model implementation.

Python

Wheel
Install
pip install https://oruk.ai/sdk/oruk-0.1.0-py3-none-any.whl
Analyze audio
import os
from oruk import oruk

with oruk(api_key=os.environ["ORUK_API_KEY"]) as client:
    result = client.analyze(
        "sample.wav",
        model="oruk-resonance",
    )

print(result["text"])
print(result["emotions"])
print(result["styles"])

TypeScript

Package
Install
npm install https://oruk.ai/sdk/oruk-ai-sdk-0.1.0.tgz
Analyze audio
import { readFile } from "node:fs/promises"
import { oruk } from "@oruk-ai/sdk"

const client = new oruk({ apiKey: process.env.ORUK_API_KEY! })
const bytes = await readFile("sample.wav")
const result = await client.analyze({
  file: new Blob([bytes], { type: "audio/wav" }),
  filename: "sample.wav",
  model: "oruk-resonance",
})

console.log(result.text, result.emotions, result.styles)

Client behavior

  • Unique X-Request-ID generated for each logical request
  • Retries only 429, 500, 502, 503, and 504
  • Exponential backoff with jitter and two retries by default
  • 120-second default timeout, configurable per client
  • Typed response structures in TypeScript
  • Structured status, code, and request ID on API errors
Continue to the production guide