@extends('layouts.admin') @section('title', 'API Keys') @section('content')

API Keys

Manage Bearer tokens for the Step 1 API (/api/v1/*). Each token is scoped read-only and can be revoked independently.

@if (session('new_api_token'))
New token — copy now: {{ session('new_api_token') }}
@endif

Issue new token

@csrf

Active and revoked tokens

@forelse ($tokens as $token) @empty @endforelse
Name Prefix Scopes Usage Limits Status Last used Created Action
{{ $token->name }} {{ $token->token_prefix }}… @foreach ($token->scopes ?? [] as $scope) {{ $scope }} @endforeach {{ number_format($token->monthly_usage_count) }} / {{ number_format($token->monthly_ceiling) }} this month
{{ number_format($token->search_logs_count) }} logged calls
@if ($token->isRevoked()) {{ number_format($token->monthly_ceiling) }}/month
{{ $token->rate_limit_per_minute }}/min @else
@csrf @method('PATCH')
@endif
@if ($token->isRevoked()) Revoked @elseif ($token->isExpired()) Expired @else Active @endif {{ $token->last_used_at?->diffForHumans() ?? '—' }} {{ $token->created_at?->format('Y-m-d') }} @if ($token->createdBy)
{{ $token->createdBy->name }} @endif
@if (!$token->isRevoked())
@csrf
@else {{ $token->revoked_at?->format('Y-m-d H:i') }} @endif
No API tokens yet. Generate one above.
@endsection