Quickstart

From zero to a working chat completion in about ten minutes. You need an account, which comes with $10 of credit.

1. Create an account and grab a key

Sign up, then go to Settings → API keys and create one. It looks like g4a_live_<30 chars> and is shown once.

2. Check the service is up

$ curl https://api.gpus4all.dev/health
# healthy

3. List the models

$ curl https://api.gpus4all.dev/v1/models \
  -H "Authorization: Bearer g4a_live_xxxx"
# {"object":"list","data":[{"id":"gpus4all/llama-3.1-8b-instruct", ...}]}

4. Make a chat request

$ curl https://api.gpus4all.dev/v1/chat/completions \
  -H "Authorization: Bearer g4a_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpus4all/llama-3.1-8b-instruct",
    "messages": [{"role": "user", "content": "Explain what a GPU is in one sentence."}],
    "max_tokens": 100
  }'

The response is the standard OpenAI shape: an id, a choices array, and usage with token counts. Your spend is shown in the response metadata if you pass stream_options: {"include_usage": true}.

5. Stream it

Add "stream": true and you get text/event-stream chunks in the same format as the reference OpenAI client. Most clients handle this with no code change.

6. Rent a raw instance instead

The same flow works for an instance, from the CLI or the console. A 4090 boots in about four minutes; an H100 in about seven.

Terminal window showing instance launch, model deploy, and a chat completion
The whole flow from the terminal. No setup scripts you have to take on faith.

If you want a shell instead of an endpoint: create an instance in the console, wait for it to boot (a few minutes), and ssh root@<instance-ip>. The default image has CUDA, docker, and git. Delete it when you are done and billing stops.

Common first problems

Next: the API reference.