{
  "openapi": "3.1.0",
  "info": {
    "title": "The Annunaki Deep Reading",
    "version": "1.0.0",
    "description": "Get a personalized oracle reading for creative reflection and entertainment. One $2 USD Stripe card payment per reading."
  },
  "servers": [{ "url": "https://theannunaki.com" }],
  "externalDocs": { "description": "Purchase instructions and machine-order terms", "url": "https://theannunaki.com/agent-reading.txt" },
  "paths": {
    "/api/agent/v1/reading": {
      "get": {
        "operationId": "getReadingAvailabilityOrOrder",
        "summary": "Check availability or recover an existing reading",
        "description": "Omit X-Order-Key for current service availability and terms. Send the same private X-Order-Key to check a paid order or recover its reading for up to 24 hours.",
        "parameters": [{ "$ref": "#/components/parameters/OrderKey" }],
        "responses": {
          "200": { "description": "Current capabilities or a fulfilled reading with a Payment-Receipt header." },
          "202": { "description": "Payment confirmation or fulfillment is pending. Follow Retry-After when present." },
          "400": { "description": "Invalid order key." },
          "404": { "description": "Order or endpoint unavailable at this address." },
          "409": { "description": "Payment unavailable, declined, or delivery requires merchant support." },
          "410": { "description": "Reading recovery period expired." },
          "503": { "description": "Service temporarily unavailable or new orders suspended." }
        }
      },
      "post": {
        "operationId": "purchaseDeepReading",
        "summary": "Request a quote or purchase one personalized reading",
        "description": "First send the JSON body and a private order key without an Authorization header. Verify the live challenge and obtain buyer approval for exactly one $2 USD card payment and the displayed terms. Retry with the same body and key and a buyer-authorized Stripe Shared Payment Token in an MPP Payment credential.",
        "x-payment-info": {
          "offers": [{ "method": "stripe", "intent": "charge", "amount": "200", "currency": "usd" }]
        },
        "security": [{}, { "PaymentCredential": [] }],
        "parameters": [{
          "name": "X-Order-Key",
          "in": "header",
          "required": true,
          "description": "Private random 32-byte value encoded as 64 lowercase hex characters. Reuse it only for the same order.",
          "schema": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
        }],
        "requestBody": {
          "required": true,
          "description": "The UTF-8 JSON body must fit within 8,192 bytes.",
          "content": { "application/json": {
            "schema": {
              "type": "object",
              "required": ["question", "termsVersion"],
              "additionalProperties": false,
              "properties": {
                "question": { "type": "string", "minLength": 1, "maxLength": 2000, "description": "Use text that is nonblank after trimming and at most 2,000 UTF-16 code units." },
                "language": { "type": "string", "enum": ["en", "es", "pt"], "default": "en" },
                "termsVersion": { "type": "string", "const": "annunaki-machine-2026-12-03" }
              }
            },
            "example": { "question": "How can I make time for creative work?", "language": "en", "termsVersion": "annunaki-machine-2026-12-03" }
          } }
        },
        "responses": {
          "200": { "description": "Fulfilled reading with a Payment-Receipt header, or a free safety response." },
          "202": { "description": "Payment confirmation or fulfillment is pending. Retry the same order." },
          "400": { "description": "Invalid order key or reading request." },
          "402": {
            "description": "Live MPP challenge with Stripe card payment terms in WWW-Authenticate.",
            "headers": { "WWW-Authenticate": { "schema": { "type": "string" } } }
          },
          "409": { "description": "Order conflict, terms mismatch, payment unavailable, or delivery requires support." },
          "410": { "description": "Reading recovery period expired." },
          "503": { "description": "Service, offer, or fulfillment temporarily unavailable. Check the same order before trying again." }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "OrderKey": {
        "name": "X-Order-Key",
        "in": "header",
        "description": "Omit for capabilities or supply the original private order key for status.",
        "schema": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
      }
    },
    "securitySchemes": {
      "PaymentCredential": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "MPP Payment credential for the current challenge with a buyer-approved Stripe card SPT."
      }
    }
  }
}
