API keys
Get a key and make a read-only request. Then use the other guides to run a sandbox, continue an agent session, or share files.
1. Get an API key
- Sign in to Helicopter to open API keys. On your first visit, create an account. Use the sign-in provider shown. If the page asks for an invite, open the invite from your workspace owner.
- Select Create API key. Copy the agent key when it appears and store it in your secret manager.
- Expose the key to your script as
HELICOPTER_KEY.
Helicopter shows the key once. Keep the value out of chat, logs, and source control.
2. Check your key
For a local Bash terminal, paste your key at this prompt. Bash hides the input.
read -r -s -p 'Helicopter API key: ' HELICOPTER_KEY
printf '\n'
export HELICOPTER_KEYRun this in the same terminal. The request checks the key without starting a sandbox.
curl -fsS https://helicopter.dev/v1/whoami \
-H "Authorization: Bearer ${HELICOPTER_KEY:?Set your Helicopter API key}"Look for "kind":"agent" in the JSON response.
3. Add a request helper
Define this helper in the same terminal to run the examples in these docs.
heli() (
api_path=$1
shift
curl --fail-with-body -sS -H "Authorization: Bearer ${HELICOPTER_KEY:?Set your Helicopter API key}" \
"$@" "https://helicopter.dev$api_path"
)
heli /v1/cellsGET /v1/cells lists the sandboxes you can use. Find request and response schemas in the OpenAPI JSON and the searchable reference. Both are public.
Which key does what
Use the agent key for sandbox operations and Drive. Check x-auth in the reference for each route. Project uploads, chat moves, key management, and approvals use a signed-in browser or a human key where the route allows it. The CLI obtains its own credential when you approve the sign-in link. A cell key is issued to a running cell and has its own scope.
Replace a key
To replace a key, create a new key, update the secret in your scripts, and revoke the old key from API keys.
Next: run your first sandbox.