HTTP API Endpoints
When aiperf profile is launched with --api-port <PORT> (or AIPERF_API_SERVER_PORT is set), AIPerf starts an in-process FastAPI server alongside the benchmark and exposes HTTP and Prometheus endpoints for the lifetime of the run. The server is opt-in — if --api-port is not set, no listener is created.
--api-host (default 127.0.0.1) controls the bind address; pass --api-host 0.0.0.0 to expose externally (e.g. in Kubernetes).
The router classes that back these routes live under src/aiperf/api/routers/ and are loaded via the api_router plugin category in plugins.yaml.
Endpoints
Breaking change: /api/progress phases keys
ProgressResponse.phases is keyed by each phase’s concrete name (CombinedPhaseStats.phase_name), falling back to the plain CreditPhase value (e.g. "profiling") only when the phase has no explicit name. Prior releases keyed this dict by the closed CreditPhase enum, so progress["phases"]["profiling"] was always a valid lookup. DAG/multi-instance phases now carry user-assigned names, so that fixed lookup can silently miss. Consumers should iterate phases.values() and match on each entry’s phase field instead of indexing by a hardcoded CreditPhase string.
Secret redaction
cli_command is captured from sys.argv at BenchmarkRun construction and redacted by build_cli_command() before it is stored — so the string returned from /api/run and written to profile_export_aiperf.json is the same redacted form. --api-key-shaped flags, credential-bearing --header values (e.g. Authorization: Bearer …), and userinfo embedded in URL-typed flags (--url, -u, --otel-url, --mlflow-tracking-uri) are all scrubbed to <redacted>.
/api/config independently excludes endpoint.api_key from its response.