{
  "openapi": "3.1.0",
  "info": {
    "title": "Sellat pay-per-call",
    "version": "1.0.0",
    "description": "Proofs of existence and eIDAS qualified timestamps that an AI agent buys per call with USDC (x402 v2, no account, no API key). Typical use: an agent seals the SHA-256 of its execution log, a decision record or a delivered output, so anyone can later check that the record existed and was not altered (a tamper-evident audit trail). The first proof returns a read-only key for the paying wallet. A proof shows that exact bytes existed no later than the anchored time; it does not prove authorship, that an action happened or that the record is complete. Paying this offer accepts Sellat's terms and conditions, https://sellat.app/en/condiciones (version 2026-10-26); the version is recorded with the payment.",
    "termsOfService": "https://sellat.app/en/condiciones",
    "contact": {
      "name": "Sellat",
      "url": "https://sellat.app",
      "email": "hola@sellat.app"
    }
  },
  "externalDocs": {
    "description": "Verifiable records for AI agents: the call, the response and how to verify",
    "url": "https://sellat.app/agentes-ia"
  },
  "servers": [
    {
      "url": "https://sellat.app"
    }
  ],
  "paths": {
    "/api/v2/proofs": {
      "post": {
        "operationId": "createProof",
        "summary": "Timestamp and notarize a SHA-256 (proof of existence)",
        "description": "Timestamp and notarize any file, data or AI agent log by its SHA-256 hash: blockchain proof of existence and integrity for tamper-evident audit trails, anchored on Polygon in minutes, then Bitcoin (OpenTimestamps); not a notary act. Returns proof_id, certificate, proof.json and evidence ZIP, verifiable without Sellat. Use when you must prove exact data or an agent record existed and is intact.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "hash"
                ],
                "properties": {
                  "hash": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$",
                    "description": "SHA-256 of the file or data, 64 hex characters. Only the hash is sent."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "metadata": {
                    "type": "object"
                  }
                }
              },
              "example": {
                "hash": "3bf586a057653420cbf3a7bac1c424a84175e8e8d7e8abef06634628b2aee8ea",
                "name": "sellat-example-20261102194425-fdc01ca1.txt",
                "metadata": {
                  "ref": "optional"
                }
              }
            }
          }
        },
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          }
        },
        "responses": {
          "200": {
            "description": "Paid and done. The body carries a `payment` object; the PAYMENT-RESPONSE header carries the settlement.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "id": "<proof_id>",
                  "proof_id": "<proof_id: use it in POST /api/v2/proofs/{id}/qualified>",
                  "created": true,
                  "hash": "<sha256>",
                  "state": "queued → anchored (minutes)",
                  "anchoring": {
                    "policy": "fast"
                  },
                  "urls": {
                    "self": "https://sellat.app/api/v2/proofs/<id>",
                    "certificate": "https://sellat.app/certificate/<id>",
                    "proof_json": "https://sellat.app/api/v2/proof/<id>.json",
                    "evidence_zip": "https://sellat.app/api/v2/proofs/<id>/evidence.zip"
                  },
                  "api_key": "<shown once: read-only key for this wallet’s proofs>",
                  "payment": {
                    "charged": true,
                    "amount_usd": "0.01",
                    "transaction": "<tx hash on Base>"
                  },
                  "next": "POST /api/v2/proofs/{id}/qualified adds the eIDAS qualified timestamp (RFC 3161) for 0.90 USD"
                }
              }
            }
          },
          "201": {
            "description": "Paid and created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "id": "<proof_id>",
                  "proof_id": "<proof_id: use it in POST /api/v2/proofs/{id}/qualified>",
                  "created": true,
                  "hash": "<sha256>",
                  "state": "queued → anchored (minutes)",
                  "anchoring": {
                    "policy": "fast"
                  },
                  "urls": {
                    "self": "https://sellat.app/api/v2/proofs/<id>",
                    "certificate": "https://sellat.app/certificate/<id>",
                    "proof_json": "https://sellat.app/api/v2/proof/<id>.json",
                    "evidence_zip": "https://sellat.app/api/v2/proofs/<id>/evidence.zip"
                  },
                  "api_key": "<shown once: read-only key for this wallet’s proofs>",
                  "payment": {
                    "charged": true,
                    "amount_usd": "0.01",
                    "transaction": "<tx hash on Base>"
                  },
                  "next": "POST /api/v2/proofs/{id}/qualified adds the eIDAS qualified timestamp (RFC 3161) for 0.90 USD"
                }
              }
            }
          },
          "402": {
            "description": "Payment required: the PAYMENT-REQUIRED header (base64 JSON, x402 v2) states the exact amount, the USDC token, the network and the receiving address. Sign an EIP-3009 transferWithAuthorization and repeat the request with the PAYMENT-SIGNATURE header."
          }
        }
      }
    },
    "/api/v2/proofs/{id}/qualified": {
      "post": {
        "operationId": "createQualifiedTimestamp",
        "summary": "eIDAS qualified electronic timestamp on a proof of yours",
        "description": "eIDAS qualified electronic timestamp (RFC 3161 .tsr) on a Sellat proof, issued in seconds by an EU qualified trust service provider on the EU trusted list. Legal timestamp with the presumption of accuracy of date and integrity of Art. 41.2 eIDAS, recognised across the EU. Use when the date must hold before a court, authority, regulator or auditor. Call it on the proof_id from POST /proofs.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The proof_id returned by POST /proofs."
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.90"
          }
        },
        "responses": {
          "200": {
            "description": "Paid and done. The body carries a `payment` object; the PAYMENT-RESPONSE header carries the settlement.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "proof_id": "<proof_id>",
                  "created": true,
                  "qualified": {
                    "state": "issued",
                    "authority": "<EU qualified trust service provider>",
                    "time": "<RFC 3161 time, UTC>",
                    "serial_number": "<token serial>",
                    "policy_oid": "0.4.0.2023.1.1",
                    "tsr_url": "https://sellat.app/api/v2/proofs/<id>/qualified.tsr"
                  },
                  "verify": "openssl ts -verify -in <file>.tsr -data <file> (any RFC 3161 tool); the .tsr is downloaded with the wallet’s key",
                  "payment": {
                    "charged": true,
                    "amount_usd": "0.9",
                    "transaction": "<tx hash on Base>"
                  }
                }
              }
            }
          },
          "201": {
            "description": "Paid and created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "proof_id": "<proof_id>",
                  "created": true,
                  "qualified": {
                    "state": "issued",
                    "authority": "<EU qualified trust service provider>",
                    "time": "<RFC 3161 time, UTC>",
                    "serial_number": "<token serial>",
                    "policy_oid": "0.4.0.2023.1.1",
                    "tsr_url": "https://sellat.app/api/v2/proofs/<id>/qualified.tsr"
                  },
                  "verify": "openssl ts -verify -in <file>.tsr -data <file> (any RFC 3161 tool); the .tsr is downloaded with the wallet’s key",
                  "payment": {
                    "charged": true,
                    "amount_usd": "0.9",
                    "transaction": "<tx hash on Base>"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required: the PAYMENT-REQUIRED header (base64 JSON, x402 v2) states the exact amount, the USDC token, the network and the receiving address. Sign an EIP-3009 transferWithAuthorization and repeat the request with the PAYMENT-SIGNATURE header."
          }
        }
      }
    },
    "/api/v2/wallet/key": {
      "post": {
        "operationId": "createWalletKey",
        "summary": "Read-only API key for the paying wallet",
        "description": "Read-only API key for the paying wallet’s Sellat account: list its proofs, read status and anchors, download certificates, evidence ZIPs and .tsr tokens. Use when the key returned by your first proof was lost.",
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          }
        },
        "responses": {
          "200": {
            "description": "Paid and done. The body carries a `payment` object; the PAYMENT-RESPONSE header carries the settlement.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "api_key": "<new read-only key>",
                  "wallet": "<payer address>",
                  "payment": {
                    "charged": true,
                    "amount_usd": "0.01"
                  }
                }
              }
            }
          },
          "201": {
            "description": "Paid and created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "api_key": "<new read-only key>",
                  "wallet": "<payer address>",
                  "payment": {
                    "charged": true,
                    "amount_usd": "0.01"
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required: the PAYMENT-REQUIRED header (base64 JSON, x402 v2) states the exact amount, the USDC token, the network and the receiving address. Sign an EIP-3009 transferWithAuthorization and repeat the request with the PAYMENT-SIGNATURE header."
          }
        }
      }
    }
  },
  "x-discovery": {
    "ownershipProofs": []
  }
}