Skip to main content

Prime Intellect


Prime Intellect CLI & SDKs


PyPI version Python versions Downloads

Command line interface and SDKs for Prime Lab, Hosted Training, GPU resources, sandboxes, and environments.

Overview

Prime is the official CLI and Python SDK for Prime Intellect, providing seamless access to Prime Lab workflows, Hosted Training, GPU compute infrastructure, remote code execution environments (sandboxes), and AI inference capabilities.

What can you do with Prime?

  • Deploy GPU pods with H100, A100, and other high-performance GPUs
  • Set up Lab workspaces for verifiers environments, evals, GEPA, and training
  • Discover and launch Hosted Training runs against verifiers environments
  • Create and manage isolated sandbox environments for running code
  • Access hundreds of pre-configured development environments
  • SSH directly into your compute instances
  • Manage team resources and permissions
  • Run OpenAI-compatible inference requests

Installation

Using uv (recommended)

First, install uv if you haven't already:

curl -LsSf https://astral.sh/uv/install.sh | sh

Then install prime:

uv tool install prime

Using pip

pip install prime

Quick Start

Authentication

# Interactive login (recommended)
prime login

# Or set API key directly
prime config set-api-key

# Or use environment variable
export PRIME_API_KEY="your-api-key-here"

Get your API key from the Prime Intellect Dashboard.

Basic Usage

# Browse environments on the hub
prime env list

# Set up a Lab workspace
prime lab setup

# See available Hosted Training models, capacity, and pricing
prime train models

# Generate and launch a Hosted Training config
prime train init
prime train rl.toml

# List available GPUs
prime availability list

# Create a GPU pod
prime pods create --gpu A100 --count 1

# SSH into a pod
prime pods ssh <pod-id>

# Create a sandbox
prime sandbox create python:3.11

Features

Lab and Hosted Training

Prime Lab connects verifiers environments to evaluations, GEPA prompt optimization, and Hosted Training. Start with prime lab setup to create a local workspace with starter configs, then use prime train models to choose a Hosted Training model with current capacity and pricing.

# Set up a Lab workspace
prime lab setup

# List trainable models, capacity, and token pricing
prime train models

# Generate a Hosted Training config
prime train init

# Launch the run from the generated config
prime train rl.toml

# Inspect and manage Hosted Training runs
prime train list
prime train logs <run-id> -f
prime train metrics <run-id>
prime train checkpoints <run-id>

Environments Hub

Access hundreds of RL environments on our community hub with deep integrations with sandboxes, training, and evaluation stack.

# Browse available environments
prime env list

# View environment details
prime env info <environment-name>

# Inspect environment source without downloading the archive
prime env inspect <environment-name>

# Install an environment locally
prime env install <environment-name>

# Create and push your own environment
prime env init my-environment
prime env push my-environment

Environments provide pre-configured setups for machine learning, data science, and development workflows, tested and verified by the Prime Intellect community.

GPU Pod Management

Deploy and manage GPU compute instances:

# Browse available configurations
prime availability list --gpu-type H100_80GB

# Create a pod with specific configuration
prime pods create --id <config-id> --name my-training-pod

# Monitor pod status
prime pods status <pod-id>

# SSH access
prime pods ssh <pod-id>

# Terminate when done
prime pods terminate <pod-id>

Sandboxes

Isolated environments for running code remotely:

# Create a sandbox (VM-backed by default, public beta)
prime sandbox create python:3.11

# Create a VM sandbox with GPUs
prime sandbox create user-1/vm-image:latest --vm --gpu-count 1 --gpu-type RTX_PRO_6000

# Create a one-shot VM workload (arguments after -- are preserved exactly)
prime sandbox create user-1/vm-image:latest -- /worker --platform linux/amd64

# Opt out to a container sandbox (supports SSH, port exposure, string start commands)
prime sandbox create python:3.11 --container

# List sandboxes
prime sandbox list

# Execute commands
prime sandbox run <sandbox-id> -- python script.py

