{
  "openapi": "3.1.0",
  "info": {
    "title": "Vectorway Gateway API",
    "version": "1.0.0",
    "summary": "Pay-per-call LLM gateway with persistent vector memory.",
    "description": "Vectorway is an agent-first LLM gateway. The fastest path is the Inference tag: POST /v1/chat/completions with a per-call x402 X-PAYMENT (USDC on Base) — no onboarding, no account, no api key. The same endpoint also accepts an x-api-key against a SIWE-onboarded credit balance for callers that prefer batched top-ups. Control-plane endpoints (Auth, Accounts, Credits, API Key Management) authenticate with SIWE → JWT.",
    "contact": {
      "name": "Vectorway",
      "url": "https://vectorway.io",
      "email": "support@vectorway.io"
    },
    "license": {
      "name": "Proprietary"
    }
  },
  "servers": [
    {
      "url": "https://api.vectorway.io",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Inference",
      "description": "The one endpoint most agents need. Per-token billing — pay-per-call with x402, or use an API key that debits credits from a pre-funded balance."
    },
    {
      "name": "Auth (SIWE + JWT, agent-first)",
      "description": "Wallet authentication and JWT session lifecycle for agent-first accounts."
    },
    {
      "name": "Accounts",
      "description": "Wallet account state, compatibility aliases, and API call history."
    },
    {
      "name": "Credits & Billing",
      "description": "Top-ups, Stripe checkout, balance, and the credit-movement ledger."
    },
    {
      "name": "API Key Management",
      "description": "API key creation, listing, and revocation."
    },
    {
      "name": "Memory",
      "description": "Read-only introspection over the wallet-scoped vector index. Memory is populated by the chat endpoint when memory_write=true."
    }
  ],
  "paths": {
    "/v1/chat/completions": {
      "post": {
        "operationId": "chat-completions",
        "summary": "Chat completions — billed per token.",
        "description": "OpenAI-style LLM completions with optional wallet-scoped vector memory. Pay per call via X-PAYMENT (x402 USDC) or x-api-key (debits credits).\n\nAuth: Dual-auth: send a per-call x402 `X-PAYMENT` header to pay USDC per request with no onboarding, OR send `x-api-key: <API_KEY>` to bill credits. The two paths are mutually exclusive — pick one per request.\nBilling: Per-token",
        "tags": [
          "Inference"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing authentication."
          },
          "402": {
            "description": "Insufficient credits or x402 payment required."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "messages"
                ],
                "properties": {
                  "messages": {
                    "type": "array",
                    "items": {},
                    "description": "Chat messages."
                  },
                  "model": {
                    "type": "string",
                    "description": "Gemini model: gemini-2.5-flash (default), gemini-2.5-flash-lite (cheapest), gemini-2.5-pro (most capable), gemini-3.1-flash-lite (newer Lite, better reasoning), or gemini-3.5-flash (newest Pro-tier reasoner). Per-token rate varies by model — see the rate sheet on the home page."
                  },
                  "memory_read": {
                    "type": "boolean",
                    "description": "Retrieve memory context. Default true."
                  },
                  "memory_write": {
                    "type": "boolean",
                    "description": "Store user/assistant memory. Default true."
                  },
                  "memory_write_mode": {
                    "type": "string",
                    "description": "auto|raw|summary for memory writes. Default auto."
                  },
                  "memory_max_chars": {
                    "type": "integer",
                    "description": "Max chars stored per memory write artifact. Default 1200."
                  },
                  "k": {
                    "type": "integer",
                    "description": "Top-k memories."
                  },
                  "temperature": {
                    "type": "number",
                    "description": "Generation temperature."
                  },
                  "stream": {
                    "type": "boolean",
                    "description": "Emit OpenAI-compatible SSE chunks instead of a single JSON response. Default false. Only valid on the api-key path; x402 requests with stream:true return 400."
                  }
                }
              },
              "example": {
                "messages": [
                  {
                    "role": "user",
                    "content": "Summarize our last run"
                  }
                ],
                "model": "gemini-2.5-flash",
                "memory_read": true,
                "memory_write": true,
                "memory_write_mode": "auto",
                "memory_max_chars": 1200,
                "k": 5,
                "temperature": 0.3,
                "stream": false
              }
            }
          }
        },
        "security": [
          {
            "x402": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/v1/auth/agent-onboard": {
      "post": {
        "operationId": "auth-agent-onboard",
        "summary": "Onboard agent with x402 payment.",
        "description": "Verifies x402 payment, creates account if needed, grants credits, issues a JWT, and returns a new API key.\n\nAuth: Send the standard x402 `X-PAYMENT` header. The wallet is taken from the verified payment payload.\nBilling: x402 settled",
        "tags": [
          "Auth (SIWE + JWT, agent-first)"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "example": {
                  "wallet_address": "0xabc...",
                  "credits": 6000000,
                  "created": true,
                  "agent_only": true,
                  "tokens": {
                    "access_token": "eyJ...",
                    "refresh_token": "eyJ...",
                    "token_type": "bearer",
                    "expires_in": 900
                  },
                  "api_key": "vw_...",
                  "api_key_metadata": {
                    "key_id": "abc123",
                    "key_name": "agent-prod",
                    "created_at": 1747000000,
                    "last_used_at": null
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing authentication."
          },
          "402": {
            "description": "Insufficient credits or x402 payment required."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "wallet_address",
                  "credits"
                ],
                "properties": {
                  "wallet_address": {
                    "type": "string",
                    "description": "Wallet to onboard and credit."
                  },
                  "credits": {
                    "type": "integer",
                    "description": "Credits to add. Min 500,000 (≈$0.50 floor), max 1,000,000,000 (≈$1000 ceiling). 1 credit = 1 atomic USDC = $0.000001 → linear $1 → 1,000,000 credits."
                  },
                  "key_name": {
                    "type": "string",
                    "description": "Optional API key display name."
                  }
                }
              },
              "example": {
                "wallet_address": "0xabc...",
                "credits": 5000000,
                "key_name": "agent-prod"
              }
            }
          }
        },
        "security": [
          {
            "x402": []
          }
        ]
      }
    },
    "/v1/auth/siwe/challenge": {
      "post": {
        "operationId": "siwe-challenge",
        "summary": "Generate SIWE challenge message.",
        "description": "Creates nonce-backed SIWE message for a wallet.\n\nAuth: No authentication required.\nBilling: free",
        "tags": [
          "Auth (SIWE + JWT, agent-first)"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "example": {
                  "wallet_address": "0xabc...",
                  "message": "localhost wants you to sign in...",
                  "nonce": "f3a9...",
                  "expires_in_seconds": 300
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing authentication."
          },
          "402": {
            "description": "Insufficient credits or x402 payment required."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "wallet_address"
                ],
                "properties": {
                  "wallet_address": {
                    "type": "string",
                    "description": "Wallet address for challenge issuance."
                  },
                  "chain_id": {
                    "type": "integer",
                    "description": "EVM chain ID. Default 1."
                  }
                }
              },
              "example": {
                "wallet_address": "0xabc...",
                "chain_id": 1
              }
            }
          }
        }
      }
    },
    "/v1/auth/siwe/verify": {
      "post": {
        "operationId": "siwe-verify",
        "summary": "Verify SIWE and issue JWT session.",
        "description": "Verifies signature + nonce, creates/loads an agent-first account, and returns access + refresh JWTs.\n\nAuth: Body includes a SIWE `message` + wallet `signature`; no token header required.\nBilling: free",
        "tags": [
          "Auth (SIWE + JWT, agent-first)"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "example": {
                  "wallet_address": "0xabc...",
                  "credits": 100000,
                  "created": true,
                  "tokens": {
                    "access_token": "eyJ...",
                    "refresh_token": "eyJ...",
                    "token_type": "bearer",
                    "expires_in": 900
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing authentication."
          },
          "402": {
            "description": "Insufficient credits or x402 payment required."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "wallet_address",
                  "message",
                  "signature"
                ],
                "properties": {
                  "wallet_address": {
                    "type": "string",
                    "description": "Wallet being authenticated."
                  },
                  "message": {
                    "type": "string",
                    "description": "SIWE message returned by challenge."
                  },
                  "signature": {
                    "type": "string",
                    "description": "Wallet signature over SIWE message."
                  }
                }
              },
              "example": {
                "wallet_address": "0xabc...",
                "message": "localhost wants you to sign in...",
                "signature": "0x..."
              }
            }
          }
        }
      }
    },
    "/v1/auth/refresh": {
      "post": {
        "operationId": "auth-refresh",
        "summary": "Rotate refresh token.",
        "description": "Consumes current refresh token and returns a new access+refresh pair.\n\nAuth: No authentication required.\nBilling: free",
        "tags": [
          "Auth (SIWE + JWT, agent-first)"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "example": {
                  "access_token": "eyJ...",
                  "refresh_token": "eyJ...",
                  "token_type": "bearer",
                  "expires_in": 900
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing authentication."
          },
          "402": {
            "description": "Insufficient credits or x402 payment required."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "refresh_token"
                ],
                "properties": {
                  "refresh_token": {
                    "type": "string",
                    "description": "Current refresh JWT."
                  }
                }
              },
              "example": {
                "refresh_token": "eyJ..."
              }
            }
          }
        }
      }
    },
    "/v1/auth/revoke": {
      "post": {
        "operationId": "auth-revoke",
        "summary": "Revoke refresh token.",
        "description": "Invalidates provided refresh token (logout).\n\nAuth: No authentication required.\nBilling: free",
        "tags": [
          "Auth (SIWE + JWT, agent-first)"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "example": {
                  "status": "revoked"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing authentication."
          },
          "402": {
            "description": "Insufficient credits or x402 payment required."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "refresh_token"
                ],
                "properties": {
                  "refresh_token": {
                    "type": "string",
                    "description": "Refresh JWT to revoke."
                  }
                }
              },
              "example": {
                "refresh_token": "eyJ..."
              }
            }
          }
        }
      }
    },
    "/v1/me": {
      "get": {
        "operationId": "me",
        "summary": "Get current account state.",
        "description": "JWT-gated account profile for the authenticated wallet.\n\nAuth: Send `Authorization: Bearer <ACCESS_JWT>` (control-plane).\nBilling: free",
        "tags": [
          "Accounts"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "example": {
                  "wallet_address": "0xabc...",
                  "credits": 1240000,
                  "created": false
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing authentication."
          },
          "402": {
            "description": "Insufficient credits or x402 payment required."
          }
        },
        "security": [
          {
            "jwtBearer": []
          }
        ]
      }
    },
    "/v1/usage": {
      "get": {
        "operationId": "usage",
        "summary": "List API call history.",
        "description": "Wallet-scoped call history (newest first).\n\nAuth: Send `Authorization: Bearer <ACCESS_JWT>` OR `x-api-key: <API_KEY>` — the wallet is derived from whichever credential is presented. Used by read-only history endpoints (`/v1/usage`, `/v1/credits/ledger`) so both dashboard JWT sessions and runtime api-key callers can audit their own wallet.\nBilling: free",
        "tags": [
          "Accounts"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Events per page. 1–100, default 50.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque list offset from a previous response's next_cursor. Omit for the first page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "Either \"all\" (default), \"errors\" (status ≥ 400), or an exact request path (e.g. \"/v1/chat/completions\") for path-scoped reads.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "example": {
                  "wallet_address": "0xabc...",
                  "events": [
                    {
                      "ts": 1747000123.45,
                      "ts_iso": "2026-05-21T03:24:00Z",
                      "method": "POST",
                      "path": "/v1/chat/completions",
                      "status": 200,
                      "latency_ms": 1234,
                      "credits": 712,
                      "usd_cost": "0.000712",
                      "model": "gemini-2.5-flash",
                      "prompt_tokens": 482,
                      "completion_tokens": 196,
                      "memory_read": true,
                      "memory_write": true,
                      "memories_used": 3,
                      "key_id": null,
                      "auth_mode": "x402"
                    }
                  ],
                  "next_cursor": 50,
                  "has_more": true,
                  "total": 234
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing authentication."
          },
          "402": {
            "description": "Insufficient credits or x402 payment required."
          }
        },
        "security": [
          {
            "jwtBearer": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/v1/credits/purchase": {
      "post": {
        "operationId": "credits-purchase",
        "summary": "Top up credit balance via x402.",
        "description": "x402 payment proof endpoint. Wallet must already have an account and match the wallet in the payment proof.\n\nAuth: Send the standard x402 `X-PAYMENT` header. The wallet is taken from the verified payment payload.\nBilling: x402 settled",
        "tags": [
          "Credits & Billing"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "example": {
                  "wallet_address": "0xabc...",
                  "credits": 6000000,
                  "created": false
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing authentication."
          },
          "402": {
            "description": "Insufficient credits or x402 payment required."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "wallet_address",
                  "credits"
                ],
                "properties": {
                  "wallet_address": {
                    "type": "string",
                    "description": "Wallet to credit."
                  },
                  "credits": {
                    "type": "integer",
                    "description": "Credits to add (1 credit = 1 atomic USDC = $0.000001). Min 500,000 (≈$0.50), max 1,000,000,000 (≈$1000)."
                  }
                }
              },
              "example": {
                "wallet_address": "0xabc...",
                "credits": 5000000
              }
            }
          }
        },
        "security": [
          {
            "x402": []
          }
        ]
      }
    },
    "/v1/credits/me": {
      "get": {
        "operationId": "credits-me",
        "summary": "Get credit balance for current account.",
        "description": "Works with JWT bearer (control plane) or API key (runtime). `credits` is the wallet's current credit balance (1 credit = $0.000001).\n\nAuth: Send `Authorization: Bearer <ACCESS_JWT>` (control-plane).\nBilling: free",
        "tags": [
          "Credits & Billing"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "example": {
                  "wallet_address": "0xabc...",
                  "credits": 2000000
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing authentication."
          },
          "402": {
            "description": "Insufficient credits or x402 payment required."
          }
        },
        "security": [
          {
            "jwtBearer": []
          }
        ]
      }
    },
    "/v1/credits/ledger": {
      "get": {
        "operationId": "credits-ledger",
        "summary": "List credit-movement history.",
        "description": "Wallet-scoped credit ledger (newest first) covering top-ups, refunds, and grants.\n\nAuth: Send `Authorization: Bearer <ACCESS_JWT>` OR `x-api-key: <API_KEY>` — the wallet is derived from whichever credential is presented. Used by read-only history endpoints (`/v1/usage`, `/v1/credits/ledger`) so both dashboard JWT sessions and runtime api-key callers can audit their own wallet.\nBilling: free",
        "tags": [
          "Credits & Billing"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Events per page. 1–100, default 50.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque list offset from a previous response's next_cursor.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "Optional filter: \"topup\" | \"debit\" | \"refund\" | \"grant\". Omit to return every kind. Case-insensitive.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "example": {
                  "wallet_address": "0xabc...",
                  "events": [
                    {
                      "ts": "2026-05-21T03:24:00Z",
                      "kind": "topup",
                      "credits": 5000000,
                      "usd": "5.00",
                      "ref": "0xabc...",
                      "note": "x402 agent-onboard · 5,000,000 credits"
                    }
                  ],
                  "next_cursor": null,
                  "has_more": false,
                  "total": 1
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing authentication."
          },
          "402": {
            "description": "Insufficient credits or x402 payment required."
          }
        },
        "security": [
          {
            "jwtBearer": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/v1/api-keys": {
      "post": {
        "operationId": "api-keys-create",
        "summary": "Create API key.",
        "description": "JWT control-plane endpoint. Returns raw key once.\n\nAuth: Send `Authorization: Bearer <ACCESS_JWT>` (control-plane).\nBilling: free",
        "tags": [
          "API Key Management"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "example": {
                  "api_key": "vw_....",
                  "metadata": {
                    "key_id": "abc123",
                    "key_name": "my-agent",
                    "created_at": 1747000000,
                    "last_used_at": null
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing authentication."
          },
          "402": {
            "description": "Insufficient credits or x402 payment required."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "wallet_address",
                  "key_name"
                ],
                "properties": {
                  "wallet_address": {
                    "type": "string",
                    "description": "Wallet owner of key."
                  },
                  "key_name": {
                    "type": "string",
                    "description": "Display name for key."
                  }
                }
              },
              "example": {
                "wallet_address": "0xabc...",
                "key_name": "my-agent"
              }
            }
          }
        },
        "security": [
          {
            "jwtBearer": []
          }
        ]
      },
      "get": {
        "operationId": "api-keys-list",
        "summary": "List API keys.",
        "description": "Returns API key metadata for wallet.\n\nAuth: Send `Authorization: Bearer <ACCESS_JWT>` (control-plane).\nBilling: free",
        "tags": [
          "API Key Management"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "example": [
                  {
                    "key_id": "abc123",
                    "key_name": "my-agent",
                    "created_at": 1747000000,
                    "last_used_at": 1747000100
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Invalid or missing authentication."
          },
          "402": {
            "description": "Insufficient credits or x402 payment required."
          }
        },
        "security": [
          {
            "jwtBearer": []
          }
        ]
      }
    },
    "/v1/api-keys/{key_id}": {
      "delete": {
        "operationId": "api-keys-delete",
        "summary": "Revoke API key.",
        "description": "Deletes selected key if it belongs to wallet.\n\nAuth: Send `Authorization: Bearer <ACCESS_JWT>` (control-plane).\nBilling: free",
        "tags": [
          "API Key Management"
        ],
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "description": "API key identifier.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "example": {
                  "status": "revoked",
                  "key_id": "abc123"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing authentication."
          },
          "402": {
            "description": "Insufficient credits or x402 payment required."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "wallet_address"
                ],
                "properties": {
                  "wallet_address": {
                    "type": "string",
                    "description": "Wallet owner."
                  }
                }
              },
              "example": {
                "wallet_address": "0xabc..."
              }
            }
          }
        },
        "security": [
          {
            "jwtBearer": []
          }
        ]
      }
    },
    "/v1/memory": {
      "get": {
        "operationId": "memory-search",
        "summary": "Search memories.",
        "description": "Semantic search over wallet-scoped memory index. Memory itself is populated by the chat endpoint when memory_write=true; this endpoint is read-only introspection.\n\nAuth: Send `x-api-key: <API_KEY>` (runtime).\nBilling: free",
        "tags": [
          "Memory"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Semantic query text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "k",
            "in": "query",
            "required": false,
            "description": "Result count. Default 5.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "example": {
                  "matches": [
                    {
                      "id": "a1b2c3d4-1111-2222-3333-444455556666",
                      "text": "...",
                      "score": 0.91
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing authentication."
          },
          "402": {
            "description": "Insufficient credits or x402 payment required."
          }
        },
        "security": [
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/v1/memory/{memory_id}": {
      "delete": {
        "operationId": "memory-delete",
        "summary": "Delete a memory item.",
        "description": "Deletes a wallet-scoped memory record by id. Use the id returned by a memory-search match.\n\nAuth: Send `x-api-key: <API_KEY>` (runtime).\nBilling: free",
        "tags": [
          "Memory"
        ],
        "parameters": [
          {
            "name": "memory_id",
            "in": "path",
            "required": true,
            "description": "Memory identifier returned by GET /v1/memory.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "example": {
                  "status": "deleted",
                  "memory_id": "c3d5...-uuid"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing authentication."
          },
          "402": {
            "description": "Insufficient credits or x402 payment required."
          }
        },
        "security": [
          {
            "apiKeyHeader": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "jwtBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Access JWT issued by /v1/auth/siwe/verify or /v1/auth/refresh."
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Runtime API key (vw_...). Created via /v1/api-keys."
      },
      "x402": {
        "type": "apiKey",
        "in": "header",
        "name": "X-PAYMENT",
        "description": "Standard Coinbase x402 payment payload. First call without it returns 402 with payment requirements."
      },
      "stripeSignature": {
        "type": "apiKey",
        "in": "header",
        "name": "stripe-signature",
        "description": "Stripe-signed webhook header."
      }
    }
  },
  "x-llms-txt": "https://vectorway.io/llms.txt",
  "x-llms-full-txt": "https://vectorway.io/llms-full.txt",
  "x-agent-skill": "https://vectorway.io/skill.md",
  "externalDocs": {
    "description": "Vectorway human-readable docs",
    "url": "https://vectorway.io/docs"
  }
}