{"uid":"cap_2RWmB3qqOk95LJfoUcqLG","slug":"2s-vector-store-upsert-0f0bb2b4","name":"2s Vector Store Upsert","description":"The (most) everything API: 575+ pay-per-call endpoints for AI agents — ground-truth data, a full AI gateway, and agent infrastructure (storage, queues, watchers). USDC via x402, no signup, no API keys, and upto billing: pay actual usage, not the quote.","url":"https://2s.io/api/store/vector-upsert","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"id":{"type":"string","description":"Vector id within the namespace, up to 256 chars."},"ns":{"type":"string","description":"Namespace (an index) to group vectors. Vectors in a namespace should share dimensionality."},"body":{"type":"string","description":"Optional source text returned with query hits (e.g. the chunk this vector embeds)."},"meta":{"description":"Optional JSON metadata returned with query hits. e.g. {\"docId\":\"d1\",\"page\":3}."},"embedding":{"type":"array","items":{"type":"number"},"description":"The embedding as a float array (your model's output). 1-4096 dims."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0125","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.0125/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0125","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0125","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_lzmzaqVp46riU3GedIVcO","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0125","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Upserts (inserts or updates) a vector embedding with optional text body and metadata into a named namespace for later similarity search.","exampleAgentPrompt":"Store this 1536-dimensional embedding in my 'docs-index' namespace under the id 'chunk-42', with source text 'Climate change affects global weather patterns.' and metadata {\"docId\":\"report-7\",\"page\":3}.","exampleUseCases":null,"resultDescription":"Returns a JSON object confirming success (ok: true), an array of upserted vector items each with their id, dimensionality, byte size, and expiration timestamp, a total count, and source provenance info (provider, url, license).","failureModes":["Embedding array exceeds 4096 dimensions — rejected with validation error","Embedding array is empty or missing — rejected","Namespace or id exceeds length limits — rejected","Dimensionality mismatch within namespace — rejected","Payment not provided or insufficient USDC — 402 response","Malformed JSON metadata — rejected"],"whenToPreferThis":"Choose this endpoint when you need a pay-per-call, no-signup vector store that accepts raw float embeddings from any model (up to 4096 dims), supports named namespaces, and allows attaching source text and arbitrary JSON metadata to each vector. Ideal for agents that already generate their own embeddings and need lightweight, keyless vector persistence without provisioning a dedicated vector database.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:02:40.444Z","isFirstParty":false}