{
  "openapi": "3.1.0",
  "info": {
    "title": "Mnemos: memory for AI agents",
    "version": "1.0.0",
    "description": "A private, long-term memory you rent: store facts, preferences, decisions, instructions and events; search them; get a ready-made context block for a task. Bi-temporal: every memory knows when it was true (valid_from, valid_to) and when it was recorded or superseded, so you can ask what you knew at any moment. Corrections supersede; nothing is silently overwritten. A librarian flags duplicates, conflicting facts and stale ones.\n\nPrices in credits (1 credit = 0.001 USDC): remember 3, recall 3, supersede 3, history 3, context 5, digest 20. A new trial space gets 100 credits.",
    "contact": {
      "email": "support@virohanalife.com"
    },
    "termsOfService": "https://mnemos.uk/terms"
  },
  "servers": [
    {
      "url": "https://mnemos.uk"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "The space key (mk_...), shown once when the space opens."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "PaymentRequired": {
        "type": "object",
        "properties": {
          "x402Version": {
            "type": "integer"
          },
          "error": {
            "type": "string"
          },
          "resource": {
            "type": "object"
          },
          "accepts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "MemoryInput": {
        "type": "object",
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 8000
          },
          "kind": {
            "type": "string",
            "enum": [
              "fact",
              "event",
              "preference",
              "decision",
              "instruction",
              "note",
              "summary"
            ],
            "default": "fact"
          },
          "subject": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 16
          },
          "source": {
            "type": "string"
          },
          "confidence": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "importance": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "valid_from": {
            "type": "string",
            "format": "date-time"
          },
          "valid_to": {
            "type": "string",
            "format": "date-time"
          },
          "supersedes": {
            "type": "string"
          },
          "replace_subject": {
            "type": "boolean"
          }
        }
      },
      "Memory": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "subject": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "confidence": {
            "type": [
              "number",
              "null"
            ]
          },
          "importance": {
            "type": [
              "number",
              "null"
            ]
          },
          "valid_from": {
            "type": [
              "string",
              "null"
            ]
          },
          "valid_to": {
            "type": [
              "string",
              "null"
            ]
          },
          "recorded_at": {
            "type": "string"
          },
          "superseded_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "superseded_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "supersedes": {
            "type": [
              "string",
              "null"
            ]
          },
          "current": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "current",
              "history",
              "future",
              "superseded"
            ]
          },
          "score": {
            "type": "number"
          }
        }
      },
      "RecallInput": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "tag": {
            "type": "string"
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "valid_at": {
            "type": "string",
            "format": "date-time"
          },
          "include_history": {
            "type": "boolean"
          },
          "include_superseded": {
            "type": "boolean"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50
          }
        }
      }
    }
  },
  "paths": {
    "/v1": {
      "get": {
        "operationId": "index",
        "summary": "What this service is, endpoints, prices",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/spaces": {
      "post": {
        "operationId": "openSpace",
        "summary": "Open a space: free trial, or paid with ?usd= (x402)",
        "parameters": [
          {
            "name": "usd",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "enum": [
                1,
                5,
                20,
                100
              ]
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Opened. The key is shown once.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "space_id": {
                      "type": "string"
                    },
                    "key": {
                      "type": "string"
                    },
                    "credits": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402). The PAYMENT-REQUIRED header carries the requirements; pay and repeat the request with PAYMENT-SIGNATURE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/spaces/me": {
      "get": {
        "operationId": "getSpace",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "This space",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "closeSpace",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Close the space and delete every memory",
        "parameters": [
          {
            "name": "confirm",
            "in": "query",
            "required": true,
            "schema": {
              "const": "close"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/memories": {
      "post": {
        "operationId": "remember",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Remember (3 credits each; duplicates free)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/MemoryInput"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "memories": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/MemoryInput"
                        },
                        "maxItems": 20
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402). The PAYMENT-REQUIRED header carries the requirements; pay and repeat the request with PAYMENT-SIGNATURE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listOrSearch",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Search with query parameters (3 credits)",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subject",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "as_of",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "valid_at",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_history",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_superseded",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Memory"
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402). The PAYMENT-REQUIRED header carries the requirements; pay and repeat the request with PAYMENT-SIGNATURE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          }
        }
      }
    },
    "/v1/recall": {
      "post": {
        "operationId": "recall",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Search (3 credits)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecallInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Memory"
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402). The PAYMENT-REQUIRED header carries the requirements; pay and repeat the request with PAYMENT-SIGNATURE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          }
        }
      }
    },
    "/v1/memories/{id}": {
      "get": {
        "operationId": "getMemory",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "One memory",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "forget",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Forget for good",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chain",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/memories/{id}/supersede": {
      "post": {
        "operationId": "supersede",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Store a corrected version (3 credits)",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemoryInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402). The PAYMENT-REQUIRED header carries the requirements; pay and repeat the request with PAYMENT-SIGNATURE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/memories/{id}/history": {
      "get": {
        "operationId": "history",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Every version (3 credits)",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402). The PAYMENT-REQUIRED header carries the requirements; pay and repeat the request with PAYMENT-SIGNATURE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          }
        }
      }
    },
    "/v1/context": {
      "post": {
        "operationId": "context",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Context block for a task (5 credits)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "task"
                ],
                "properties": {
                  "task": {
                    "type": "string"
                  },
                  "budget_tokens": {
                    "type": "integer",
                    "minimum": 200,
                    "maximum": 8000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "context": {
                      "type": "string"
                    },
                    "ids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402). The PAYMENT-REQUIRED header carries the requirements; pay and repeat the request with PAYMENT-SIGNATURE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          }
        }
      }
    },
    "/v1/digest": {
      "get": {
        "operationId": "digest",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "The librarian's report (20 credits)",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402). The PAYMENT-REQUIRED header carries the requirements; pay and repeat the request with PAYMENT-SIGNATURE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          }
        }
      }
    },
    "/v1/export": {
      "get": {
        "operationId": "export",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Every memory and version as NDJSON",
        "responses": {
          "200": {
            "description": "NDJSON",
            "content": {
              "application/x-ndjson": {}
            }
          }
        }
      }
    },
    "/v1/credits": {
      "get": {
        "operationId": "credits",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Credits and prices",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/credits/topup": {
      "post": {
        "operationId": "topup",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Top up with x402",
        "parameters": [
          {
            "name": "usd",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "enum": [
                1,
                5,
                20,
                100
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402). The PAYMENT-REQUIRED header carries the requirements; pay and repeat the request with PAYMENT-SIGNATURE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          }
        }
      }
    },
    "/v1/credits/quote": {
      "post": {
        "operationId": "quote",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Reserve an exact USDC amount for a direct transfer",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "usd"
                ],
                "properties": {
                  "usd": {
                    "type": "number",
                    "enum": [
                      1,
                      5,
                      20,
                      100
                    ]
                  },
                  "network": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/credits/claim": {
      "post": {
        "operationId": "claim",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Credit a direct transfer",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tx_hash"
                ],
                "properties": {
                  "tx_hash": {
                    "type": "string"
                  },
                  "network": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/graveyard": {
      "get": {
        "operationId": "graveyardAbout",
        "summary": "Strategy Graveyard: about, coverage, prices (free)",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Too many calls (per network or per space); see retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/graveyard/stats": {
      "get": {
        "operationId": "graveyardStats",
        "summary": "Coverage, counts, held back and why (free)",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Too many calls (per network or per space); see retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/graveyard/check": {
      "post": {
        "operationId": "graveyardCheck",
        "security": [
          {
            "bearer": []
          },
          {}
        ],
        "summary": "Has this trading idea been tried? (5 credits, 2 when it names a market the graveyard does not cover; without a key, one x402 payment)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "idea"
                ],
                "properties": {
                  "idea": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "market": {
                    "type": "string"
                  },
                  "asset_class": {
                    "type": "string"
                  },
                  "mechanism": {
                    "type": "string"
                  },
                  "timeframe": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tried_before": {
                      "type": "string",
                      "enum": [
                        "yes",
                        "similar",
                        "no record"
                      ]
                    },
                    "summary": {
                      "type": "string"
                    },
                    "families": {
                      "type": "array"
                    },
                    "closest": {
                      "type": "array"
                    },
                    "caveat": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string"
                    },
                    "cite_as": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402). The PAYMENT-REQUIRED header carries the requirements; pay and repeat the request with PAYMENT-SIGNATURE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "429": {
            "description": "Too many calls (per network or per space); see retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/graveyard/search": {
      "get": {
        "operationId": "graveyardSearch",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Search trials (3 credits)",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 500
            }
          },
          {
            "name": "market",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "asset_class",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "mechanism",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "vehicle",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "timeframe",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "verdict",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "failed",
                "underpowered",
                "inconclusive"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402). The PAYMENT-REQUIRED header carries the requirements; pay and repeat the request with PAYMENT-SIGNATURE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "429": {
            "description": "Too many calls (per network or per space); see retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/graveyard/trials/{id}": {
      "get": {
        "operationId": "graveyardTrial",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "One trial (2 credits)",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^g1-[0-9a-f]{12}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402). The PAYMENT-REQUIRED header carries the requirements; pay and repeat the request with PAYMENT-SIGNATURE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/graveyard/families": {
      "get": {
        "operationId": "graveyardFamilies",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Families of trials (2 credits)",
        "parameters": [
          {
            "name": "market",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "mechanism",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "asset_class",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402). The PAYMENT-REQUIRED header carries the requirements; pay and repeat the request with PAYMENT-SIGNATURE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          }
        }
      }
    },
    "/v1/graveyard/families/{slug}": {
      "get": {
        "operationId": "graveyardFamily",
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "One family and its trials (2 credits)",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required (x402). The PAYMENT-REQUIRED header carries the requirements; pay and repeat the request with PAYMENT-SIGNATURE.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/graveyard/feed.json": {
      "get": {
        "operationId": "graveyardFeedJson",
        "summary": "Newest additions, JSON Feed 1.1 (free)",
        "responses": {
          "200": {
            "description": "JSON Feed",
            "content": {
              "application/feed+json": {}
            }
          }
        }
      }
    },
    "/v1/graveyard/feed.atom": {
      "get": {
        "operationId": "graveyardFeedAtom",
        "summary": "Newest additions, Atom (free)",
        "responses": {
          "200": {
            "description": "Atom",
            "content": {
              "application/atom+xml": {}
            }
          }
        }
      }
    },
    "/v1/graveyard/feedback": {
      "post": {
        "operationId": "graveyardFeedback",
        "summary": "Send a note (free; up to 4000 characters, 20 a day per network). Stored as data, never shown to other callers",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "about": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "contact": {
                    "type": "string",
                    "maxLength": 200
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many calls (per network or per space); see retry-after",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  }
}
