docs/en/platform/account/api-keys.md
Ultralytics Platform API keys enable secure programmatic access for remote training, inference, and automation. Create named keys with AES-256-GCM encryption for different use cases.
Create a new API key:
Give your key a descriptive name:
training-server - For remote training machinesci-pipeline - For CI/CD integrationlocal-dev - For local developmentAfter creation, the key is displayed once:
!!! tip "Copy Your Key"
Copy your key after creation for easy reference. Keys are also visible in the key list — the platform decrypts and displays full key values so you can copy them anytime.
API keys follow this format:
ul_a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4
ul_ identifies Ultralytics keysSet your key as an environment variable:
=== "Linux/macOS"
```bash
export ULTRALYTICS_API_KEY="YOUR_API_KEY"
```
=== "Windows"
```powershell
$env:ULTRALYTICS_API_KEY = "YOUR_API_KEY"
```
Set the key using the YOLO CLI:
yolo settings api_key="YOUR_API_KEY"
Use the key in your Python scripts:
import os
# From environment (recommended)
api_key = os.environ.get("ULTRALYTICS_API_KEY")
# Or directly (not recommended for production)
api_key = "YOUR_API_KEY"
Include the key in API requests:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://platform.ultralytics.com/api/...
See the REST API Reference for all available endpoints.
Enable metric streaming with your key.
!!! warning "Package Version Requirement"
Platform integration requires **ultralytics>=8.4.35**. Lower versions will NOT work with Platform.
```bash
pip install "ultralytics>=8.4.35"
```
export ULTRALYTICS_API_KEY="YOUR_API_KEY"
yolo train model=yolo26n.pt data=coco.yaml project=username/project name=exp1
See Cloud Training for the complete remote training guide.
All keys are listed on the Settings > API Keys tab:
Each key card shows the key name, the full decrypted key value (copyable), relative creation time, and a revoke button.
Revoke a key that's compromised or no longer needed:
!!! warning "Immediate Effect"
Revocation is immediate. Any applications using the key will stop working.
If a key is compromised:
API keys are scoped to the currently active workspace:
When switching workspaces in the sidebar, the API Keys section shows keys for that workspace. Editor role or higher is required to manage workspace API keys. See Teams for role details.
Rotate keys periodically for security:
!!! tip "Rotation Schedule"
Consider rotating keys every 90 days for sensitive applications.
Error: Invalid API key
Solutions:
ul_ prefix)ultralytics>=8.4.35Error: Permission denied for this operation
Solutions:
Error: Rate limit exceeded
Solutions:
Retry-After headerThere's no hard limit on API keys. Create as many as needed for different applications and environments.
Keys don't expire automatically. They remain valid until revoked. Consider implementing rotation for security.
Yes, full key values are visible in the key list on Settings > API Keys. The Platform decrypts and displays your keys so you can copy them anytime.
Keys work across regions but access data in your account's region only.
Better practice: Have each team member create their own key. For team workspaces, each member with Editor role or higher can create keys scoped to that workspace.