Appearance
API keys
Use an API key to call Token Factory APIs or access Kubernetes with kubectl. If you only use the console, sign in with your account; you do not need an API key.
Choose the right scope
A key's scope determines which services it can access. Choose the scope that gives your application the access it needs.
| Scope | Access | When to use it |
|---|---|---|
Token Factory | Token Factory APIs | Applications and scripts that call models |
Kubernetes exec | Selected namespaces or all namespaces in your account | Local kubectl and Kubernetes CI jobs |
All | Token Factory APIs and all namespaces in your account | A system that needs both API and Kubernetes access; use separate keys for separate systems |
Create an API key in the console
- Open Settings / API Keys.
- Select Create API key.
- Enter a name and choose the scope.
- For the Kubernetes exec scope, select the namespaces the key can access.
- Set an expiration date if the key is for temporary use.
- Create the key and copy it to your secret manager or the environment where your application runs.
Copy the key before leaving this screen. You can only see its full value when you create it; afterward, the console shows just the beginning of the key.
Use a key
Send the key in the Authorization: Bearer <api-key> header.
bash
curl -X POST "https://inference.remotegpu.ai/v1/inference/image" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"prompt": "YOUR_PROMPT",
"model": "black-forest-labs/FLUX.1-dev"
}'Replace YOUR_API_KEY with your key and YOUR_PROMPT with the image description. This image request returns a job ID. Follow Image to check the job and download the result, or vLLM to send a text request.
Protect your keys
- Use separate keys for separate systems so you can revoke access independently.
- Scope Kubernetes keys to the namespaces each system needs.
- Set an expiration for temporary automation.
- Revoke leaked or unused keys in Settings / API Keys.
Troubleshooting
Use the error or symptom to choose the next step.
| Symptom | Check | Next step |
|---|---|---|
API returns 401 | Key value, expiration, and revocation | Send the full valid key in the Bearer header |
API returns 403 | Key scope | Use a key that allows the requested API |
kubectl cannot refresh credentials | Shell or CI environment | Export REMOTEGPU_API_KEY where kubectl runs |
kubectl authenticates but cannot access a namespace | Key's namespace scope and kubeconfig | Use a key and kubeconfig for the same namespace |
| Key creation fails | Name, scope, and expiration | Correct the fields identified by the form's error |
Read next
- Read BytePlus to generate videos with a Token Factory key.
- Read vLLM or Image to use a Token Factory key.
- Read Kubernetes overview to use a Kubernetes exec key with
kubectl.