Skip to content

Use your API key

Your rental comes with an API key that starts with gfk_. It works exactly like an OpenAI API key, only it points at the GPU you rented. Anything that can talk to the OpenAI API can use it: the official OpenAI libraries, LangChain, most chat apps, or a plain curl command.

You need three things. You’ll find all of them on Dashboard → Current Rentals.

WhatValue
Base URL (also called endpoint or API base)https://gpuflow.app/v1
API keyyour key, starting with gfk_
Modelthe AI model on that GPU, for example qwen2.5:7b (step 1 shows how to find it)

In the examples below, replace gfk_your_key with your own key.

Paste this into a terminal:

Terminal window
curl https://gpuflow.app/v1/models \
-H "Authorization: Bearer gfk_your_key"

You get an answer like this:

{
"object": "list",
"data": [{ "id": "qwen2.5:7b", "object": "model", "owned_by": "gpuflow" }]
}

The id (here qwen2.5:7b) is the model name to use. If the provider’s description lists more models, you can use those names too.

Terminal window
curl https://gpuflow.app/v1/chat/completions \
-H "Authorization: Bearer gfk_your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen2.5:7b",
"messages": [
{"role": "system", "content": "You are a helpful assistant. Answer briefly."},
{"role": "user", "content": "Write a two-line product description for a steel water bottle."}
]
}'

3. Get the answer word by word (streaming)

Section titled “3. Get the answer word by word (streaming)”

Add "stream": true to see the answer appear as it is written, like in a chat app.

Terminal window
curl https://gpuflow.app/v1/chat/completions \
-H "Authorization: Bearer gfk_your_key" \
-H "Content-Type: application/json" \
-d '{"model": "qwen2.5:7b", "stream": true,
"messages": [{"role": "user", "content": "Explain what a GPU is in three sentences."}]}'

Many apps have a setting called “OpenAI-compatible”, “Custom OpenAI” or “OpenAI API base”. Fill it in like this:

  1. Base URL / API base / endpoint: https://gpuflow.app/v1
  2. API key: your gfk_… key
  3. Model: the name from step 1, for example qwen2.5:7b

If the app asks for a “provider”, pick “OpenAI” or “OpenAI-compatible”.

  • It works for chat: /v1/models and /v1/chat/completions.
  • It works until your rental ends. After that it answers with invalid_api_key.
  • It is yours alone. Anyone who has it can use your rental, so don’t paste it into public code or chats. If it leaks, click New key on Current Rentals. The old key stops working at once.

Something not working? See fix a problem.