{"uid":"cap_w6abvkdEFq4RO8MCTrdV8","slug":"memoryapi-document-upload-50bedf1c","name":"MemoryAPI Document Upload","description":"x402-powered APIs for AI agents: persistent semantic memory, document search, and translation. Pay per query in USDC on Base mainnet. MCP compatible.","url":"https://api.memoryapi.org/x402/docs/upload","method":"POST","headers":{},"bodySchema":{"properties":{"input":{"required":["method"],"properties":{"method":{"enum":["POST"],"type":"string"}}}}},"responseSchema":{"example":{"success":true,"document":{"id":"uuid","filename":"contract.pdf","chunk_count":12}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_XI4BPxtcI_nk15JLj7MUm","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Uploads a document (e.g. PDF) to MemoryAPI for persistent semantic storage and later searchable retrieval, returning a document ID and chunk count.","exampleAgentPrompt":"Upload this contract PDF called 'contract.pdf' to MemoryAPI so I can search it semantically later — store it in my persistent memory index.","exampleUseCases":[{"title":"Contract library for legal agent","prompt":"I need to upload a folder of client contracts to MemoryAPI so my agent can search through them semantically when reviewing new agreements. Can you store all these PDFs in persistent memory and give me the document IDs?"},{"title":"Knowledge base ingestion for chatbot","prompt":"Add these product documentation files to my MemoryAPI index so the chatbot can retrieve relevant sections when customers ask questions. I want semantic search across all the docs."},{"title":"RAG pipeline for research assistant","prompt":"Upload these research papers and whitepapers to MemoryAPI so my agent can build a searchable knowledge base. I'll be querying them semantically throughout the week."}],"resultDescription":"Returns a JSON object confirming success, the assigned document UUID, the original filename, and the number of semantic chunks the document was split into (e.g. {success: true, document: {id: 'uuid', filename: 'contract.pdf', chunk_count: 12}}).","failureModes":["Invalid or unsupported file format — upload rejected","File too large — chunking or size limit exceeded","Payment failure — insufficient USDC balance or x402 payment not accepted","Malformed request body — missing file or filename field","Network timeout during upload of large document","Authentication or payment header missing, resulting in 402 Payment Required"],"whenToPreferThis":"Use this endpoint when an AI agent needs to persist a document into MemoryAPI's semantic index so it can be searched or retrieved later via natural language queries. Prefer this over generic file storage when the goal is downstream semantic search or RAG-style retrieval within the MemoryAPI ecosystem. Best for agents that pay per query in USDC on Base mainnet via the x402 protocol and need MCP-compatible persistent memory.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:35:40.520Z","isFirstParty":false}