{"uid":"cap_Ab0NTPN2KlgVjPtMm7Kh8","slug":"agent402-tools-text-embeddings-73ed7389","name":"agent402.tools Text Embeddings","description":"OpenAI-compatible text embeddings (text-embedding-3-small by default; 3-large and ada-002 supported), up to 64 inputs or 16k chars per call, returned in the standard OpenAI shape. Identical inputs repeated within 10 minutes are served free from cache. Use it for semantic search, clustering and retrieval from any OpenAI SDK by changing base_url.","url":"https://agent402.tools/v1/embeddings","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"input":{"type":"string","description":"Text to embed - a string or an array of up to 64 strings (16k chars total)"},"model":{"type":"string","description":"Optional - text-embedding-3-small (default), text-embedding-3-large, or text-embedding-ada-002"},"dimensions":{"type":"number","description":"Optional output dimensions (3-small/3-large only)"}}},"responseSchema":{"type":"json","example":{"data":[{"index":0,"object":"embedding","embedding":[0.0023,-0.0091,0.0152]}],"model":"text-embedding-3-small","usage":{"total_tokens":12,"prompt_tokens":12},"object":"list"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_RcLKIMx9GdBGmL-Y0zXMn","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates OpenAI-compatible text embeddings via x402 micropayment, no API key required, supporting up to 64 inputs per batch using text-embedding-3-small, text-embedding-3-large, or text-embedding-ada-002.","exampleAgentPrompt":"Convert these three product descriptions into embeddings so I can use them in a semantic search index: 'wireless noise-cancelling headphones', 'over-ear bluetooth headphones with ANC', 'premium studio monitor headphones' — use the text-embedding-3-small model.","exampleUseCases":null,"resultDescription":"Returns an OpenAI-compatible embeddings response containing one float vector per input string, plus token usage counts. The vectors can be used directly with OpenAI-SDK-compatible downstream tooling for semantic search, clustering, or similarity ranking.","failureModes":["Payment not received or insufficient USDC — returns 402 Payment Required","Input exceeds 64 strings or 16k total characters — returns 400 Bad Request","Unsupported model name specified — returns 400 or model not found error","Network timeout if payload is large","Invalid JSON body — returns 400"],"whenToPreferThis":"Choose this endpoint when you need OpenAI-compatible embeddings without managing API keys or subscriptions, especially in autonomous agent contexts that support x402 micropayments. Ideal for pay-per-use pipelines, RAG systems, or prototyping where you want drop-in OpenAI SDK compatibility and batch embedding of up to 64 strings per call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:58:16.970Z","isFirstParty":false}