{"uid":"cap_XbtI_XM5Egs4EL_nXrGWc","slug":"perplexity-context-embeddings-via-locus-x402-4f4662b4","name":"Perplexity Context Embeddings via Locus x402","description":"AI-powered search — Sonar chat with real-time web grounding, web search, and embeddings.","url":"https://perplexity.x402.paywithlocus.com/perplexity/context-embed","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string"},"chunks":{"type":"array","items":{"type":"string"}},"document":{"type":"string"}}},"responseSchema":{"type":"json","example":{"data":{},"payment":{"scheme":"exact","settledUsdc":"0.001000","authorizedMaxUsdc":"0.001000"},"request":{"id":"00000000-0000-4000-8000-000000000000","statusUrl":"/requests/00000000-0000-4000-8000-000000000000"},"success":true}},"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_6LfaT_sND33DMHQUmLC9E","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":"Generates context-aware embeddings for text chunks using a shared parent document as grounding context, via Perplexity's contextualized embedding models.","exampleAgentPrompt":"Use Perplexity's context embedding model 'pplx-embed-context-v1-4b' to embed these three paragraph chunks from my research paper, using the full paper text as the shared document context so the embeddings capture the whole document's meaning.","exampleUseCases":[{"title":"RAG pipeline for legal documents","prompt":"I have a long contract document and I've split it into 20 sentence chunks — embed all those chunks using the 'pplx-embed-context-v1-4b' model with the full contract as context, so I can build a retrieval system that understands each clause in the context of the whole agreement."},{"title":"Semantic search over product manual","prompt":"Take these 50 sections I've extracted from our product manual and generate context-aware embeddings for each one using 'pplx-embed-context-v1-0.6b', with the entire manual text provided as the parent document so the embeddings reflect each section's role in the bigger picture."},{"title":"Academic paper chunk retrieval","prompt":"I need to embed 15 paragraph chunks from this academic paper using Perplexity's contextualized embedding model — use the 4B model and pass in the full paper as the document context so each chunk embedding reflects its meaning within the whole paper."}],"resultDescription":"Returns a JSON object with an embedding data payload (vectors for each chunk), a payment confirmation showing 0.001 USDC settled, and a request ID with a status URL for tracking the request.","failureModes":["Invalid model name returns an error — only 'pplx-embed-context-v1-0.6b' and 'pplx-embed-context-v1-4b' are valid","Empty or malformed chunks array may result in empty embeddings or a 400 error","Payment failure or insufficient USDC balance will block the request","Excessively long document or chunk arrays may exceed token limits","Missing required fields (model, chunks, or document) will cause a request error"],"whenToPreferThis":"Choose this endpoint when you need embeddings that are grounded in a shared parent document context — ideal for RAG pipelines where chunk meaning depends heavily on surrounding content. Prefer it over standard embedding APIs when document-level context significantly affects the semantics of individual chunks, such as legal documents, academic papers, or technical manuals. The pay-per-call x402 model makes it accessible without subscription commitments.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:38:09.925Z","isFirstParty":false}