Skip to main content
torch.js has not been released yet.
torch.js logotorch.js logotorch.js
PlaygroundContact
Login
Documentation
IntroductionType SafetyTensor ExpressionsTensor IndexingEinsumEinopsAutogradTraining a ModelProfiling & MemoryPyTorch MigrationBest PracticesRuntimesPerformancePyTorch CompatibilityBenchmarksDType Coverage
torch.js· 2026
LegalTerms of UsePrivacy Policy
/
/
  1. docs
  2. Spark
  3. spark
  4. getBaseUrl

spark.getBaseUrl

function getBaseUrl(): string

Get the current base URL.

Returns the configured base URL used for all file operations. By default, this is https://torchjs.org.

Returns

string– Current base URL string

Examples

const url = spark.getBaseUrl();
console.log('Loading from:', url);

See Also

  • setBaseUrl - Configure the base URL
Previous
existsLocal
Next
getLocalStorageInfo