Skip to content

Download Model

Get a URL to download a Model's checkpoint. Requires a model ID, returned by a Training task.


GET /models/<model_id>/download/url?checkpoint=epoch_num

The checkpoint parameter is optional, if left unspecified the download URL for the last trained epoch's checkpoint is returned. The download URL will remain valid for 1 hour.

Example

from marqtune.client import Client

url = "https://marqtune.marqo.ai"
api_key = "{api_key}"
marqtune_client = Client(url=url, api_key=api_key)

# download the latest checkpoint:
marqtune_client.model("model_id").download()

# download a specific checkpoint:
marqtune_client.model("model_id").download(checkpoint='epoch_1')
curl --location 'https://marqtune.marqo.ai/models/{model_id}/download/url?checkpoint=epoch_1' \
     --header 'x-api-key: {api_key}'

Response: 200 (OK)

Model details returned.

{
  "statusCode": 200,
  "body": {
    "downloadUrl": "download-url"
  }
}

Response: 400 (Invalid Request)

Request path or method is invalid.

{
  "statusCode": 400,
  "body": {
    "message": "Invalid request method"
  }
}

Response: 400 (Invalid format)

Model id format is not UUID

{
  "statusCode": 400,
  "body": {
    "message": "Invalid model id"
  }
}

Response: 401 (Unauthorised)

Unauthorised. Check your API key and try again.

{
  "message": "Unauthorized."
}

Response: 404 (Not found)

Model not found

{
  "statusCode": 404,
  "body": {
    "message": "model not found"
  }
}

Response: 500 (Internal server error)

Internal server error. Check your API key and try again.

{
  "message": "Internal server error."
}