{"uid":"cap_vEauOLZ_EnzYrVMwN27vU","slug":"perplexity-context-embed-f649ca4d","name":"Perplexity Context Embed","description":"Generate document-aware embeddings where chunks share context from a parent document. Better for RAG over chunked documents.","url":"https://perplexity.mpp.paywithlocus.com/perplexity/context-embed?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["model","document","chunks"],"properties":{"model":{"type":"string","description":"Contextualized model: 'pplx-embed-context-v1-0.6b' or 'pplx-embed-context-v1-4b'"},"chunks":{"type":"array","items":{"type":"string"},"description":"Array of text chunks from the document to embed"},"document":{"type":"string","description":"The full parent document text providing shared context"}},"additionalProperties":true},"responseSchema":null,"example":{"request":{"model":"pplx-embed-context-v1-4b","chunks":["Artificial intelligence has revolutionized many industries.","Machine learning models can now process vast amounts of data and identify patterns.","Natural language processing enables computers to understand and generate human language."],"document":"JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvUmVzb3VyY2VzIDw8IC9Gb250IDw8IC9GMSA0IDAgUiA+PiA+PiAvTWVkaWFCb3ggWzAgMCA2MTIgNzkyXSAvQ29udGVudHMgNSAwIFIgPj4KZW5kb2JqCjQgMCBvYmoKPDwgL1R5cGUgL0ZvbnQgL1N1YnR5cGUgL1R5cGUxIC9CYXNlRm9udCAvSGVsdmV0aWNhID4+CmVuZG9iago1IDAgb2JqCjw8IC9MZW5ndGggNTkgPj4Kc3RyZWFtCkJUIC9GMSAxMiBUZiA1MCA3NTAgVGQgKFFBIGZpeHR1cmUgUERGIC0gTG9yZW0gaXBzdW0pIFRqIEVUCmVuZHN0cmVhbQplbmRvYmoKeHJlZgowIDYKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwNTggMDAwMDAgbiAKMDAwMDAwMDExNSAwMDAwMCBuIAowMDAwMDAwMjQxIDAwMDAwIG4gCjAwMDAwMDAzMTEgMDAwMDAgbiAKdHJhaWxlcgo8PCAvU2l6ZSA2IC9Sb290IDEgMCBSID4+CnN0YXJ0eHJlZgo0MjAKJSVFT0YK"},"response":{"_truncated":true,"_originalSize":21103}},"exampleRequest":{"model":"pplx-embed-context-v1-4b","chunks":["Artificial intelligence has revolutionized many industries.","Machine learning models can now process vast amounts of data and identify patterns.","Natural language processing enables computers to understand and generate human language."],"document":"JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvUmVzb3VyY2VzIDw8IC9Gb250IDw8IC9GMSA0IDAgUiA+PiA+PiAvTWVkaWFCb3ggWzAgMCA2MTIgNzkyXSAvQ29udGVudHMgNSAwIFIgPj4KZW5kb2JqCjQgMCBvYmoKPDwgL1R5cGUgL0ZvbnQgL1N1YnR5cGUgL1R5cGUxIC9CYXNlRm9udCAvSGVsdmV0aWNhID4+CmVuZG9iago1IDAgb2JqCjw8IC9MZW5ndGggNTkgPj4Kc3RyZWFtCkJUIC9GMSAxMiBUZiA1MCA3NTAgVGQgKFFBIGZpeHR1cmUgUERGIC0gTG9yZW0gaXBzdW0pIFRqIEVUCmVuZHN0cmVhbQplbmRvYmoKeHJlZgowIDYKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwNTggMDAwMDAgbiAKMDAwMDAwMDExNSAwMDAwMCBuIAowMDAwMDAwMjQxIDAwMDAwIG4gCjAwMDAwMDAzMTEgMDAwMDAgbiAKdHJhaWxlcgo8PCAvU2l6ZSA2IC9Sb290IDEgMCBSID4+CnN0YXJ0eHJlZgo0MjAKJSVFT0YK"},"tags":["search","ai-search","web-grounding","sonar","ai"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":true,"priceHint":"~$0.001","priceStatus":"priced","priceSource":"settled","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":"dynamic","summary":"~$0.001 (dynamic)","primary":{"kind":"dynamic","protocol":"mpp","network":"tempo","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"dynamic","protocol":"mpp","network":"tempo","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_o5bwOb0nKpimhUg7PZ5iK","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":"Perplexity","brandSlug":"perplexity","brandBaseUrl":"https://perplexity.ai","brandDocsUrl":"https://docs.perplexity.ai","whatItDoes":"Generates contextualized embeddings for text chunks using the full parent document as shared context, via Perplexity's pplx-embed-context models","exampleAgentPrompt":"Using Perplexity's pplx-embed-context-v1-4b model, generate contextualized embeddings for these three chunks from my research paper — 'Abstract: This study examines...', 'Results: We observed a 40% improvement...', 'Conclusion: These findings suggest...' — with the full paper text as the shared parent document so each chunk embedding understands the broader context.","exampleUseCases":null,"resultDescription":"Returns contextualized embedding vectors for each provided text chunk, where each vector is informed by the full parent document context rather than being computed in isolation, enabling more semantically accurate representations for downstream retrieval or similarity tasks.","failureModes":["Invalid model name (must be 'pplx-embed-context-v1-0.6b' or 'pplx-embed-context-v1-4b') returns validation error","Missing required fields (model, document, or chunks) returns 400 error","Document or chunks text exceeding token limits returns context length error","Malformed chunks array returns parsing error","Payment failure or insufficient USDC balance blocks request","Rate limiting or quota exceeded returns 429 error"],"whenToPreferThis":"Prefer this endpoint over standard embedding APIs when chunks belong to a shared parent document and contextual coherence matters — e.g. for RAG pipelines, long-document semantic search, or retrieval tasks where a chunk's meaning depends on surrounding content. The context-aware model produces embeddings that reflect the full document's semantics, reducing ambiguity in isolated passages. Choose the 4b model for higher quality and 0.6b for faster/cheaper throughput.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-09T18:41:36.236Z","isFirstParty":false,"canonicalSlug":"perplexity-context-embed-f649ca4d"}