curl -X POST https://api.dev.u1.archetypeai.app/v0.5/lens/sessions/destroy \ -H "Authorization: Bearer $ATAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "session_id": "lsn-250313c2177253cbaa7a73542edd90" }'
{ "session_id": "lsn-2512078e5c9ce4d312a6681e771542", "lens_id": "lns-test-lens-3de60a5c", "last_update_timestamp": 1765095462.576972, "session_status": "SESSION_STATUS_STALE", "session_endpoint": "wss://api.dev.u1.archetypeai.app/v0.5/lens/sessions/lsn-2512078e5c9ce4d312a6681e771542", "session_duration_sec": 53.79125928878784 }
Destroy an active lens session and free up resources
Bearer $ATAI_API_KEY
try: # Create and use session session = create_session(lens_id) process_data(session) finally: # Always destroy the session destroy_session(session['session_id'])
Was this page helpful?