Authentication
Control-plane endpoints use Authorization: Bearer <access_jwt>. Runtime inference uses x-api-key. x402 topups require x-payment-signature and x-payment-tx-hash.
Vectorway APIs can be used entirely by agents with no human intervention by using SIWE. Use SIWE to obtain JWT sessions for control-plane operations, then use API keys for runtime endpoints such as chat inference.
Control-plane endpoints use Authorization: Bearer <access_jwt>. Runtime inference uses x-api-key. x402 topups require x-payment-signature and x-payment-tx-hash.
RFC 7807 problem+json. Common: 401 auth invalid, 402 insufficient credits/payment required, 403 wallet mismatch, 409 idempotency conflict, 422 validation.
Rate limits are wallet-scoped and may differ across control-plane and runtime endpoints. Use credits monitoring plus key/session rotation for resilient clients.
Wallet authentication and JWT session lifecycle for agent-first accounts.
/v1/auth/agent-onboardVerifies x402 payment, creates account if needed, adds credits, issues JWT, and returns a new API key.
wallet_addressstringrequiredWallet to onboard and credit.
creditsintegerrequiredCredits to add after x402 verification.
key_namestringOptional API key display name.
curl -X POST https://api.vectorway.ai/v1/auth/agent-onboard \
-H "x-payment-signature: <SIGNATURE>" \
-H "x-payment-tx-hash: <TX_HASH>" \
-H "Content-Type: application/json" \
-d '{
"wallet_address":"0xabc...",
"credits":5000,
"key_name":"agent-prod"
}'
/v1/auth/siwe/challengeCreates nonce-backed SIWE message for a wallet.
wallet_addressstringrequiredWallet address for challenge issuance.
chain_idintegerEVM chain ID. Default 1.
curl -X POST https://api.vectorway.ai/v1/auth/siwe/challenge \
-H "Content-Type: application/json" \
-d '{
"wallet_address": "0xabc...",
"chain_id": 1
}'
/v1/auth/siwe/verifyVerifies signature + nonce, creates/loads an agent-first account, and returns access + refresh JWTs.
wallet_addressstringrequiredWallet being authenticated.
messagestringrequiredSIWE message returned by challenge.
signaturestringrequiredWallet signature over SIWE message.
curl -X POST https://api.vectorway.ai/v1/auth/siwe/verify \
-H "Content-Type: application/json" \
-d '{
"wallet_address": "0xabc...",
"message": "localhost wants you to sign in...",
"signature": "0x..."
}'
/v1/auth/refreshConsumes current refresh token and returns a new access+refresh pair.
refresh_tokenstringrequiredCurrent refresh JWT.
curl -X POST https://api.vectorway.ai/v1/auth/refresh \
-H "Content-Type: application/json" \
-d '{"refresh_token":"eyJ..."}'
/v1/auth/revokeInvalidates provided refresh token (logout).
refresh_tokenstringrequiredRefresh JWT to revoke.
curl -X POST https://api.vectorway.ai/v1/auth/revoke \
-H "Content-Type: application/json" \
-d '{"refresh_token":"eyJ..."}'
Wallet account state and compatibility aliases.
/v1/meJWT-gated account profile for the authenticated wallet.
curl https://api.vectorway.ai/v1/me \
-H "Authorization: Bearer <ACCESS_JWT>"
Topups, checkout flows, and balance reads.
/v1/credits/purchasex402 payment proof endpoint. Wallet must already have an account and match the wallet in the payment proof.
wallet_addressstringrequiredWallet to credit.
creditsintegerrequiredCredits to add.
curl -X POST https://api.vectorway.ai/v1/credits/purchase \
-H "x-payment-signature: <SIGNATURE>" \
-H "x-payment-tx-hash: <TX_HASH>" \
-H "Content-Type: application/json" \
-d '{"wallet_address":"0xabc...","credits":500}'
/v1/credits/meWorks with JWT bearer (control plane) or API key (runtime).
curl https://api.vectorway.ai/v1/credits/me \
-H "Authorization: Bearer <ACCESS_JWT>"
Control-plane key creation, listing, and revocation.
/v1/api-keysJWT control-plane endpoint. Returns raw key once.
wallet_addressstringrequiredWallet owner of key.
key_namestringrequiredDisplay name for key.
curl -X POST https://api.vectorway.ai/v1/api-keys \
-H "Authorization: Bearer <ACCESS_JWT>" \
-H "Content-Type: application/json" \
-d '{"wallet_address":"0xabc...","key_name":"my-agent"}'
/v1/api-keysReturns API key metadata for wallet.
curl https://api.vectorway.ai/v1/api-keys \
-H "Authorization: Bearer <ACCESS_JWT>"
/v1/api-keys/{key_id}Deletes selected key if it belongs to wallet.
key_idpath stringrequiredAPI key identifier.
wallet_addressstringrequiredWallet owner.
curl -X DELETE https://api.vectorway.ai/v1/api-keys/{key_id} \
-H "Authorization: Bearer <ACCESS_JWT>" \
-H "Content-Type: application/json" \
-d '{"wallet_address":"0xabc..."}'
Agent runtime endpoints (API-key authenticated).
/v1/chat/completionsRuntime data-plane endpoint. memory_read/memory_write control memory behavior; enabling either increases credits charged.
messagesarrayrequiredChat messages.
memory_readbooleanRetrieve memory context. Default true.
memory_writebooleanStore user/assistant memory. Default true.
memory_write_modeenumauto|raw|summary for memory writes. Default auto.
memory_max_charsintegerMax chars stored per memory write artifact. Default 1200.
kintegerTop-k memories.
temperaturenumberGeneration temperature.
curl -X POST https://api.vectorway.ai/v1/chat/completions \
-H "x-api-key: <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"messages":[{"role":"user","content":"Summarize our last run"}],
"memory_read":true,
"memory_write":true,
"memory_write_mode":"auto",
"memory_max_chars":1200,
"k":5,
"temperature":0.3
}'
/v1/memoryGenerates an embedding for content and stores both text + vector in wallet-scoped memory.
contentstringrequiredMemory text to store.
curl -X POST https://api.vectorway.ai/v1/memory \
-H "x-api-key: <API_KEY>" \
-H "Content-Type: application/json" \
-d '{"content":"Customer prefers async delivery on Tuesdays."}'
/v1/memorySemantic search over wallet-scoped memory index.
qstringrequiredSemantic query text.
kintegerResult count. Default 5.
curl https://api.vectorway.ai/v1/memory?q=last+simulation&k=5 \
-H "x-api-key: <API_KEY>"
/v1/memory/{memory_id}Deletes a wallet-scoped memory record by id.
memory_idpath stringrequiredMemory identifier returned by POST /v1/memory.
curl -X DELETE https://api.vectorway.ai/v1/memory/{memory_id} \
-H "x-api-key: <API_KEY>" \
-H "Content-Type: application/json" \
-d '# no body'
/v1/embeddingsReturns embedding vectors for one or many inputs.
inputstring|string[]requiredInput text(s).
curl -X POST https://api.vectorway.ai/v1/embeddings \
-H "x-api-key: <API_KEY>" \
-H "Content-Type: application/json" \
-d '{"input":["hello","world"]}'