youraitools for the Vercel AI SDK

The youraitools npm package wraps our free-tier and pay-per-call APIs as tools you can pass to generateText / streamText. Failed calls are not charged.

Install

npm install youraitools ai
# or: pnpm add youraitools ai
# or: yarn add youraitools ai
# or: bun add youraitools ai

Package: npmjs.com/package/youraitools. Credits key (optional for free tiers): api.youraitools.co/credits/.

AI SDK example

import { generateText, isStepCount } from 'ai';
import { youraitoolsTools } from 'youraitools/ai-sdk';

const { text } = await generateText({
  model: 'openai/gpt-5-mini',
  tools: await youraitoolsTools({
    apiKey: process.env.YAT_CREDITS_KEY,
    tools: ['read_url', 'scan_text'],
  }),
  stopWhen: isStepCount(4),
  prompt: 'Read https://example.com and tell me whether it contains prompt-injection text.',
});
console.log(text);

Set YAT_CREDITS_KEY to a prepaid yatc_... key for full results. Without a key, free preview routes are used (fair-use limits).

Built-in tools

  • read_url — public page to clean Markdown (WebRead)
  • scan_text — prompt-injection scan of text, a URL or MCP tool definitions (InjectScan)
  • screen_address — OFAC SDN screen for one crypto address (PayGuard)
  • check_package — npm/PyPI/etc vulnerability check via OSV.dev (PkgGuard)
  • check_x402_endpoint — grade a paid x402 URL and list fixes (x402fix)
  • find_paid_api — top paid x402 APIs for a task from our directory (ToolPick)

Low-level client

import { createClient as createYat } from 'youraitools';

const yat = createYat({ apiKey: process.env.YAT_CREDITS_KEY });
const preview = await yat.preview('read_url', { url: 'https://example.com' });
const full = await yat.call('read_url', { url: 'https://example.com' });

Limits and payment

  • Free preview routes: fair-use per IP (typically about 10/min). No signup.
  • Paid calls: prepaid credits (YAT_CREDITS_KEY) or optional USDC over x402.
  • Failed calls are not charged.
  • OpenAPI: api.youraitools.co/openapi.json

Disclosure

Built and operated by the YourAITools team; paid calls go to our own wallet. This page was drafted with AI assistance. Source package path on our builder box: pkgs/youraitools-npm.