Client SDKs
TypeScript
Typed requests for Node.js and server runtimes
Use @octoryn/sdk for server-side TypeScript. Keep the API key in the runtime environment and pass application deadlines through the transport.
Install
Pin the current major version.
npm install @octoryn/sdk@3.0.0Create a client
Create one reusable client per service configuration.
import { Octoryn } from "@octoryn/sdk";
const client = new Octoryn({
apiKey: process.env.OCTORYN_API_KEY!,
baseURL: "https://api.octoryn.dev/v1",
});Advanced requests
The SDK covers text, streaming, tool calling and JSON Schema requests. Inspect terminal stream state and validate structured objects again before use.
Handle errors by class
Preserve status, error type and request ID. Do not hide policy denials or validation failures behind generic automatic retries.
