Browse documentation

SDKs for TypeScript, Python, Go & More

Integrate nRouter into applications using official SDKs across TypeScript, Python, Rust, Go, Java, Swift, Kotlin, Dart, and standard command-line cURL.

nRouter provides official and community SDKs to connect applications directly to https://api.nrouter.ai/v1 using your NROUTER_API_KEY.

Every SDK supports automatic cost tracking, server-side guardrails, and centralized fallback routing:

  • Zero-refactor drop-in: Point standard OpenAI or Anthropic clients to nRouter without code changes.
  • Multi-language support: Idiomatic libraries across backend, mobile, and system environments.

SDK Directory

LanguagePackageInstallationGuide
Pythonnrouter-sdkpip install nrouter-sdkGuide → · Demos
TypeScript / Node@nrouter_ai/sdknpm install @nrouter_ai/sdkGuide → · Demos
Gosdks/go/v3go get github.com/nRouterGateway/nrouter-sdk/sdks/go/v3@v3.1.2Guide → · Demos
Rustnroutercargo add nrouterGuide → · Demos
Javaai.nrouter:nrouter-sdkimplementation 'ai.nrouter:nrouter-sdk:3.1.2'Guide →
Kotlinai.nrouter:nrouter-sdk-kotlinimplementation 'ai.nrouter:nrouter-sdk-kotlin:3.1.2'Guide →
Androidai.nrouter:nrouter-sdk-androidimplementation 'ai.nrouter:nrouter-sdk-android:3.1.2'Guide →
SwiftSwift Packagegithub.com/nRouterGateway/nrouter-sdk.gitGuide →
Dartnrouterdart pub add nrouterGuide →
Rnrouterinstall.packages("nrouter", ...)Guide →
OpenAI Pythonopenaipip install openaiGuide →
PHPopenai-php/clientcomposer require openai-php/clientGuide →
Rubyruby-openaigem install ruby-openaiGuide →
cURLBuilt-in CLIPre-installedGuide →

Quick Authentication

Set your virtual API key in your environment for all SDKs and tools:

export NROUTER_API_KEY="sk-nrouter-xxxxxxxxxxxx"
Was this page helpful?