AutoML Station API

We provide a comprehensible Web API to download datasets and models.

Example Terminal code using curl.

Paste this into any Unix or Windows WFL terminal.

TOKEN="your-token-here"
curl -H "Authorization: Bearer $TOKEN" \
https://marketplace.amlstation.com/api/v1/datasets/5/download > amlstation.zip
Language:shell

Example Notebook code.

Paste this into a new cell from any environment such as Jupyter Notebook, Jupyterlab, Colab or Paperspace.

!pip3 install requests
import requests

headers = {
    'Authorization': 'Bearer your-token-here',
}
dataset_url = 'https://marketplace.amlstation.com/api/v1/datasets/5/download'
request = requests.get(dataset_url, headers=headers)
with open('dataset.zip', 'wb') as f:
    f.write(request.content)
Language:python

Example Python code.

Paste this into any .py file after installing the necessary dependencies.

1. Create a virtual environment.

python3 -m venv .venv
source .venv/bin/activate
Language:shell

2. Install requests library.

pip3 install requests
Language:shell

3. Run the python code.

# download.py

import requests

headers = {
    'Authorization': 'Bearer your-token-here',
}
dataset_url = 'https://marketplace.amlstation.com/api/v1/datasets/5/download'
request = requests.get(dataset_url, headers=headers)
with open('dataset.zip', 'wb') as f:
    f.write(request.content)
Language:python
© 2024 All rights reserved