# 2s Document Store — Put (Index Document)

> 2s Document Store — Put (Index Document) is a paid API for AI agents from 2s.io, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Store and full-text index a text document within a named namespace, with optional metadata and secret redaction, for later retrieval via search.

## Facts

- Endpoint: POST https://2s.io/api/store/doc-put
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-document-store-put-index-document-f4c91cbc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7Ud79RQbREgj6wYJCFCe7

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 2s-document-store-put-index-document-f4c91cbc -d '<json body>'
```

Example prompt: Index this article under namespace 'research-notes' with id 'climate-2024-01': 'Global temperatures in 2024 continued to break records across all continents...' — tag it with metadata {"title":"Climate 2024","tags":["climate","research"]} and strip any secrets before storing.

## When to prefer this

Use this endpoint when you need to persist and make searchable a text document within a named namespace, especially within the 2s.io ecosystem where sibling search endpoints can later retrieve it. Prefer this over generic object storage when full-text search retrieval is required. Particularly useful for agent memory, knowledge base construction, or document indexing workflows where pay-per-call economics are preferred over subscription storage services.

## Known failure modes

- Body exceeds 1 MB limit — request rejected
- Document id exceeds 256 characters — validation error
- Missing required body field — 400 error
- Namespace not specified — document may be placed in default or rejected
- Payment failure via x402 — call not executed

## How this service works

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.

## Output

A confirmation that the document has been stored and indexed in the specified namespace under the given id, ready to be retrieved via subsequent search queries.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "id": {
   "type": "string",
   "description": "Document id within the namespace, up to 256 chars."
  },
  "ns": {
   "type": "string",
   "description": "Namespace to group documents."
  },
  "body": {
   "type": "string",
   "minLength": 1,
   "description": "The text to index, up to 1 MB."
  },
  "meta": {
   "description": "Optional JSON metadata returned with search hits (not indexed). e.g. {\"title\":\"notes\",\"tags\":[\"x\"]}."
  },
  "redact": {
   "type": "boolean",
   "description": "When true, strip secrets from body before storing (deja-vu-style index-time redaction). Default false."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-document-store-put-index-document-f4c91cbc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
