Registry / ai-ml / scaleapi

scaleapi

JSON →
library2.18.4pypypi✓ verified 83d ago

The official Python client library for Scale AI, the Data Platform for AI. Provides programmatic access to Scale's APIs for creating tasks, managing batches, datasets, and more. Current version is 2.18.4, with active development and a new v2 API client. Release cadence is roughly monthly.

pip install scaleapi
INSTALL
IMPORT
SIG · SCALEAPI
S
scaleapi
ai-mlpythonv2.18.4
Install
4.1s avg
Import
2506ms
Disk
32MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.18.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 2.588s · 34MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.1s · import 2.424s · 34MB
32MB installed
● package 32MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ScaleClient
import scaleapi client = scaleapi.ScaleClient('api_key')
from scaleapi import client
The SDK does not provide a direct 'client' import. Use 'scaleapi.ScaleClient'.
ScaleClient
from scaleapi import ScaleClient client = ScaleClient('api_key')
from scaleapi import ScaleClient as Client
Common alias is fine, but be careful not to shadow built-in.

Initialize client with API key from environment variable and list projects.

import os import scaleapi api_key = os.environ.get('SCALE_API_KEY', '') client = scaleapi.ScaleClient(api_key) # List your projects for project in client.get_projects(): print(project.name, project.type)
Debug
Known issues
breakingStarting v2.16.0, Python 3.7 support is dropped. Requires Python >= 3.8.
fix
Upgrade Python to 3.8 or later.
affects: >=2.16.0
gotchaThe v2 client (client.v2) uses different methods than the v1 client. For example, create_task is not available under v2; use v2_create_task or the respective v2 endpoint.
fix
Check the v2 API docs: https://docs.genai.scale.com/v2.
affects: >=2.16.0
deprecatedThe method 'get_tasks' without pagination helper is deprecated. Use 'get_tasks' with parameters or 'v2.get_tasks' for paginated results.
fix
Use 'client.get_tasks(project_name=..., batch_name=..., limit=..., offset=...)' or 'client.v2.get_tasks(...)'.
affects: >=2.16.0
gotchaAPI key must be passed as a string. Passing None or empty string gives a 401 Unauthorized error on first request.
fix
Ensure the environment variable is set and non-empty. For local testing, set SCALE_API_KEY explicitly.
affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'ScaleClient' from 'scaleapi'
The module scaleapi may be outdated or installed incorrectly. Check that the package is installed and you're using the correct import path.
fix
Run 'pip install --upgrade scaleapi' and then use 'import scaleapi; client = scaleapi.ScaleClient(...)'.
scaleapi.exceptions.ScaleUnauthorized: 401 Client Error: Unauthorized for url: https://api.scale.com/v1/projects
API key is invalid, missing, or expired.
fix
Set the SCALE_API_KEY environment variable to a valid Scale API key. Generate a new key if needed.
TypeError: 'module' object is not callable
The user tried to call 'scaleapi()' instead of 'scaleapi.ScaleClient()'.
fix
Use 'scaleapi.ScaleClient(api_key)' to create a client instance.
AttributeError: module 'scaleapi' has no attribute 'v2'
You are using a version older than 2.16.0 which does not have the v2 client.
fix
Upgrade to scaleapi >= 2.16.0 with 'pip install --upgrade scaleapi'.
Upgrade
Version history
2.18.4latest on PyPI · released Apr 24, 2026
Audit
Dependencies
requestsrequiredHTTP client for API calls
python-dateutilrequiredDate parsing
urllib3requiredHTTP connection pooling
Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
scaleapi — pip install scaleapi · libregistry