{"uid":"cap_FFzeGGN3RK0LPYgC_P9IN","slug":"x402engine-text-embeddings-api-b3ae60a5","name":"x402engine Text Embeddings API","description":"Generate text embeddings using OpenAI text-embedding-3-small — for semantic search, clustering, RAG","url":"https://x402engine.app/api/embeddings","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","bodyType","body","method"],"properties":{"body":{"type":"object","anyOf":[{"required":["text"]},{"required":["texts"]}],"properties":{"text":{"type":"string","example":"hello world","description":"Single text to embed"},"texts":{"type":"array","items":{"type":"string","example":"hello"},"example":["hello","world"],"maxItems":100,"minItems":1,"description":"Array of texts to embed (1-100)"}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_OYhOETXNymoOUdo9ZT3jX","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates text embeddings using OpenAI text-embedding-3-small for semantic search, clustering, and RAG pipelines, paid per-call via x402 micropayments","exampleAgentPrompt":"Turn this paragraph into a text embedding vector so I can store it in my vector database for semantic search: 'The quick brown fox jumps over the lazy dog.'","exampleUseCases":[{"title":"RAG pipeline document ingestion","prompt":"I'm building a RAG system — embed this chunk of text so I can store it in Pinecone and retrieve it later: 'Retrieval-augmented generation combines a retrieval step with a language model to answer questions grounded in a knowledge base.'"},{"title":"Semantic similarity clustering","prompt":"I have a list of customer feedback snippets and I want to cluster them by topic — can you generate embeddings for this sentence so I can group it with similar ones: 'The onboarding process was confusing and took too long.'"},{"title":"Semantic search query vectorization","prompt":"I need to embed this user search query so I can run a nearest-neighbor lookup against my vector store: 'best lightweight laptops for college students.'"}],"resultDescription":"A float array (dense vector) representing the semantic content of the input text, produced by OpenAI's text-embedding-3-small model. The vector can be stored in a vector database and used for cosine similarity, nearest-neighbor search, clustering, or as input to a RAG retrieval pipeline.","failureModes":["Empty or missing input text returns a 400 error","Text exceeding model token limit (8191 tokens) may be truncated or rejected","Payment failure or insufficient USDC balance returns HTTP 402","Service unavailability from upstream OpenAI API causes 503","Malformed request body returns 422 validation error"],"whenToPreferThis":"Choose this endpoint when you need pay-per-call text embeddings without managing an OpenAI API key or subscription — ideal for AI agents operating autonomously with x402 micropayment wallets. It's a good fit for RAG pipelines, semantic search indexing, and clustering tasks where you want on-demand embedding generation billed at $0.001 USDC per call with no upfront commitment.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:42:54.173Z","isFirstParty":false}