How it works
Request a token
- Python
- TypeScript
- cURL
Token lifetimes
The SDK caches tokens, renews them before expiry, and detects revocations via background TRL polling every 15 seconds. You never manage token lifetimes manually.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Get a short-lived access token for your agent.
Agent → Anti AI (client_id + client_secret + scope)
↓ policy check
Issue JWT (signed, expires in 10 min)
↓
Agent ← access_token + expires_in
from oculus_sdk import OculusClient
client = OculusClient(
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
)
token = client.get_token(scope="db:read")
import { OculusClient } from '@oculus/sdk';
const client = new OculusClient({
clientId: 'YOUR_CLIENT_ID',
clientSecret: 'YOUR_CLIENT_SECRET',
});
const token = await client.getToken('db:read');
curl -X POST https://api.antiailabs.com/oauth/token \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET" \
-d "scope=db:read"
| Situation | Lifetime |
|---|---|
| Standard | 10 minutes |
High-risk scopes (*:write, *:delete, *:admin) | 15 minutes max |
| Custom per-agent TTL | 5 minutes to 24 hours |