-
Notifications
You must be signed in to change notification settings - Fork 4
Embeddings
Looking for the OpenAI wire path?
POST /v1/embeddings($0.002) speaks the standard OpenAI embeddings format — batch up to 64 inputs / 16k chars per request,dimensionsandencoding_formatpass through, and byte-identical repeats within 10 minutes are served free automatically (embeddings are deterministic; opt out withcache: false). See LLM Gateway (OpenAI /v1). The/api/embed*tools below remain available as the simpler custom-JSON shape.
Two tiers of text embedding generation, paywalled via x402. Send text, get back a vector for semantic search, RAG, clustering, or similarity. The operator's OPENAI_API_KEY handles upstream auth.
| Endpoint | Price | Model | Dimensions | Text cap |
|---|---|---|---|---|
POST /api/embed |
$0.005 | text-embedding-3-small |
1,536 | 32,000 chars |
POST /api/embed-large |
$0.01 | text-embedding-3-large |
3,072 | 32,000 chars |
Both tiers are wallet-only — every call burns real upstream embedding credit. See Security Model.
// Request
{ "text": "Agent402 is an open-source x402 tool server." }
// Response
{ "model": "text-embedding-3-small", "provider": "openai",
"embedding": [0.0023, -0.0091, 0.0152, ...],
"dimensions": 1536,
"usage": { "total_tokens": 12 } }- embed ($0.005) — good enough for most RAG, search, and clustering. 1,536 dimensions.
- embed-large ($0.01) — higher accuracy for precision-critical applications. 3,072 dimensions.
- LLM Proxy Gateway — text inference
- Paying with x402 — the USDC payment flow
agent402.tools · synced from wiki/ in the main repo — edit there, not here.
Using it (for agents / buyers)
- Getting Started
- Paying with x402
- Robinhood Chain (USDG)
- Paying with Compute
- MCP Connector
- Adapters
- AWS Bedrock AgentCore
- Tool Catalog
- Skill Packs
- x402 Index and Router
- x402 Leaderboard
- LLM Gateway (OpenAI /v1)
- LLM Proxy Gateway
- Image Generation Gateway
- Code Execution Sandbox
- Text-to-Speech
- Speech-to-Text
- Text Embeddings
- Payments and x402
- Memory and Coordination
Tollbooth (for site owners)
- Pay-per-crawl — what it is, install, modes
- Pay-per-crawl Walkthrough — 5-min hands-on
- Tollbooth for Agencies — many-site playbook
- Try Tollbooth Cloud (managed)
Website & Developer
- Quickstart — first call in 60 seconds
- Playground — try tools in your browser
- SDK REPL — live code editor
- API Explorer — browse OpenAPI
- Adapter Docs — per-framework guides
- Workflows — chaining patterns
- Blog · Changelog
Under the hood