npx skills add ...
npx skills add inference-sh/skills --skill javascript-sdk
JavaScript/TypeScript SDK for inference.sh - run AI apps, build agents, integrate with all models. Package: @inferencesh/sdk (npm install). Full TypeScript support, streaming, file uploads. Build agents with template or ad-hoc patterns, tool builder API, skills, human approval. Use for: JavaScript integration, TypeScript, Node.js, React, Next.js, frontend apps. Triggers: javascript sdk, typescript sdk, npm install, node.js api, js client, react ai, next.js ai, frontend sdk, @inferencesh/sdk, typescript agent, browser sdk, js integration
npx skills add inference-sh/skills --skill javascript-sdk
Install the belt CLI skill:
npx skills add belt-sh/cli
Build AI applications with the inference.sh JavaScript/TypeScript SDK.

Requirements: Node.js 18.0.0+ (or modern browser with fetch)
Get your API key: Settings → API Keys → Create API Key
| Parameter | Type | Description |
|---|---|---|
app | string | App ID (namespace/name@version) |
input | object | Input matching app schema |
setup | object | Hidden setup configuration |
infra | string | 'cloud' or 'private' |
session | string | Session ID for stateful execution |
session_timeout | number | Idle timeout (1-3600 seconds) |
Keep workers warm across multiple calls:
Use pre-built agents from your workspace:
Create custom agents programmatically:
| Model | App Reference |
|---|---|
| Claude Sonnet 4 | infsh/claude-sonnet-4@latest |
| Claude 3.5 Haiku | infsh/claude-haiku-35@latest |
| GPT-4o | infsh/gpt-4o@latest |
| GPT-4o Mini | infsh/gpt-4o-mini@latest |
For browser apps, proxy through your backend to keep API keys secure:
Full type definitions included: