Skip to content
Get started

Download

models.download(strmodel_id, ModelDownloadParams**kwargs) -> ModelDownloadResponse
POST/models/{modelId}/download

Request a link to download the given modelId

ParametersExpand Collapse
model_id: str
dry_run: Optional[Literal["true", "api"]]

Estimate the operation instead of running it: the call returns a 269 response carrying the creative units cost. api estimates at the API tier.

One of the following:
"true"
"api"
project_id: Optional[str]

The projectId used for ownership resource management. Either to assert ownership or to set the owner of the resource(s)

model_epoch: Optional[str]

The epoch hash of the model to download Only available for Flux Lora Trained models with epochs Will only apply to the main model in the download request If not set, the default (latest or setup at model level) epoch will be used

ReturnsExpand Collapse
class ModelDownloadResponse:
job_id: str

The job id associated with the download request

Download

import os
from scenario_sdk import Scenario

client = Scenario(
    api_key=os.environ.get("SCENARIO_SDK_API_KEY"),  # This is the default and can be omitted
    api_secret=os.environ.get("SCENARIO_SDK_API_SECRET"),  # This is the default and can be omitted
)
response = client.models.download(
    model_id="modelId",
)
print(response.job_id)
{
  "jobId": "jobId"
}
Returns Examples
{
  "jobId": "jobId"
}