curl --request POST \
--url https://api.skia.money/api/wallets/smart/{address}/session-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"expiryHours": 24,
"dailyLimitEth": "0.001",
"dailyTokenLimit": "250"
}
'import requests
url = "https://api.skia.money/api/wallets/smart/{address}/session-keys"
payload = {
"label": "<string>",
"expiryHours": 24,
"dailyLimitEth": "0.001",
"dailyTokenLimit": "250"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
expiryHours: 24,
dailyLimitEth: '0.001',
dailyTokenLimit: '250'
})
};
fetch('https://api.skia.money/api/wallets/smart/{address}/session-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.skia.money/api/wallets/smart/{address}/session-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'label' => '<string>',
'expiryHours' => 24,
'dailyLimitEth' => '0.001',
'dailyTokenLimit' => '250'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.skia.money/api/wallets/smart/{address}/session-keys"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"expiryHours\": 24,\n \"dailyLimitEth\": \"0.001\",\n \"dailyTokenLimit\": \"250\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.skia.money/api/wallets/smart/{address}/session-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"expiryHours\": 24,\n \"dailyLimitEth\": \"0.001\",\n \"dailyTokenLimit\": \"250\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.skia.money/api/wallets/smart/{address}/session-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"expiryHours\": 24,\n \"dailyLimitEth\": \"0.001\",\n \"dailyTokenLimit\": \"250\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"address": "<string>",
"privateKey": "<string>",
"expiry": "2023-11-07T05:31:56Z",
"dailyLimit": "<string>",
"dailyTokenLimit": "<string>",
"policy": {
"targets": [
"<string>"
],
"selectors": [
"<string>"
],
"makers": [
"<string>"
],
"tokenCaps": [
{
"symbol": "<string>",
"dailyLimit": "<string>"
}
],
"note": "<string>"
}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}Issue an AI-agent session key
Delegated key with expiry + a daily NATIVE cap + per-token 24h outflow caps + a maker allowlist — ALL enforced on-chain in SkiaAccount.validateUserOp on the v4 canonical pin (BUILT 2026-11-15: setSessionMakers binds [canonical relayer]; setSessionTokenCaps binds a cap for EVERY settlement token; _enforceOrderConstraints parses the AirSwap head inside validateUserOp, so the bounds hold even if a client filter broke — session-key-architecture.md §2.1). GENERATION CAVEAT (honest, v0.4.5): deployed fleet factories are v3-generation — v3 accounts enforce SHAPE-ONLY (target + selector + approve-spender guard, SkiaAccount.sol:401-434): no maker allowlist, no token caps on-chain. On v3, “via Skia’s relayer only” holds via OPS COMPOSITION (ops built from server-obtained quotes), not on-chain — a raw-userops session key can fill ANY maker-signed order, including one the key holder made themselves. The v4 repin wave is REQUIRED (fleet blocker, receipted 2026-11-22) and flips this per chain: on v4 the relayer-only property IS contract-expressible via setSessionMakers([relayer]). CORRECTED (R4-3): the server issues swap + swapAnySender selectors ONLY — approve is deliberately excluded (the owner op grants the settlement allowance once), and v4-generation accounts fail closed on session approvals. KNOWN v1.5 LIMITATIONS (documented, not regressed): setSessionPolicy only ever sets rows true — revoke instead of re-granting tighter (a tighter re-grant silently retains the old scope); budget is charged at VALIDATION with no postOp refund (failed swaps burn cap); native dailyLimitEth is NOT an ERC-20 trade-volume cap — the per-token dailyTokenLimit is the token-notional bound. ERC-7562 NOTE: the smoked sponsored userOp went through direct-RPC handleOps — session-budget storage writes during VALIDATION under a real PUBLIC bundler’s rules are still UNTESTED (queued; the one lane that could invalidate the sponsored session path). The privateKey is returned ONCE (TESTNET CUSTODIAL: key material is stored server-side in dev storage too).
curl --request POST \
--url https://api.skia.money/api/wallets/smart/{address}/session-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"expiryHours": 24,
"dailyLimitEth": "0.001",
"dailyTokenLimit": "250"
}
'import requests
url = "https://api.skia.money/api/wallets/smart/{address}/session-keys"
payload = {
"label": "<string>",
"expiryHours": 24,
"dailyLimitEth": "0.001",
"dailyTokenLimit": "250"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
expiryHours: 24,
dailyLimitEth: '0.001',
dailyTokenLimit: '250'
})
};
fetch('https://api.skia.money/api/wallets/smart/{address}/session-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.skia.money/api/wallets/smart/{address}/session-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'label' => '<string>',
'expiryHours' => 24,
'dailyLimitEth' => '0.001',
'dailyTokenLimit' => '250'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.skia.money/api/wallets/smart/{address}/session-keys"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"expiryHours\": 24,\n \"dailyLimitEth\": \"0.001\",\n \"dailyTokenLimit\": \"250\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.skia.money/api/wallets/smart/{address}/session-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"expiryHours\": 24,\n \"dailyLimitEth\": \"0.001\",\n \"dailyTokenLimit\": \"250\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.skia.money/api/wallets/smart/{address}/session-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"expiryHours\": 24,\n \"dailyLimitEth\": \"0.001\",\n \"dailyTokenLimit\": \"250\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"address": "<string>",
"privateKey": "<string>",
"expiry": "2023-11-07T05:31:56Z",
"dailyLimit": "<string>",
"dailyTokenLimit": "<string>",
"policy": {
"targets": [
"<string>"
],
"selectors": [
"<string>"
],
"makers": [
"<string>"
],
"tokenCaps": [
{
"symbol": "<string>",
"dailyLimit": "<string>"
}
],
"note": "<string>"
}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}Authorizations
TESTNET posture: simulated signature bearer — the token is the caller's 0x (address-as-identity; no per-request signature verification). Real EIP-191/EIP-712-verified bearers + SIWE (EIP-4361) sessions for the hosted UI arrive in v1.7.0. The settlement security boundary is the EIP-712 Order signature verified by SwapERC20 on-chain, not this credential. See docs/auth-posture-testnet.md.
Body
HUMAN-units decimal token amount — per-token 24h outflow cap applied to EVERY settlement token (USDC + DAI at their decimals; SessionTokenCap.dailyLimitRaw). v4 (P0-3, BUILT 2026-11-15): the account fails closed on settlement for tokens without a configured cap, so issuance ALWAYS binds caps — a spec-conformant client that omits this field gets the default, never a 400 (SESSION_TOKEN_CAPS_REQUIRED guards the lib entry for direct callers only). v3-generation accounts (current deployed fleet until the repin wave) do NOT enforce caps on-chain.
^\d+(\.\d+)?$Response
Session key issued