openrouter-typescript-sdk

Provide a TypeScript SDK for the OpenRouter unified API with callModel.

Updated Feb 27, 2026
One-click install
npx skills add https://github.com/netzkontrast/JANUS --skill openrouter-typescript-sdk-netzkontrast
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openrouter-typescript-sdk
Source: https://github.com/netzkontrast/JANUS/tree/main/.agents/skills/openrouter-typescript-sdk
Command: npx skills add https://github.com/netzkontrast/JANUS --skill openrouter-typescript-sdk-netzkontrast

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies integrating with over 300 AI models by providing a single, type-safe TypeScript SDK, eliminating the need to manage multiple API integrations.

Core Features & Use Cases

  • Unified API Access: Interact with diverse AI models (GPT, Claude, Llama, etc.) through one interface.
  • callModel Pattern: Streamlined function for text generation, tool usage, and streaming responses.
  • Tool Integration: Define and use custom tools with Zod schemas for robust validation.
  • Use Case: An agent needs to generate marketing copy, then summarize a technical document. This Skill allows the agent to seamlessly switch between models and use tools for each task without complex configuration.

Quick Start

Use the openrouter-typescript-sdk skill to call the 'openai/gpt-5-nano' model with the input 'Hello!'.

Frequently Asked Questions about openrouter-typescript-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I access multiple AI models like GPT and Claude through a single TypeScript API?

You can access over 300 AI models like GPT and Claude through a single TypeScript API by using the OpenRouter SDK. It provides a unified, type-safe interface via the callModel pattern, eliminating the need to manage multiple separate API integrations.

What is the best way to integrate tool usage and streaming into an LLM TypeScript application?

The best way to integrate tool usage and streaming in an LLM TypeScript application is using the OpenRouter SDK's callModel pattern. It supports text generation, multi-turn conversations, and streaming responses with type-safe interfaces and Zod schema validation for custom tools.

How do I define custom tools with Zod schemas for AI model interactions in TypeScript?

To define custom tools with Zod schemas for AI model interactions in TypeScript, use the OpenRouter SDK. It integrates Zod for robust validation, allowing you to seamlessly define and execute custom tools during text generation and multi-turn conversations.

Can I switch between different AI models for different tasks without complex configuration in TypeScript?

Yes, you can switch between different AI models for different tasks without complex configuration in TypeScript. The OpenRouter SDK provides a unified API allowing agents to seamlessly transition between models for various tasks like generating copy and summarizing documents.

Does the OpenRouter TypeScript SDK support multi-turn conversations and type-safe interfaces?

Yes, the OpenRouter TypeScript SDK supports multi-turn conversations and type-safe interfaces. It utilizes the callModel pattern to ensure robust type safety when interacting with over 300 diverse AI models for text generation and tool usage.