APISessions
Poll a swap session's state
Fetch the current state of any swap/balance session. Poll until `state` is `settled` (or `failed`).
curl -X GET "https://example.com/agents/v1/sessions/b3d9a1e2-5c4f-4a8b-9e7d-1f2a3b4c5d6e"{
"id": "b3d9a1e2-5c4f-4a8b-9e7d-1f2a3b4c5d6e",
"mode": "oneshot",
"state": "settled",
"ephemeralPubkey": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"walletId": null,
"fromMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"toMint": "So11111111111111111111111111111111111111112",
"amountBaseUnits": "1000000",
"actualOut": "6628113450",
"destinationPubkey": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
"fundingTxSig": "5h7Qw2KQz9oA3nP1cVxYtRb8sLmJ4dE6fGh9kU2wXcZ1aBpQ7rT3vN5mY8sD0fL2gH4jK6lM9nP1qR3sT5uV7w",
"finalTxSig": "5h7Qw2KQz9oA3nP1cVxYtRb8sLmJ4dE6fGh9kU2wXcZ1aBpQ7rT3vN5mY8sD0fL2gH4jK6lM9nP1qR3sT5uV7w",
"attestationPda": "AtStPdaXyZ1111111111111111111111111111111111"
}{
"error": "missing_required_fields"
}Cryptographically private AI inference (Arcium-encrypted, x402-paywalled)
OpenAI-compatible chat completions. The prompt MUST be Arcium-encrypted client-side using `@solrouter/sdk`'s `encryptPrompt()` helper; the encrypted prompt is processed and the response returned encrypted, without Solrouter ever seeing plaintext. Pay-per-call x402 ($0.005 USDC flat per call). For per-token internal-credit billing with an API key, use POST /api/v1/chat/completions instead.
On-chain attestation for a settled session
Once a session settles, fetch its on-chain attestation PDA + a snapshot of the swap (mints, amounts, final tx) with Solscan links.