Skip to main content
These methods wrap common multi-step patterns into single API calls. Under the hood, they create and run specialized workflows.

login

Automate logging into a website using stored credentials. This creates a login workflow, executes it, and optionally waits for completion.
const result = await skyvern.login({
  credential_type: "skyvern",
  credential_id: "cred_abc123",
  url: "https://app.example.com/login",
  waitForCompletion: true,
});
console.log(result.status);

Parameters

ParameterTypeRequiredDefaultDescription
credential_typeCredentialTypeYesHow credentials are stored. Options: "skyvern", "bitwarden", "1password", "azure_vault".
urlstringNoundefinedThe login page URL.
credential_idstringNoundefinedThe Skyvern credential ID (when using "skyvern" type).
promptstringNoundefinedAdditional instructions for the AI during login.
browser_session_idstringNoundefinedRun login inside an existing browser session.
browser_addressstringNoundefinedConnect to a browser at this CDP address.
proxy_locationProxyLocationNoundefinedRoute browser traffic through a geographic proxy.
webhook_urlstringNoundefinedURL to receive a POST when the login finishes.
totp_identifierstringNoundefinedIdentifier for TOTP verification.
totp_urlstringNoundefinedURL to receive TOTP codes.
extra_http_headersRecord<string, string>NoundefinedAdditional HTTP headers.
max_screenshot_scrolling_timesnumberNoundefinedNumber of screenshot scrolls.
waitForCompletionbooleanNofalseBlock until the login finishes.
timeoutnumberNo1800Max wait time in seconds.
Bitwarden-specific parameters:
ParameterTypeDescription
bitwarden_collection_idstringBitwarden collection ID.
bitwarden_item_idstringBitwarden item ID.
1Password-specific parameters:
ParameterTypeDescription
onepassword_vault_idstring1Password vault ID.
onepassword_item_idstring1Password item ID.
Azure Key Vault-specific parameters:
ParameterTypeDescription
azure_vault_namestringAzure Key Vault name.
azure_vault_username_keystringSecret name for the username.
azure_vault_password_keystringSecret name for the password.
azure_vault_totp_secret_keystringSecret name for the TOTP secret.

Returns WorkflowRunResponse

Example: Login then extract data

const session = await skyvern.createBrowserSession({});

// Login
await skyvern.login({
  credential_type: "skyvern",
  credential_id: "cred_abc123",
  url: "https://app.example.com/login",
  browser_session_id: session.browser_session_id,
  waitForCompletion: true,
});

// Now extract data from the authenticated session
const result = await skyvern.runTask({
  body: {
    prompt: "Go to the billing page and extract all invoices",
    browser_session_id: session.browser_session_id,
  },
  waitForCompletion: true,
});
console.log(result.output);

downloadFiles

Navigate to a page and download files.
const result = await skyvern.downloadFiles({
  navigation_goal: "Download the latest monthly report PDF",
  url: "https://app.example.com/reports",
  waitForCompletion: true,
});

for (const f of result.downloaded_files ?? []) {
  console.log(f.name);
}

Parameters

ParameterTypeRequiredDefaultDescription
navigation_goalstringYesNatural language description of what to download.
urlstringNoundefinedStarting page URL.
browser_session_idstringNoundefinedRun inside an existing browser session.
browser_profile_idstringNoundefinedLoad a browser profile.
proxy_locationProxyLocationNoundefinedRoute through a geographic proxy.
webhook_urlstringNoundefinedURL to receive a POST when the download finishes.
download_suffixstringNoundefinedExpected file extension to wait for (e.g., ".pdf").
download_timeoutnumberNoundefinedMax time to wait for the download in seconds.
max_steps_per_runnumberNoundefinedCap AI steps.
extra_http_headersRecord<string, string>NoundefinedAdditional HTTP headers.
waitForCompletionbooleanNofalseBlock until the download finishes.
timeoutnumberNo1800Max wait time in seconds.

Returns WorkflowRunResponse

The downloaded_files field contains the list of files that were downloaded.
Unlike the Python SDK where download_files does not support wait_for_completion, the TypeScript SDK supports waitForCompletion on all methods including downloadFiles.

uploadFile

Upload a file to Skyvern’s storage. Returns a presigned URL and S3 URI you can reference in tasks and workflows.
import fs from "fs";

const upload = await skyvern.uploadFile({
  file: fs.createReadStream("data.csv"),
});
console.log(upload.s3_uri);        // s3://skyvern-uploads/...
console.log(upload.presigned_url); // https://...signed download URL

Parameters

ParameterTypeRequiredDescription
fileFile | ReadStream | BlobYesThe file to upload.

Returns UploadFileResponse

FieldTypeDescription
s3_uristringS3 URI for the uploaded file.
presigned_urlstringPre-signed download URL.