# Upload/download files
prime sandbox upload <sandbox-id> local_file.py /remote/path/
prime sandbox download <sandbox-id> /remote/file.txt ./local/

# Clean up
prime sandbox delete <sandbox-id>

Team Management

Manage resources across personal and team contexts:

# List your teams
prime teams list

# Switch context directly
prime switch
prime switch personal
prime switch <team-slug>
prime switch <team-id>  # fallback for teams without a slug

# All subsequent commands use the selected context
prime pods list

Configuration

API Key

Multiple ways to configure your API key:

# Option 1: Interactive (hides input)
prime config set-api-key

# Option 2: Direct
prime config set-api-key YOUR_API_KEY

# Option 3: Environment variable
export PRIME_API_KEY="your-api-key"

Configuration priority: CLI config > Environment variable

SSH Key

Configure SSH key for pod access:

prime config set-ssh-key-path ~/.ssh/id_rsa.pub

View Configuration

prime config view

Python SDK

Prime also provides a Python SDK for programmatic access:

from prime_sandboxes import APIClient, SandboxClient, CreateSandboxRequest

# Initialize client
client = APIClient(api_key="your-api-key")
sandbox_client = SandboxClient(client)

# Create a sandbox
sandbox = sandbox_client.create(CreateSandboxRequest(
    name="my-sandbox",
    docker_image="python:3.11-slim",
    cpu_cores=2,
    memory_gb=4,
))

# Wait for creation
sandbox_client.wait_for_creation(sandbox.id)

# Execute commands
result = sandbox_client.execute_command(sandbox.id, "python --version")
print(result.stdout)

# Clean up
sandbox_client.delete(sandbox.id)

Async SDK

import asyncio
from prime_sandboxes import AsyncSandboxClient, CreateSandboxRequest

async def main():
    async with AsyncSandboxClient(api_key="your-api-key") as client:
        sandbox = await client.create(CreateSandboxRequest(
            name="async-sandbox",
            docker_image="python:3.11-slim",
        ))

        await client.wait_for_creation(sandbox.id)
        result = await client.execute_command(sandbox.id, "echo 'Hello'")
        print(result.stdout)

        await client.delete(sandbox.id)

asyncio.run(main())

Use Cases

Machine Learning Training

# Deploy a pod with 8x H100 GPUs
prime pods create --gpu H100 --count 8 --name ml-training

# SSH and start training
prime pods ssh <pod-id>

Support & Resources

