Reference
API Reference WebSocket RPC, REST endpoints, Tempo Wallet billing, and platform capabilities for OPTX integration.
The OPTX platform exposes a WebSocket API for real-time agent communication, REST endpoints for frontend integration, and a Tempo Wallet for metered HEDGEHOG API billing.
Connect to the JOE agent via the DOJO Connections tab. Authentication required.
// JOE Agent WebSocket message types
// Connection is managed by the DOJO — no direct endpoint access
// Chat message
{ type : "chat" , user : "your-username" , content : "Hello JOE" }
// Response format
{
content : "JOE's response text" ,
tensor : "COG/EMO/ENV classification" ,
cstb_score : 0.85 , // CSTB attestation score
}
// Wallet queries (admin only)
{ type : "wallet_status" } // → balances + attestation
{ type : "wallet_metadata" } // → ERC-8004 agent identity
{ type : "x402_policy" } // → payment policy
{ type : "bridge_status" } // → LayerZero bridge info
Core platform capabilities available to integrated applications:
{
"capabilities" : [
"gaze_data_storage" ,
"gaze_data_retrieval" ,
"gaze_pattern_analysis" ,
"context_awareness" ,
"ai_chat" ,
"usage_analytics" ,
"tempo_billing" ,
"task_escrow"
]
}
Method Path Description POST /api/gaze/storeSubmit gaze tensor data for attestation GET /api/gaze/historyRetrieve gaze session history POST /api/verify-sessionVerify subscription and access tier GET /api/attestation/statusCheck CSTB attestation progress
The enhanced API bridge for Hermes Agent and Workspace. All endpoints are payment-gated via MPP when enabled.
Method Path Description GET /api/sessionsList all agent sessions GET /api/sessions/{id}Get specific session GET /api/sessions/{id}/messagesGet session messages DELETE /api/sessions/{id}Delete session
Method Path Description GET /api/skillsList installed skills (filter by category/search) GET /api/skills/{id}Get skill with SKILL.md metadata
Method Path Description GET /api/memoryList all memories POST /api/memoryStore new memory POST /api/memory/searchSearch memories with query/filters GET /api/memory/recallQuick recall DELETE /api/memory/{id}Delete memory GET /api/memory/statsMemory backend statistics
Method Path Description POST /api/tasksCreate task with reward and capabilities GET /api/tasksList tasks (filter by status/agent) GET /api/tasks/{id}Get specific task POST /api/tasks/{id}/claimClaim task (gaze verification if flagged) POST /api/tasks/{id}/completeComplete task with result DELETE /api/tasks/{id}Cancel task POST /api/tasks/swarmDecompose goal into DAG subtasks via HEDGEHOG GET /api/tasks/statsTask statistics by status
Method Path Description GET /api/configGet config.yaml + .env (secrets redacted) POST /api/configUpdate config (dot-notation keys) GET /api/config/modelGet model/provider config POST /api/config/modelUpdate model configuration
The Tempo Wallet is the OPTX payment and billing layer. Every HEDGEHOG API call (Grok inference) is metered — the caller pays the xAI inference cost plus a $0.08 OPTX margin per call.
Method Path Description POST /api/wallet/tempo/callMetered HEDGEHOG call — pay-per-inference GET /api/wallet/tempo/usageBilling history and totals (per caller) GET /api/wallet/tempo/pricingCurrent pricing and supported models
const response = await fetch ( "/api/wallet/tempo/call" , {
method: "POST" ,
headers: { "Content-Type" : "application/json" },
body: JSON . stringify ({
caller_id: "EFvgELE1Hb4PC5tbPTAe8v1uEDGee8nwYBMCU42bZRGk" ,
model: "grok-4.20-multi-agent-beta-0309" ,
prompt: "Analyze this gaze pattern for authentication" ,
max_tokens: 2048 ,
tools: [ "web_search" ],
}),
});
// Response includes billing receipt
{
"call_id" : "tempo-a1b2c3d4" ,
"result" : { "role" : "assistant" , "content" : "..." },
"usage" : { "prompt_tokens" : 150 , "completion_tokens" : 420 , "total_tokens" : 570 },
"billing" : {
"xai_cost_usd" : 0.00171 ,
"optx_margin_usd" : 0.08 ,
"total_usd" : 0.08171 ,
"token" : "OPTX"
},
"latency_ms" : 1240.5
}
Method Path Description GET /api/walletAgent wallet overview — balances across all chains GET /api/wallet/balancesLive SOL + SPL token balances via Helius RPC
Escrow locks funds when a task is created and releases them on completion. Settlement requires gaze verification via AARON Router.
Method Path Description POST /api/wallet/escrowLock funds for a task reward GET /api/wallet/escrowList escrows (filter by status/task) GET /api/wallet/escrow/{id}Get specific escrow POST /api/wallet/escrow/releaseRelease escrow to recipient (gaze-gated) POST /api/wallet/escrow/{id}/refundRefund locked/expired escrow
Create (locked) → Task Completed → Release (gaze-verified) → On-chain settlement
→ Task Failed → Refund
→ TTL expired → Expired → Refund
Item Cost xAI inference ~$0.003 per 1K tokens (Grok 4.20) OPTX margin $0.08 per call (flat) Payment token $OPTX (Solana devnet) Supported models grok-4.20-multi-agent-beta-0309, grok-4.20-0309-reasoning, grok-4-1-fast-reasoning
Method Path Auth Description GET /healthNone Health check + upstream connectivity GET /api/gateway-statusNone Feature flags and enhanced mode status ALL /v1/*MPP Passthrough proxy to Hermes Agent