Search, provision and manage GPU instances programmatically — and call 300+ models through the same client. Build agents that scale their own compute.
from openlink import OpenLink
ol = OpenLink(api_key="OPENLINK_API_KEY")
# cheapest 8x RTX 5090 on the market right now
offers = ol.search_offers(
query="gpu_name=RTX_5090 num_gpus=8",
order="dph", limit=3,
)
# launch it
job = ol.launch_instance(
offer_id=offers[0]["id"],
image="vllm/vllm-openai:latest",
disk=128, ssh=True,
)
print(job["instance_id"], job["status"]) # 9841205 running
$ pip install openlink
from openlink import OpenLink
ol = OpenLink(api_key="OPENLINK_API_KEY")
pip install openlink ships both the Python SDK and the command-line tool. Python 3.9+, one dependency, no compiled extensions.
from openlink import OpenLink
ol = OpenLink(api_key="...")
# cheapest 8x H200 with real uptime history
offers = ol.search_offers(
query="gpu_name=H200 num_gpus=8 reliability>0.99",
order="dph",
limit=3,
)
# launch with vLLM
job = ol.launch_instance(
offer_id=offers[0]["id"],
image="vllm/vllm-openai:latest",
disk=128,
ssh=True,
env={"HF_TOKEN": os.environ["HF_TOKEN"]},
)
print(f"instance {job['instance_id']} created")
# wait for the box to come up, then stream logs
inst = ol.wait_for(job["instance_id"], status="running", timeout=300)
print(inst["ssh_host"], inst["ssh_port"], inst["dph"])
for line in ol.stream_logs(inst["id"]):
if "loss" in line:
print(line)
# scale out when the queue backs up, and tear down when it drains
if queue.depth() > 500:
ol.launch_instance(offer_id=offers[1]["id"], image=IMAGE)
if queue.empty():
ol.destroy_instance(inst["id"]) # billing stops here
# the same client also fronts 300+ models
resp = ol.chat.completions.create(
model="deepseek/deepseek-v3",
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)
# or pin a routing policy per call
resp = ol.chat.completions.create(
model="qwen/qwen3-235b",
messages=messages,
route={"order": "latency", "fallback": True},
)
# spend, per model, this month
for row in ol.usage(period="month"):
print(row["model"], row["tokens"], row["cost"])
# push a dataset up before the job starts
ol.copy("./data/shard-*.parquet", f"{inst['id']}:/workspace/data/")
# pull checkpoints back down
ol.copy(f"{inst['id']}:/workspace/ckpt/", "./ckpt/")
# or move straight between two instances, no local hop
ol.copy(f"{src['id']}:/workspace/ckpt/",
f"{dst['id']}:/workspace/ckpt/")
# persistent volumes survive instance teardown
vol = ol.create_volume(size_gb=2000, region="US-West")
ol.launch_instance(offer_id=offer["id"], volumes=[vol["id"]])
Build agents that provision their own GPU compute, run the job, and release it. No human in the loop, no dashboard round trip.
Full IDE support — autocomplete, type checking and inline docs. Every response is a typed dict, not an untagged blob.
Every CLI command has an SDK equivalent. Same query syntax, same filters, same field names.
Python 3.9+. No compiled extensions, no wheels to build, nothing to pin around. Installs clean in a slim container.
One OpenAI-compatible endpoint for 300+ models, with routing and failover.
API Gateway →Search GPUs, deploy containers and script the whole workflow from your shell.
OpenLink CLI →A typed client for compute and models. Build agents that scale their own GPUs.
You are hereGet an API key and start building GPU-powered applications.