Sign In

@apiosk/sdk

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apiosk/sdk

Official JavaScript SDK for the Apiosk gateway

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

Apiosk JavaScript SDK

Official JavaScript SDK for discovering and executing Apiosk APIs.

Install

After publishing to npm:

npm install @apiosk/sdk

Before publishing, install directly from this repo checkout:

npm install ./subs/sdk-js

Quick start

import { ApioskClient } from "@apiosk/sdk";

const client = new ApioskClient();

const catalog = await client.listApis({ search: "diff", limit: 5 });
const metadata = await client.getMetadata("agent-json-diff");

const result = await client.execute("agent-json-diff", {
  before: { ok: true },
  after: { ok: false }
});

console.log(catalog.meta.total);
console.log(metadata.execute.default_operation);
console.log(result.result);

Auto-pay with x402

If you provide a Base wallet private key, the SDK retries 402 Payment Required responses automatically by using Coinbase's x402 client packages.

import { ApioskClient } from "@apiosk/sdk";

const client = new ApioskClient({
  privateKey: process.env.APIOSK_PRIVATE_KEY
});

const response = await client.execute("agent-json-diff", {
  before: { ok: true },
  after: { ok: false }
});

Alternative auth modes

For dashboard-managed access, you can send a connect token or explicit auth header:

const client = new ApioskClient({
  connectToken: process.env.APIOSK_CONNECT_TOKEN
});
const client = new ApioskClient({
  authorization: `Bearer ${process.env.APIOSK_BEARER_TOKEN}`
});

API surface

  • listApis(params)
  • getApi(slug)
  • getMetadata(slug)
  • execute(slug, input, options)
  • executeOperation(slug, operation, input, options)
  • passthrough(slug, path, options)

Errors

  • ApioskHttpError
  • ApioskPaymentRequiredError

The payment-required error includes the parsed 402 body so callers can inspect the accepted payment rails and attach their own proof if they are not using the built-in EVM flow.

Keywords

apiosk

FAQs

Package last updated on 02 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts