Skip to main content
POST
/
v1
/
messages
curl --request POST \
  --url https://api.neyrs.cloud/v1/messages \
  --header 'Authorization: Bearer pixie_live_abc123def456' \
  --header 'Content-Type: application/json' \
  --data '{
    "sessionId": "session_abc123def456",
    "message": "Swap 5 SOL for USDC",
    "slippage": 50
  }'
{
  "messageId": "msg_abc123def456",
  "sessionId": "session_abc123def456",
  "intent": {
    "action": "swap",
    "confidence": 0.98
  },
  "response": "I'll swap 5 SOL for USDC. Expected output: ~736.25 USDC with 0.12% price impact via Orca Whirlpool.",
  "transaction": {
    "type": "swap",
    "parameters": {
      "inputToken": "So11111111111111111111111111111111111111112",
      "outputToken": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "amount": 5000000000
    },
    "route": {
      "inAmount": "5000000000",
      "outAmount": "736250000",
      "priceImpact": 0.12
    }
  },
  "timestamp": "2024-03-08T14:30:00Z"
}

Authorization

Authorization
string
required
Bearer token. Format: Bearer pixie_live_abc123def456

Body Parameters

sessionId
string
required
Session ID. Format: session_<16 chars>
message
string
required
Natural language command. Max 500 characters.Examples: “Swap 5 SOL for USDC”, “Show my balance”
slippage
number
Slippage tolerance in basis points. Default: 50 (0.5%)

Response

messageId
string
Unique message identifier
sessionId
string
Session identifier
intent
object
Parsed intent from messageProperties:
  • action (string): Action type (swap, transfer, query)
  • confidence (number): Parsing confidence (0-1)
response
string
Agent response text
transaction
object
Transaction details (if applicable)Properties:
  • type (string): Transaction type
  • parameters (object): Transaction parameters
  • route (object): Routing information
timestamp
string
ISO 8601 timestamp
curl --request POST \
  --url https://api.neyrs.cloud/v1/messages \
  --header 'Authorization: Bearer pixie_live_abc123def456' \
  --header 'Content-Type: application/json' \
  --data '{
    "sessionId": "session_abc123def456",
    "message": "Swap 5 SOL for USDC",
    "slippage": 50
  }'
{
  "messageId": "msg_abc123def456",
  "sessionId": "session_abc123def456",
  "intent": {
    "action": "swap",
    "confidence": 0.98
  },
  "response": "I'll swap 5 SOL for USDC. Expected output: ~736.25 USDC with 0.12% price impact via Orca Whirlpool.",
  "transaction": {
    "type": "swap",
    "parameters": {
      "inputToken": "So11111111111111111111111111111111111111112",
      "outputToken": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "amount": 5000000000
    },
    "route": {
      "inAmount": "5000000000",
      "outAmount": "736250000",
      "priceImpact": 0.12
    }
  },
  "timestamp": "2024-03-08T14:30:00Z"
}