Skip to content

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.

ScopeAccessWhen to use it
Token FactoryToken Factory APIsApplications and scripts that call models
Kubernetes execSelected namespaces or all namespaces in your accountLocal kubectl and Kubernetes CI jobs
AllToken Factory APIs and all namespaces in your accountA system that needs both API and Kubernetes access; use separate keys for separate systems

Create an API key in the console

  1. Open Settings / API Keys.
  2. Select Create API key.
  3. Enter a name and choose the scope.
  4. For the Kubernetes exec scope, select the namespaces the key can access.
  5. Set an expiration date if the key is for temporary use.
  6. 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.

SymptomCheckNext step
API returns 401Key value, expiration, and revocationSend the full valid key in the Bearer header
API returns 403Key scopeUse a key that allows the requested API
kubectl cannot refresh credentialsShell or CI environmentExport REMOTEGPU_API_KEY where kubectl runs
kubectl authenticates but cannot access a namespaceKey's namespace scope and kubeconfigUse a key and kubeconfig for the same namespace
Key creation failsName, scope, and expirationCorrect the fields identified by the form's error

RemoteGPU customer documentation