How to Rent a GPU for AI: What Your First Run Could Cost

Renting a GPU for AI lets you run a model on somebody else’s hardware without buying a graphics card. But the advertised hourly price is only part of the cost: you may also pay while downloading the model, installing software, waiting for an instance, or leaving storage attached after the work is finished.
For example, Runpod’s public pricing page, checked December 1, 2026, listed an NVIDIA RTX 3090 at $0.50 an hour and an RTX 4090 at $0.89 an hour. Both have 24 GB of video memory. A 30-minute session costs about $0.25 or $0.45 respectively for compute alone. The cheaper card is not automatically the cheaper way to finish a job.
Evidence note: This guide uses published rental rates and original cost calculations. Example durations are illustrative planning assumptions, not measured performance or actual invoices. The walkthrough is documentation-based, not a hands-on review.
Table of Contents
How much does it cost to rent a GPU for AI?
Cloud GPU platforms rent you access to a remote machine with one or more graphics processors. A dedicated on-demand instance is useful for experimenting with your own model, Python packages and files. Hosted APIs instead charge for using a deployed model, often by tokens or requests, without requiring you to maintain a machine.
These example rates come from the same Runpod public pricing page, not from live availability in a signed-in deployment console. Check the exact offer before deploying. All amounts are in US dollars and exclude taxes.
| GPU | VRAM | Hourly compute | 15 minutes | 30 minutes | 60 minutes |
|---|---|---|---|---|---|
| RTX 3090 | 24 GB | $0.50 | $0.125 | $0.250 | $0.500 |
| RTX 4090 | 24 GB | $0.89 | $0.223 | $0.445 | $0.890 |
Runpod’s Pod billing documentation describes second-based compute billing and separate disk charges. Container and volume disks are each listed at $0.10 per allocated GB per month while running. A stopped volume disk is listed at $0.20 per GB per month. Network volumes use a separate rate and billing interval. The documentation also says you need at least one hour’s worth of credits for your selected on-demand configuration before deployment. A required account balance or top-up is not the same as the amount a single job consumes.
RTX 3090 vs RTX 4090: which costs less to finish a job?
Compare the full paid lifetime of each instance rather than the speed of one generated response. At the quoted rates, the 4090 costs 1.78 times as much per hour. Ignoring storage, it needs to complete the entire billed session in less than 56.2% of the 3090’s time to be cheaper. If the 3090 takes 30 minutes, the 4090 needs to finish in under 16 minutes and 51 seconds. That includes time spent waiting with a billable instance running.
For a concrete example, assume each instance has a 20 GB container disk and a 20 GB volume disk, no network volume and no charges after termination. Using 730 hours as an illustrative month, the combined running disk cost is approximately $0.00548 per hour. Actual invoice allocation and rounding may differ.
| Hypothetical scenario | 3090 billed time | 4090 billed time | 3090 estimated total | 4090 estimated total | Lower estimate |
|---|---|---|---|---|---|
| Same time | 30 min | 30 min | $0.253 | $0.448 | 3090 |
| Moderate speed advantage | 30 min | 20 min | $0.253 | $0.298 | 3090 |
| Large speed advantage | 30 min | 15 min | $0.253 | $0.224 | 4090 |
These scenarios are not predictions of either card’s performance. They show how much faster a premium GPU must be to justify its rental price. With identical disk allocations, the break-even time is approximately 16 minutes and 56 seconds. To recalculate with your own rates, use:
Estimated session cost = (GPU hourly rate + running disk hourly rate) × billed minutes ÷ 60 + separately billed charges.
Setup overhead changes the economics. Suppose a 3090 spends 10 minutes on setup and 20 minutes on inference; a 4090 spends the same 10 minutes on setup and 10 minutes on inference. Even though inference is twice as fast in this hypothetical case, the 4090’s entire session lasts 20 minutes, and the cheaper 3090 still wins. For a long inference job, fixed setup time becomes a smaller percentage of total time.
Choose a GPU and rental method for your first AI job
Start with video memory (VRAM), then evaluate time and cost. A model with 1.54 billion parameters needs roughly 3.08 GB just for 16-bit weights, before runtime overhead, activations and the key-value cache used during generation. A 24 GB card has ample nominal memory for the weights of the small model in this tutorial, although a lower-cost card with less VRAM may also work. It does not guarantee that every larger model, long context, or training workload will fit.
| What you need | Start with | Why |
|---|---|---|
| A few responses from an available model | Hosted API | No GPU setup; compare token charges |
| Run custom code or a specific model checkpoint | Dedicated GPU rental | Control over weights, software and settings |
| Occasional learning with a small model | Local computer, if it fits | No separate cloud rental bill |
| Repeated large batch jobs | Benchmark two suitable GPU types | Measure cost per completed batch rather than hourly price |
For a first rental, on-demand is simpler than managing a long-term commitment. Avoid putting confidential data or credentials into a test workload, and review the provider’s data protection terms before renting a machine for sensitive work.
Where can you rent a GPU for AI?
| Provider | What to compare | Best starting point |
|---|---|---|
| Runpod | Dedicated Pods, GPU selection, disk pricing | Learning with a preconfigured PyTorch container |
| Vast.ai | Host-specific offers, reliability, storage, network and interruption risk | Price-sensitive workloads with flexible hardware requirements |
| Lambda | Available instance configurations, GPU count and total instance rate | Workloads requiring data-center accelerators or larger instances |
Compare like-for-like offers at checkout, including GPU count, CPU, RAM, storage, region, billing units and any data transfer fees. A marketplace’s cheapest listing is not necessarily the most reliable option. Interruptible rentals may suit jobs that save checkpoints frequently, but a restarted job can erase the apparent savings. For your first short run, predictable on-demand billing is usually easier to manage. The examples below use Runpod; this is not a universal cheapest-provider ranking.
How to rent a GPU for AI: step by step
1. Prepare before you start the billing clock
Choose the open-weight Qwen2.5-1.5B-Instruct model for this example. It is an instruction-tuned text model distributed under Apache 2.0. This workload demonstrates inference (using an existing model), not model training. Have your prompt, script and output destination ready. For repeatable deployments, record the exact model revision and software versions. Set a phone timer before deploying so an abandoned browser tab does not turn into an overnight rental.
2. Launch a single GPU instance
Open the Runpod console, create or sign into your account, and follow the provider’s first-Pod walkthrough. In Pods, choose Deploy, select one RTX 3090, select an appropriate PyTorch template with Jupyter or SSH access, and inspect the region, CPU, RAM, disk allocation and displayed total price. Select on-demand deployment. Record the template image and settings for troubleshooting or repeat use. A 20 GB container and 20 GB workspace are example allocations; increase them if the selected template needs more.
Before clicking Deploy, check the selected offer rather than relying on the headline pricing table: even the two reference offers differ in CPU and RAM. For this small example, start with a single GPU; adding another does not automatically make ordinary Python inference faster.
3. Verify the GPU and software
Connect using the authenticated terminal provided by your template. Run:
nvidia-smi
python -c "import torch; print(torch.__version__); print(torch.cuda.is_available()); print(torch.cuda.get_device_name(0))"
Confirm the expected GPU appears and CUDA is available. If this check fails, troubleshoot the image and device allocation before continuing. The following example pins Transformers 4.48.3 for a compatible PyTorch template; if your template already includes the appropriate version, you can skip installation. The code is illustrative and has not been executed on a rented GPU.
python -m pip install 'transformers==4.48.3'
python -m pip freeze > /workspace/p5m-environment.txt
4. Load the model and generate your first output
The following walkthrough is based on the model card’s Transformers interface. It downloads the public model, generates a short response and writes it to a file. For strict reproducibility, replace the default revision with a specific commit SHA from the model repository.
export HF_HOME=/workspace/p5m-demo-cache
python - <<'PY'
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
name = 'Qwen/Qwen2.5-1.5B-Instruct'
revision = 'main'
tok = AutoTokenizer.from_pretrained(name, revision=revision)
model = AutoModelForCausalLM.from_pretrained(
name, revision=revision, torch_dtype=torch.float16
).to('cuda').eval()
text = tok.apply_chat_template([
{'role': 'user', 'content': 'Explain a GPU in plain English.'}
], tokenize=False, add_generation_prompt=True)
x = tok(text, return_tensors='pt', add_special_tokens=False).to('cuda')
with torch.inference_mode():
y = model.generate(**x, max_new_tokens=128, do_sample=False,
pad_token_id=tok.eos_token_id)
answer = tok.decode(y[0, x['input_ids'].shape[1]:], skip_special_tokens=True)
print(answer)
with open('/workspace/p5m-answer.txt', 'w') as f:
f.write(answer)
PY
The first load downloads model files into your cache and transfers model weights into GPU memory. A second request on the already-loaded model does not repeat that entire process. For a one-off job, cold-start time matters; for an ongoing service, warm throughput and latency may matter more.
5. Save your results and terminate the instance
Download the output and environment details to your own computer before shutting down. Verify that the downloaded files open. Follow the Pod management guide to stop the running instance and then terminate it if you no longer need it. Termination deletes the instance’s local files; separately attached network volumes remain until independently deleted. Stopping alone may leave volume charges. Check your billing page afterward and confirm that no unintended resources are left running. Do not delete a volume containing files needed by other jobs.
Build a realistic first-run budget
Here is a planning example that includes more than inference. Suppose you allow five minutes for connecting and checking the environment, ten minutes for model downloads, ten minutes for generation and five minutes for exporting your files. The following table applies the published RTX 3090 rate to that hypothetical 30-minute session.
| Billable activity | Budgeted time | Estimated compute cost |
|---|---|---|
| Connect and verify environment | 5 min | $0.0417 |
| Install or download model | 10 min | $0.0833 |
| Generate outputs | 10 min | $0.0833 |
| Export results and shut down | 5 min | $0.0417 |
| Compute subtotal | 30 min | $0.2500 |
| 40 GB allocated running disks | 30 min | $0.0027 |
| Estimated total | 30 min | $0.2527 |
In this example, two-thirds of paid compute time is spent outside inference. If you run ten useful outputs in that session, the estimated cost per output is about 2.53 cents; if you produce only one, it is about 25.27 cents. These are budget calculations, not measured outcomes. A stopped 20 GB volume retained for 30 days could add approximately $4 under the documented stopped-volume rate, far more than this short session.
How much setup time can a faster GPU tolerate?
Suppose the 3090 needs 20 minutes of inference and the 4090 does that work twice as quickly. At the quoted rates and ignoring disks, the 4090 saves money only if the shared fixed setup and shutdown overhead is less than about 2.8 minutes. The calculation is 0.50 × (overhead + 20) > 0.89 × (overhead + 10), with all times in minutes. This is why comparing token throughput alone can mislead first-time renters.
Set a budget limit before you deploy
Divide your budget by the combined hourly rate to estimate affordable running time. At $0.50/hour plus the illustrative 40 GB disk charge, a $1 usage budget covers about 119 minutes; at $0.89/hour plus the same disk charge, it covers about 67 minutes. Leave a margin for taxes, retained storage and other charges. Set an independent alarm before the estimated deadline: a calculation is not an automatic spending cap.
After the session, use the provider’s billing records to calculate your actual cost per completed output. Include the charges from failed attempts and idle time if evaluating the economics of a workflow. You can also divide the attributable cost by generated tokens and multiply by one million; do not compare that number directly with an API output-token rate without accounting for input-token charges and differences in model quality.
When a GPU rental stops being the cheapest option
If you only want a handful of answers, a hosted API may be cheaper and simpler. To compare, estimate input tokens times the API’s input price per million, plus output tokens times its output price per million; divide both by one million. Match the actual model and quality requirements where possible. API convenience is not a fair comparison if the service cannot run the specific model or software you need.
If you already own hardware capable of running the model, local inference may avoid a separate rental charge, though electricity, time and hardware cost still count. Estimate local energy cost as average whole-system power in kilowatts multiplied by hours and your electricity rate. For recurring work, compare the amortized hardware cost and maintenance with the cloud’s full utilization-adjusted cost, rather than comparing a purchase price with one hour of rental.
Frequently asked questions
Can I rent a GPU without having a GPU in my computer?
Yes. Your local computer connects to a remote instance through a browser or SSH; the AI computation takes place on the rented hardware.
Is 24 GB of VRAM enough for AI?
It is sufficient for many small-model inference workloads, but the model size, numerical precision, context length, batch size and whether you are training all affect memory requirements.
Do I pay while the GPU is idle?
On an on-demand dedicated Pod, yes, while the GPU remains allocated and billable. An idle Python process does not release the machine. Stopped resources may still incur storage fees.
What happens if my model runs out of memory?
Reduce batch size or context length, consider a compatible quantized model, or choose a GPU with more memory. Stop or terminate unused instances while investigating so you do not accumulate unnecessary charges.
The bottom line
For a first custom AI job, select enough VRAM, prepare your code before renting, and measure the entire billable session. At the public rates used here, the RTX 4090 must finish substantially faster than the RTX 3090 to be cheaper. For an inexpensive first session, the lower hourly rate is a sensible starting point when both GPUs meet your memory requirements. For longer or repeated workloads, choose based on realistic total job time rather than GPU speed alone. Check the live offer, export your work and terminate unused resources.
Featured illustration: Punch5Media editorial artwork; conceptual depiction of a graphics card, not a specific rental instance.
Recent articles
Our editorial approach
Clear explanations, practical guidance and responsible research.





