Skip to content

Call any Apiosk API in under 2 minutes.

Connect through MCP or API. Discover services, review prices and run the work you approve.

Copy-paste integrations

Every example below uses a placeholder FX endpoint. Swap in any endpoint from the catalog at gateway.apiosk.com.

01

Plain fetch (Node / TypeScript)

The lowest-level integration. wrapFetchWithPayment intercepts the 402, signs the payment, and retries automatically.

pay-per-call.tsTypeScript
// pay-per-call.ts
// Run with: npx tsx pay-per-call.ts

import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base } from "viem/chains";
import { wrapFetchWithPayment } from "x402-fetch";

const account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY as `0x${string}`);

const walletClient = createWalletClient({
  account,
  chain: base,
  transport: http(),
});

const fetchWithPayment = wrapFetchWithPayment(fetch, walletClient);

async function main(): Promise<void> {
  const response = await fetchWithPayment(
    "https://gateway.apiosk.com/v1/fx/convert?from=EUR&to=USD&amount=100",
  );

  const data = await response.json();
  console.log(data);
}

main().catch(console.error);
02

Axios (Node / TypeScript)

Same flow, for codebases already on axios.

apiosk-client.tsTypeScript
// apiosk-client.ts

import axios from "axios";
import { privateKeyToAccount } from "viem/accounts";
import { withPaymentInterceptor } from "x402-axios";

const account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY as `0x${string}`);

export const apiosk = withPaymentInterceptor(
  axios.create({ baseURL: "https://gateway.apiosk.com" }),
  account,
);

// Usage anywhere in your app:
// const { data } = await apiosk.get("/v1/email/verify", { params: { email } });
03

Python (httpx)

The same pay-per-call flow for Python services, built on httpx and eth-account.

pay_per_call.pyPython
# pay_per_call.py
# pip install x402-httpx eth-account

import asyncio
import os

import httpx
from eth_account import Account
from x402_httpx import x402HTTPXClient

account = Account.from_key(os.environ["WALLET_PRIVATE_KEY"])


async def main() -> None:
    async with x402HTTPXClient(account=account) as client:
        response = await client.get(
            "https://gateway.apiosk.com/v1/fx/convert",
            params={"from": "EUR", "to": "USD", "amount": 100},
        )
        print(response.json())


asyncio.run(main())
04

Vercel AI SDK tool

Expose an Apiosk endpoint as a tool your model can decide to call.

tools/convert-currency.tsTypeScript
// tools/convert-currency.ts

import { tool } from "ai";
import { z } from "zod";
import { apiosk } from "../apiosk-client"; // the x402-axios client from example 2

export const convertCurrency = tool({
  description:
    "Convert an amount between two currencies using live FX rates. " +
    "Costs a fraction of a cent per call, paid automatically in USDC.",
  parameters: z.object({
    from: z.string().describe("ISO currency code to convert from, e.g. EUR"),
    to: z.string().describe("ISO currency code to convert to, e.g. USD"),
    amount: z.number().positive(),
  }),
  execute: async ({ from, to, amount }) => {
    const { data } = await apiosk.get("/v1/fx/convert", {
      params: { from, to, amount },
    });
    return data;
  },
});
agent.tsTypeScript
// agent.ts

import { generateText } from "ai";
import { anthropic } from "@ai-sdk/anthropic";
import { convertCurrency } from "./tools/convert-currency";

const result = await generateText({
  model: anthropic("claude-opus-5"),
  tools: { convertCurrency },
  prompt: "What is 250 EUR in USD right now?",
});

console.log(result.text);
05

LangChain tool (Python)

Wrap a paid endpoint as a LangChain tool your Python agent can call. Paid per call in USDC via x402. No API key required.

tools/convert_currency.pyPython
# tools/convert_currency.py

import os

import httpx
from eth_account import Account
from langchain_core.tools import tool
from x402_httpx import x402Client

account = Account.from_key(os.environ["WALLET_PRIVATE_KEY"])
client = x402Client(account=account)


