# Spraay Gateway Session Auth

> Spraay Gateway Session Auth is a paid API for AI agents from gateway.spraay.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Creates an authenticated session with scoped permissions for a given wallet address, returning a token valid for a specified duration.

## Facts

- Endpoint: POST https://gateway.spraay.app/api/v1/auth/session
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/spraay-gateway-session-auth-d3982c5f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kbwWqI_2M8tWr9pX25C57

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability spraay-gateway-session-auth-d3982c5f -d '<json body>'
```

Example prompt: Create an authenticated session on the Spraay gateway for wallet address 0xAbC123... with a 3600-second TTL and permissions for payroll and inference, so I can start making API calls.

## When to prefer this

Use this endpoint as the first step before calling any other Spraay gateway API that requires authentication. It is the canonical session-creation mechanism for the Spraay ecosystem, producing scoped tokens that gate access to payroll, inference, email, sanctions screening, and RPC endpoints on the same gateway.

## Known failure modes

- Invalid or malformed wallet address returns a 400 error
- Unsupported or unrecognized permission scopes may be rejected
- TTL value out of acceptable range returns validation error
- Expired or revoked session if used after TTL has elapsed
- Payment failure (x402) if USDC balance is insufficient or not pre-authorized

## How this service works

Create authenticated session with scoped permissions.

## Output

Returns a session token or credential object scoped to the specified permissions, valid for the requested TTL. The agent can use this token to authenticate subsequent calls to other Spraay gateway endpoints without re-authorizing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "address": {
   "type": "string"
  },
  "ttlSeconds": {
   "type": "number"
  },
  "permissions": {
   "type": "array"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/spraay-gateway-session-auth-d3982c5f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.spraay.app](https://www.zero.xyz/host/gateway.spraay.app/llms.txt)
