Python API Reference
Source-driven reference for WorldFoundry Core primitives, evaluation contracts, runners, metrics, orchestration, and runtime utilities.
On this page
The Python API is the programmatic form of the same system used by the CLI and Studio. Pages combine a short choice guide with signatures generated from source. Model-specific implementations, vendored upstream code, and benchmark internals stay outside this reference.
Core
Shared attention, I/O, loading, distributed, configuration, and acceleration primitives.
Attention41 Symbols
Configuration9 Symbols
I/O and media56 Symbols
Model loading20 Symbols
Distributed20 Symbols
Inference runtime26 Symbols
Neural net and math37 Symbols
Acceleration and memory26 Symbols
Foundations23 Symbols
Evaluation
Serializable contracts, runners, metrics, orchestration, evidence, and runtime helpers.
Contracts and artifacts7 Symbols
worldfoundry.evaluation.api.ArtifactRefworldfoundry.evaluation.api.enrich_artifact_refworldfoundry.evaluation.api.GenerationRequestworldfoundry.evaluation.api.GenerationResultworldfoundry.evaluation.api.is_generation_result_successfulworldfoundry.evaluation.api.local_path_for_uriworldfoundry.evaluation.api.normalize_generation_status
Models and runners4 Symbols
Metrics and tasks7 Symbols
Runs and benchmarks7 Symbols
worldfoundry.evaluation.public.benchmark_integration_specworldfoundry.evaluation.public.list_video_benchmarksworldfoundry.evaluation.public.normalize_upstream_resultsworldfoundry.evaluation.public.run_benchmarkworldfoundry.evaluation.public.run_worldfoundryworldfoundry.evaluation.public.WorldFoundryRunRequestworldfoundry.evaluation.public.WorldFoundryRunResult
Reporting9 Symbols
worldfoundry.evaluation.reporting.build_env_requirementsworldfoundry.evaluation.reporting.build_environmentworldfoundry.evaluation.reporting.build_markdown_reportworldfoundry.evaluation.reporting.build_run_manifestworldfoundry.evaluation.reporting.build_run_summaryworldfoundry.evaluation.reporting.build_scorecardworldfoundry.evaluation.reporting.write_run_manifest_artifactsworldfoundry.evaluation.reporting.write_run_report_artifactsworldfoundry.evaluation.reporting.write_scorecard
Import policy
Prefer public facades over private modules:
from worldfoundry.evaluation.api import (
ArtifactRef,
GenerationRequest,
GenerationResult,
Metric,
WorldModelRunner,
)
from worldfoundry.evaluation.public import WorldFoundryRunRequest, run_worldfoundry
from worldfoundry.evaluation.reporting import build_scorecard
from worldfoundry.core import scaled_dot_product_attentionworldfoundry.core lazily exports shared primitives. Evaluation contracts live in worldfoundry.evaluation.api, orchestration in worldfoundry.evaluation.public, evidence builders in worldfoundry.evaluation.reporting, and path/asset helpers in worldfoundry.runtime.*.
How pages are built
Signatures, parameters, methods, and source links are regenerated from Python AST during the docs build (no Torch/CUDA import). Choice guides and examples are written by hand.
cd docs/fumadocs
npm run api:generate
npm run api:checkFor workflows beyond signatures, continue to the design guide, inference guide, or evaluation overview.