RunMat
  • Pricing
RunMat
GitHub
GitHub
DownloadSign InTry in Browser
DesktopRuntimeServer
RunMat

Run math blazing fast

GitHubX (Twitter)LinkedIn

Company

  • About
  • Pricing
  • Contact

Explore

  • RunMat for academia
  • RunMat vs MATLAB Online
  • Benchmarks

Get product updates and release notes from the RunMat team.

© 2026 Dystr · Made withfor the scientific community.

RunMat™ is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

LicensePrivacy
/
See all docs
Builtin Reference
    • sendmail
    • urldecode
    • urlencode
    • weboptions
    • webread
    • websave
    • webwrite

websave — Download URL content into a file.

websave downloads an HTTP or HTTPS response to a file and returns the saved filename.

Syntax

filename = websave(filename, url)

Inputs

NameTypeRequiredDefaultDescription
input1AnyYes—First input argument.
input2AnyYes—Second input argument.

Returns

NameTypeDescription
valueAnyResult value.

How websave works

  • Downloads HTTP or HTTPS URL content through the shared RunMat HTTP transport and writes it through the active filesystem provider.
  • The filename and URL are host text values. Native integer and resident numeric values are rejected for these roles.
  • Query names are text. Query values may be text, numeric, or logical scalars or vectors; native integers are formatted exactly and vectors use comma-separated formatting.
  • A final options structure can supply Timeout, UserAgent, and HeaderFields. The default timeout is 5 seconds, and an integer timeout is read exactly.
  • RunMat also recognizes direct Timeout and UserAgent name-value pairs as request options.
  • Rejects unpaired or unsupported option shapes instead of silently ignoring them.

Does RunMat run websave on the GPU?

The request path gathers automatically resident query values through their owning provider. Explicit gpuArray input crosses the websave-explicit-gpu-input extension gate before any gather.

GPU memory and residency

The network request and saved result are host-side. Automatically resident values can gather transparently; explicit gpuArray input requires RunMat mode.

Example

Download a file with a query value

saved = websave("report.json", "https://api.example.com/report", "id", uint64(42))

Using websave with coding agents

Open a RunMat example with live inputs, then ask the agent to explain how websave changes the result.

Run a small websave example, explain the result, then change one input and compare the output.

FAQ

Does websave require a manual gather?⌄

No manual gather is needed for automatically resident query values. Explicit gpuArray input is a named RunMat extension and is rejected before provider access in MATLAB-compatible mode.

Related Io functions

Http

sendmail · urldecode · urlencode · weboptions · webread · webwrite

Net

accept · read · readline · tcpclient · tcpserver · write

Repl Fs

addpath · cd · copyfile · delete · dir · exist · fileattrib · fileparts · fullfile · genpath · getenv · getpref · isenv · isfile · isfolder · ispref · ls · matlabroot · memmapfile · mkdir · movefile · open · opentoline · path · pathsep · pcode · pwd · readstruct · rehash · restoredefaultpath · rmdir · rmpath · run · savepath · setenv · setpref · system · tempdir · tempname · uigetdir · uigetfile · uiputfile · unsetenv · userpath · what · winqueryreg · xmlread · xmlwrite

Tabular

arrayDatastore · csvread · csvwrite · detectImportOptions · dlmread · dlmwrite · fileDatastore · parquetDatastore · parquetinfo · parquetread · readcell · readmatrix · readtable · readtimetable · spreadsheetImportOptions · writecell · writematrix · writetable · writetimetable · xlsread · xlswrite

Audio

audioinfo · audioread

Io

clc · diary · disp · display · format · input

Filetext

fclose · feof · fgetl · fgets · fileread · filewrite · fopen · fprintf · fread · frewind · fwrite · readlines · writelines

Archive

gunzip · gzip · unzip

Hdf5

h5disp · h5info · h5read · h5write · h5writeatt · hdf5info · hdf5read · hdf5write

Import

importdata · textscan

Json

jsondecode · jsonencode

Mat

load · matfile · save

About RunMat

RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 license.

  • RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
  • Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.

Getting started · Benchmarks · Pricing

Download RunMat

Download RunMat for full performance, or use RunMat in your browser for zero setup.

Download RunMatOpen Sandbox
On this page
  • Syntax
  • Inputs
  • Returns
  • How websave works
  • Does RunMat run websave on the GPU?
  • GPU memory and residency
  • Example
  • Download a file with a query value
  • Using websave with coding agents
  • FAQ
  • Related Io functions
  • Http
  • Net
  • Repl Fs
  • Tabular
  • Audio
  • Io
  • Filetext
  • Archive
  • Hdf5
  • Import
  • Json
  • Mat
  • About RunMat