# Agent Memory API – Fetch Memory by Key

> Agent Memory API – Fetch Memory by Key is a paid API for AI agents from agent-memory-api-production-f2c4.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Retrieve a single stored memory record by namespace and key, returning the JSON memory object or 404 if not found.

## Facts

- Endpoint: GET https://agent-memory-api-production-f2c4.up.railway.app/v1/memories/bazaar-seed/hello
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-memory-api-fetch-memory-by-key-9cdf9757
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fw5QM4OSoF7QqnhqhVz-M

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 agent-memory-api-fetch-memory-by-key-9cdf9757
```

Example prompt: Can you fetch the memory stored under the key 'hello' in the 'bazaar-seed' namespace so I can see what value was saved there?

## When to prefer this

Use this endpoint when you need to retrieve a single, specific memory record by its exact namespace and key rather than listing all memories. Prefer this over the list endpoint when you already know the key and want a direct point lookup with minimal overhead. Ideal for agent workflows that previously stored a value and need to recall it in a subsequent step.

## Known failure modes

- 404 Not Found – the specified key does not exist in the given namespace
- Invalid namespace or key format causing a 400 error
- Service unavailable or Railway deployment down (5xx)
- Payment failure via x402 preventing the request from being fulfilled
- Expired TTL causing the record to no longer be present

## How this service works

Fetch a single stored memory by namespace and key. Returns the memory record as JSON (404 if not found).

## Output

A JSON object containing the full memory record for the requested namespace and key, including the stored value and any associated metadata such as TTL and timestamps. Returns HTTP 404 if the key does not exist in the given namespace.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-memory-api-fetch-memory-by-key-9cdf9757/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-memory-api-production-f2c4.up.railway.app](https://www.zero.xyz/host/agent-memory-api-production-f2c4.up.railway.app/llms.txt)