@tool
def convert_currency(from_code: str, to_code: str, amount: float) -> dict:
    """Convert an amount between two currencies using live FX rates.

    Paid per call in USDC via x402. No API key required.
    """
    response = client.get(
        "https://gateway.apiosk.com/v1/fx/convert",
        params={"from": from_code, "to": to_code, "amount": amount},
    )
    response.raise_for_status()
    return response.json()
06

MCP (Claude Desktop, Claude Code, Cursor)

One config block gives your assistant the entire Apiosk catalog as tools.

claude_desktop_config.jsonJSON
{
  "mcpServers": {
    "apiosk": {
      "url": "https://mcp.apiosk.com/mcp"
    }
  }
}
Client one-linersShell
# Claude Code
claude mcp add --transport http apiosk https://mcp.apiosk.com/mcp

# Codex
codex mcp add apiosk -- npx -y @apiosk/mcp

# Any ChatGPT-compatible client: add this URL
https://mcp.apiosk.com/mcp

Four ways to wire it up

Pick the surface that fits where your software runs. Same payment flow underneath, whether you reach for raw HTTP, a hosted MCP endpoint, the SDK, or the gateway skill.

Direct HTTP

Gateway API

The raw payment gateway. Handle the 402, attach an x402 proof, retry. Maximum control over headers, retries, and ledger events.

Endpoint
https://gateway.apiosk.com
Gateway docs
ChatGPT + agent clients

Remote MCP

A hosted MCP endpoint for chat-native agents. Add the URL, finish OAuth once, run paid tools from the same session.

Remote URL
https://mcp.apiosk.com/mcp
Open endpoint
@apiosk/sdk

JavaScript SDK

A package for application code that wraps payment execution, typed 402 errors, and retry helpers for Node backends.

Install
npm install @apiosk/sdk
SDK docs
skills.sh

Gateway Skill

An installable skill for coding agents like Claude Code and Codex that need to run paid gateway requests from a shell.

Install
npx skills add Apiosk/openclaw-apiosk --skill apiosk-gateway
Starter kit

Selling rather than buying?

Everything about listing a service, what the provider dashboard does and how the money reaches you is on its own page now.

What you need, and what protects you

A wallet on Base

Fund it with a few USDC and give your client a private key it can sign with. Payments settle on Base.

Node 18+ or Python 3.10+

Every snippet below runs on a current Node or Python runtime. Pick the stack you already ship on.

Price stated before you pay

Each 402 response states the exact price up front. Nothing is charged without your client signing it.

On-chain receipts, spend caps

Every settled call produces an on-chain receipt on Base. Set per-transaction and per-day caps in your wallet mandate so an agent loop can never drain funds.

Questions, or a missing endpoint you want listed? Email hello@apiosk.com.

Good questions.

A few things to know before you start.

How pricing works
What is Apiosk?

Apiosk helps people and AI agents get data from paid APIs. Describe what you need, review the proposed service or research plan and its price, then approve the work. Apiosk handles the calls and returns the available results with their sources.

What is the difference between Answer and Research?

Answer helps with a direct data request, such as a company profile or filed accounts. Research creates a plan for requests that need several steps. It can resolve a company first and use that identity to retrieve its records. The plan shows what it can cover before you approve.

What if my question is unclear or data is missing?

Apiosk asks for context when it needs a company, location, period or other detail. If a provider does not have the requested data, the result should say what is missing. Data availability depends on the source; an API listing does not guarantee that every record exists.

How much does it cost?

The price depends on the services your request needs. Apiosk shows the total, including its service fee, before you approve. You pay per use from your balance, with no subscription required.

See pricing
Do I need to know how APIs work?

No. In the Apiosk app, you ask in ordinary language and approve the price. You do not need a separate API key or account for each provider. Developers can also connect through MCP or API.

Can I use Apiosk inside ChatGPT or Claude?

Yes. Apiosk is available as a connector for ChatGPT and Claude, and through MCP for other agents and tools. Connect once, sign in to Apiosk, and ask your question from there. The price is shown before anything runs and is paid from your Apiosk balance.

Connect an agent
Can my AI agent use Apiosk?

Yes. Connect a compatible agent through MCP or API and authorize its access to your Apiosk account. Spending limits and approval rules control what it can buy.

Connect an agent