Overview
The Dashboard API provides aggregated data for the web dashboard UI. All endpoints require dashboard authentication.
These endpoints are used by the Codex-LB web interface. They return data optimized for dashboard display.
GET /api/dashboard/overview
Get dashboard overview statistics including account counts, usage summary, and recent activity.
Authentication
Requires valid dashboard session cookie.
Response
Account statistics by status Number of active accounts
Number of paused accounts
Number of rate-limited accounts
Number of quota-exceeded accounts
Number of deactivated accounts
Usage statistics for the current billing period Total tokens used across all accounts
Total number of proxy requests in the last 24 hours
Percentage of failed requests (0-100)
Example Request
curl http://localhost:2455/api/dashboard/overview \
-H "Cookie: dashboard_session=<session_id>"
const response = await fetch ( 'http://localhost:2455/api/dashboard/overview' , {
credentials: 'include'
});
const data = await response . json ();
console . log ( data . accountCounts );
import requests
response = requests.get(
'http://localhost:2455/api/dashboard/overview' ,
cookies = { 'dashboard_session' : session_id}
)
print (response.json())
Example Response
{
"accountCounts" : {
"total" : 5 ,
"active" : 3 ,
"paused" : 1 ,
"rateLimited" : 0 ,
"quotaExceeded" : 1 ,
"deactivated" : 0
},
"usageSummary" : {
"totalTokens" : 125000 ,
"totalCost" : 2.45 ,
"inputTokens" : 75000 ,
"outputTokens" : 50000
},
"requestCount" : 342 ,
"errorRate" : 2.3
}
GET /api/models
Get a simplified list of available models for dashboard display.
This endpoint returns a simplified model list. For full model metadata including capabilities and rate limits, use /v1/models or /backend-api/codex/models.
Authentication
Requires valid dashboard session cookie.
Response
Array of available models Model identifier (e.g., "gpt-5.3-codex")
Human-readable model name (e.g., "GPT-5.3 Codex")
Example Request
curl http://localhost:2455/api/models \
-H "Cookie: dashboard_session=<session_id>"
Example Response
{
"models" : [
{
"id" : "gpt-5.3-codex" ,
"name" : "GPT-5.3 Codex"
},
{
"id" : "gpt-5.3-codex-spark" ,
"name" : "GPT-5.3 Codex Spark"
},
{
"id" : "gpt-4o-mini" ,
"name" : "GPT-4o Mini"
},
{
"id" : "o3-pro" ,
"name" : "o3 Pro"
}
]
}
Use Cases
Dashboard Home Page
Display key metrics on the dashboard landing page:
const DashboardHome = () => {
const [ overview , setOverview ] = useState ( null );
useEffect (() => {
fetch ( '/api/dashboard/overview' , { credentials: 'include' })
. then ( res => res . json ())
. then ( data => setOverview ( data ));
}, []);
if ( ! overview ) return < Loading />;
return (
< div >
< h1 > Dashboard Overview </ h1 >
< MetricCard
title = "Active Accounts"
value = {overview.accountCounts. active }
total = {overview.accountCounts. total }
/>
< MetricCard
title = "Total Tokens (24h)"
value = {overview.usageSummary.totalTokens.toLocaleString()}
/>
< MetricCard
title = "Total Cost (24h)"
value = { `$ ${ overview . usageSummary . totalCost . toFixed ( 2 ) } ` }
/>
</ div >
);
};
Model Selection Dropdown
Populate a model selector in API key creation forms:
const ModelSelector = () => {
const [ models , setModels ] = useState ([]);
useEffect (() => {
fetch ( '/api/models' , { credentials: 'include' })
. then ( res => res . json ())
. then ( data => setModels ( data . models ));
}, []);
return (
< select name = "allowedModels" multiple >
{ models . map ( model => (
< option key = {model. id } value = {model. id } >
{ model . name }
</ option >
))}
</ select >
);
};
Error Codes
Code Status Description authentication_required401 Dashboard session invalid or expired totp_required401 TOTP verification needed (if enabled)
Dashboard Auth - Authentication for dashboard endpoints
Accounts - Detailed account management
Usage - Detailed usage statistics
Models - Full model metadata endpoint