{"uid":"cap_i7KpI2WRkQVafRDMCiqHh","slug":"fastapi-online-text-embeddings-63bc8a8b","name":"fastapi.online Text Embeddings","description":"Self-hosted AI API gateway. Expensive endpoints require an x402 micropayment (USDC on Base) before executing.","url":"https://api.fastapi.online/embeddings","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["input"],"properties":{"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"model":{"type":"string"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"count":1,"model":"nomic-embed-text","embeddings":[[0.012,-0.034]]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.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_W7y-2nNc4-afzV740d0M-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a text string into a dense vector embedding using a configurable model, returned as an array of floats","exampleAgentPrompt":"Embed this text using fastapi.online so I can store it in my vector database: 'The quick brown fox jumps over the lazy dog'","exampleUseCases":[{"title":"Semantic search index builder","prompt":"Take these product descriptions and convert each one to a vector embedding so I can build a semantic search index — use the default model on fastapi.online."},{"title":"RAG document chunking pipeline","prompt":"I'm building a retrieval-augmented generation pipeline. Embed this document chunk for me: 'Quarterly revenue grew 12% year-over-year driven by enterprise subscriptions.'"},{"title":"Duplicate review detection","prompt":"Generate an embedding for this customer review so I can compare it against existing reviews for similarity: 'Battery life is terrible, barely lasts half a day.'"}],"resultDescription":"Returns a JSON object containing an array of embedding vectors (each a list of floats), the model name used, and a token count indicating how many tokens were processed","failureModes":["Missing required 'input' field returns a 422 validation error","Invalid or unsupported model name may return an error or fall back to default model","Payment not included or insufficient USDC results in 402 Payment Required response","Very long input strings may exceed model token limits","Network timeouts on the self-hosted infrastructure during high load"],"whenToPreferThis":"Choose this endpoint when you need pay-per-call text embeddings with no signup or subscription — ideal for sporadic or low-volume embedding needs, or when you want to pay with crypto (USDC) rather than a monthly API key. Prefer established providers like OpenAI or Cohere for high-volume production workloads with SLA guarantees.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T07:03:36.514Z","isFirstParty":false}