> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.vellum.ai/developers/client-sdk/workflows/pull/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.vellum.ai/_mcp/server. # Pull Workflow GET https://predict.vellum.ai/v1/workflows/{id}/pull Used to pull the definition of a Workflow from Vellum. Returns a zip archive of the Workflow's code by default, or a flattened plain-text representation if the Accept header is set to 'text/plain'. Reference: https://docs.vellum.ai/developers/client-sdk/workflows/pull ## Authentication - `X-API-KEY` header (required) — API Key authentication via header ## Request ### Path parameters - `id` (string, required) — The ID or name of the Workflow Deployment, or the ID of the Workflow Sandbox, to pull from. ### Query parameters - `exclude_code` (boolean, optional) — If true, omit the Workflow's code from the response. - `exclude_display` (boolean, optional) — If true, omit UI display metadata files when pulling from a Workflow Sandbox. - `include_json` (boolean, optional) — If true, include a JSON representation of the Workflow's definition alongside its code. - `include_sandbox` (boolean, optional) — If true, include the Workflow Sandbox's scenarios as sandbox inputs when pulling from a Workflow Sandbox. - `release_tag` (string, optional) — Release tag to use when pulling from deployment (implies deployment-only lookup) - `strict` (boolean, optional) — If true, fail on any code generation error instead of returning best-effort code. - `version` (string, optional) — Semantic version range to validate against the Workflow SDK version (e.g., '>=1.0.0,\<1.2.3') ## Response ### 200 - File download. ## Errors ### 400 Bad Request Error - `map from string to any` ## Examples **SDK Code** ```python import requests url = "https://predict.vellum.ai/v1/workflows/id/pull" headers = {"X-API-KEY": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://predict.vellum.ai/v1/workflows/id/pull'; const options = {method: 'GET', headers: {'X-API-KEY': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://predict.vellum.ai/v1/workflows/id/pull" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://predict.vellum.ai/v1/workflows/id/pull") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["X-API-KEY"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://predict.vellum.ai/v1/workflows/id/pull") .header("X-API-KEY", "") .asString(); ``` ```php request('GET', 'https://predict.vellum.ai/v1/workflows/id/pull', [ 'headers' => [ 'X-API-KEY' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://predict.vellum.ai/v1/workflows/id/pull"); var request = new RestRequest(Method.GET); request.AddHeader("X-API-KEY", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["X-API-KEY": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://predict.vellum.ai/v1/workflows/id/pull")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```