HTTP/1.1 402 PAYMENT REQUIRED agent402.base.eth · BASE · SOLANA · POLYGON · ARBITRUM · MONAD · CELO · AVALANCHE · SEI · OPTIMISM · STELLAR · ALGORAND · ROBINHOOD · USDC · USDG
Agent402 / tools / embed-large

Text embeddings (Large)

$0.010 per call · USDC via x402 · POST /api/embed-large

Generate a text embedding vector using OpenAI text-embedding-3-large (3072 dimensions). Higher accuracy than the small model. Ideal for semantic search, RAG, and clustering. No API key needed; pay per call via x402. Text capped at 32k chars.

Input

FieldTypeDescription
text *stringText to embed (max 32,000 chars)

Example output

{
  "model": "text-embedding-3-large",
  "provider": "openai",
  "embedding": [
    0.0023,
    -0.0091,
    0.0152
  ],
  "dimensions": 3072,
  "usage": {
    "total_tokens": 12
  }
}

Try it - see the 402 challenge (free)

curl -i -X POST https://agent402.tools/api/embed-large \
  -H "Content-Type: application/json" \
  -d '{"text":"Agent402 is an open-source x402 tool server."}'

The response is HTTP 402 Payment Required with exact payment requirements. Any x402 v2 client pays automatically and retries:

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/embed-large", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "text": "Agent402 is an open-source x402 tool server."
  }),
});
Wallet-only. This tool reaches the network/browser/storage, so it is paid in USDC via x402 (no proof-of-work tier).

Related tools

LLM inference

$0.010 · POST /api/llm

LLM inference proxy - send an OpenAI-format chat/completions request and get a response from GPT-4o-mini. Supports visio…

LLM inference (Pro)

$0.100 · POST /api/llm-pro

LLM inference proxy (Pro tier) - GPT-4o or GPT-4.1. Supports vision (up to 2 image URLs) and structured output (response…

LLM inference (Premium)

$0.500 · POST /api/llm-premium

LLM inference proxy (Premium tier) - o3 or o3-mini reasoning models. Supports vision (up to 2 image URLs) and structured…