Related Packages

  • prime-sandboxes - Lightweight SDK for sandboxes only (if you don't need the full CLI)

License

MIT License - see LICENSE file for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prime-0.6.23.tar.gz (732.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prime-0.6.23-py3-none-any.whl (484.7 kB view details)

Uploaded Python 3

File details

Details for the file prime-0.6.23.tar.gz.

File metadata

  • Download URL: prime-0.6.23.tar.gz
  • Upload date:
  • Size: 732.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for prime-0.6.23.tar.gz
Algorithm Hash digest
SHA256 3201b54097dc519f593cdbe6b3884e4881d5c58cb0b4b7048ae26477933caf17
MD5 658484c454403d9d260d8648a2b9dcbb
BLAKE2b-256 e7868a3df6970e2410d1835ea53a6ba3f9a0abe0ddac913285b6eb726c9e6160

See more details on using hashes here.

Provenance

The following attestation bundles were made for prime-0.6.23.tar.gz:

Publisher: release-prime.yml on PrimeIntellect-ai/prime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prime-0.6.23-py3-none-any.whl.

File metadata

  • Download URL: prime-0.6.23-py3-none-any.whl
  • Upload date:
  • Size: 484.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for prime-0.6.23-py3-none-any.whl
Algorithm Hash digest
SHA256 efe2a191168084e0ba7095c5286a2200a44ceedc3396892f61aa9411f58ff4f1
MD5 6a7152da534555ca62d9d7b114ad8a49
BLAKE2b-256 b6a5ee6fe93012dcd276bd88c1a83ba510f915603d7f9a9a5987108a07ccdb48

See more details on using hashes here.

Provenance

The following attestation bundles were made for prime-0.6.23-py3-none-any.whl:

Publisher: release-prime.yml on PrimeIntellect-ai/prime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.6.26

2 files

0.6.25

2 files

0.6.24

2 files

This release

0.6.23 This release

2 files

0.6.22

2 files

0.6.21

2 files

0.6.20

2 files

0.6.19

2 files

0.6.18

2 files

0.6.17

2 files

0.6.16

2 files

0.6.15

2 files

0.6.14

2 files

0.6.13

2 files

0.6.12

2 files

0.6.11

2 files

0.6.10

2 files

0.6.9

2 files

0.6.8

2 files

0.6.7

2 files

0.6.6

2 files

0.6.5

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.82

2 files

0.5.81

2 files

0.5.80

2 files

0.5.79

2 files

0.5.78

2 files

0.5.77

2 files

0.5.76

2 files

0.5.75

2 files

0.5.74

2 files

0.5.73

2 files

0.5.72

2 files

0.5.71

2 files

0.5.70

2 files

0.5.69

2 files

0.5.68

2 files

0.5.67

2 files

0.5.66

2 files

0.5.65

2 files

0.5.64

2 files

0.5.63

2 files

0.5.62

2 files

0.5.61

2 files

0.5.60

2 files

0.5.59

2 files

0.5.58

2 files

0.5.57

2 files

0.5.56

2 files

0.5.55

2 files

0.5.54

2 files

0.5.53

2 files

0.5.52

2 files

0.5.51

2 files

0.5.50

2 files

0.5.49

2 files

0.5.48

2 files

0.5.47

2 files

0.5.46

2 files

0.5.45

2 files

0.5.44

2 files

0.5.43

2 files

0.5.42

2 files

0.5.41

2 files

0.5.40

2 files

0.5.39

2 files

0.5.38

2 files

0.5.37

2 files

0.5.36

2 files

0.5.35

2 files

0.5.34

2 files

0.5.33

2 files

0.5.32

2 files

0.5.31

2 files

0.5.30

2 files

0.5.29

2 files

0.5.28

2 files

0.5.27

2 files

0.5.26

2 files

0.5.25

2 files

0.5.24

2 files

0.5.23

2 files

0.5.22

2 files

0.5.21

2 files

0.5.20

2 files

0.5.19

2 files

0.5.18

2 files

0.5.17

2 files

0.5.16

2 files

0.5.15

2 files

0.5.14

2 files

0.5.13

2 files

0.5.12

2 files

0.5.11

2 files

0.5.10

2 files

0.5.9

2 files

0.5.8

2 files

0.5.7

2 files

0.5.6

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.12

1 file

0.4.11

1 file

0.4.10

1 file

0.4.9

1 file

0.4.8

1 file

0.4.7

1 file

0.4.6

1 file

0.4.5

1 file

0.4.4

1 file

0.4.3

1 file

0.4.2

1 file

0.4.1

1 file

0.4.0

1 file

0.3.46

2 files

0.3.45

2 files

0.3.44

2 files

0.3.43

2 files

0.3.42

2 files

0.3.41

2 files

0.3.40

2 files

0.3.39

2 files

0.3.38

2 files

0.3.37

2 files

0.3.36

2 files

0.3.35

2 files

0.3.34

2 files

0.3.33

2 files

0.3.32

2 files

0.3.31

2 files

0.3.30

2 files

0.3.29

2 files

0.3.28

2 files

0.3.27

2 files

0.3.26

2 files

0.3.25

2 files

0.3.24

2 files

0.3.23

2 files

0.3.22

2 files

0.3.21

2 files

0.3.20

2 files

0.3.19

2 files

0.3.18

2 files

0.3.17

2 files

0.3.16

2 files

0.3.15

2 files

0.3.14

2 files

0.3.13

2 files

0.3.12

2 files

0.3.11

2 files

0.3.10

2 files

0.3.9

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page