Skip to content

Non-Technical Onboarding (API Key Workflow)

This path is for users who call the GammaEdge API but do not work in the GammaEdge codebase.

You do not need to be a programmer for this setup. Everything you need is on this page. No downloads required.

5-minute checklist

  1. Generate your API key in the API tab of the web app.
  2. Choose any one setup method below, then save it as GAMMAEDGE_API_KEY.
  3. Confirm the key starts with sk_.
  4. Run one test request and confirm you get JSON back.

1. Generate your API key

  1. Claim the API role. Open the GammaEdge API page on Whop, pick your Discord account (or connect one) and click Claim Access. API access comes with GammaEdge Ultra.
  2. Sign in to the web app at app.gammaedge.us with the same Discord account. The first time, accept the GammaEdge EULA. You need to accept it before you can create a key.
  3. Open the API tab (app.gammaedge.us/SPX?tab=api) and click Generate my API key.

    Web app navigation bar with the API tab highlighted

    API tab with the Generate my API key button highlighted 4. Copy the sk_ key immediately. It is shown once.

    API tab showing an example key, the Copy button and I've saved it

Your API key is the sk_... value shown in the API tab, and nothing else. Send it exactly as copied, with nothing added before or after it.

2. Save your key so requests can use it

The key must be stored in an environment variable named GAMMAEDGE_API_KEY so requests do not fail with an empty key.

Choose any one persistent method below to save your key permanently. A session-only Jupyter option is also available if you only need the key inside one notebook.

None of the steps below display or store your full key on screen or in your shell history — only masked confirmation is shown.

  1. Press the Windows key and type: environment variables.
  2. Click Edit the system environment variables.
  3. In the System Properties window, click Environment Variables...
  4. In the top box (User variables for ...), click New...
  5. Set:
  6. Variable name: GAMMAEDGE_API_KEY
  7. Variable value: your full sk_... key
  8. Click OK on all windows to save.
  9. Close any open Command Prompt windows.
  10. Open a new Command Prompt and run:
echo %GAMMAEDGE_API_KEY:~0,3%

Setup is complete if it prints sk_.

Windows manual path (Command Prompt)

Prefer the Settings path above if you can

setx briefly displays the key on screen as you type/paste it and while the command runs. If your screen might be shared, recorded, or visible to others, use the Settings screens path instead — the key never appears on screen there.

  1. Open Command Prompt.
  2. Run, replacing the placeholder with your real key:
setx GAMMAEDGE_API_KEY "sk_your_key_here"
  1. Close Command Prompt and open a new Command Prompt window.
  2. Verify — this only prints the first 3 characters, never the full key:

    echo %GAMMAEDGE_API_KEY:~0,3%

If it prints sk_ (and is not blank), setup is complete.

macOS / Linux manual path (Terminal)

For current terminal only, read the key without echoing it to the screen or writing it to your shell history:

read -rs GAMMAEDGE_API_KEY
export GAMMAEDGE_API_KEY

Paste your key at the prompt (nothing will appear on screen) and press Enter.

To persist for future terminals, add it to your shell's profile file. Use read -rs again so the key is never echoed or saved to your command history:

read -rs KEY && printf 'export GAMMAEDGE_API_KEY=%s\n' "$KEY" >> ~/.zshrc

Use the profile file that matches your OS and shell — using the wrong one means the key won't be available in new terminal windows:

OS + shell Profile file
macOS, zsh (default since Catalina) ~/.zshrc
macOS, bash ~/.bash_profile
Linux, bash ~/.bashrc
Linux, zsh ~/.zshrc

Not sure which shell you're using? Run echo $SHELL.

Then reload your shell and verify — this only prints the first 3 characters, never the full key:

source ~/.zshrc   # use the same profile file you wrote to above
echo "${GAMMAEDGE_API_KEY:0:3}"

If it prints sk_ (and is not blank), setup is complete.

Session-only: Jupyter path (copy/paste)

Session-only — not a persistent save

This sets the key only for the current Jupyter kernel. It is lost when you restart the kernel, and it is not available to a terminal or curl outside this notebook. For a permanent setup, use one of the persistent methods above instead.

In a Jupyter cell, run:

import getpass
import os
os.environ["GAMMAEDGE_API_KEY"] = getpass.getpass("GammaEdge API key: ")
print(os.environ["GAMMAEDGE_API_KEY"][:3])

Setup is complete if it prints sk_.

3. Make your first request

You run the request by pasting one line into a command window on your computer.

  1. Press the Windows key, type cmd, and press Enter. A black window opens: this is Command Prompt. (Use Command Prompt, not PowerShell; the line below is written for Command Prompt.)
  2. Copy this line, paste it into the window (Ctrl+V or right-click), and press Enter:

    curl -s https://api.gammaedge.us/v1/summary/SPX -H "X-API-Key: %GAMMAEDGE_API_KEY%"
    
  1. Press Cmd+Space, type Terminal, and press Return. A window opens: this is Terminal.
  2. Copy this line, paste it into the window (Cmd+V), and press Return:

    curl -s https://api.gammaedge.us/v1/summary/SPX -H "X-API-Key: $GAMMAEDGE_API_KEY"
    

Open a terminal, paste this line, and press Enter:

curl -s https://api.gammaedge.us/v1/summary/SPX -H "X-API-Key: $GAMMAEDGE_API_KEY"

The Windows and Mac lines differ only in how the key is written: %GAMMAEDGE_API_KEY% on Windows, $GAMMAEDGE_API_KEY on Mac and Linux.

It worked if you see a long line of text that starts with {"status":"completed","ticker":"SPX". That is the SPX summary as JSON.

If you see "Your API key is missing or invalid":

  • Close the window and open a new one, then try again. A window that was already open when you saved your key can't see it.
  • Check that the key is saved: run the check from Save your key; it should print sk_.
  • On Windows, make sure you used the Windows line (%GAMMAEDGE_API_KEY%).

Or let an AI agent call it for you

You don't need to write or run any command yourself. Use an AI coding agent that can execute commands in your terminal — for example Claude Code, GitHub Copilot (agent mode), Cursor, or ChatGPT with code execution enabled — and let it figure out the request from the docs.

Ask the AI to call the API

Paste this prompt as-is:

I have an environment variable named GAMMAEDGE_API_KEY already set in my terminal. Read the GammaEdge API docs at https://docs.gammaedge.com/ and give me the summary for SPX

A capable AI agent will look up the right endpoint, run the request in your terminal using your GAMMAEDGE_API_KEY environment variable, and paste back the summary it received — you don't need to type or copy anything.

If your AI tool can only suggest commands rather than run them (for example, a plain chat window with no code execution), ask it to run the request itself first; if it truly can't, it should give you a single command that references $GAMMAEDGE_API_KEY (macOS/Linux) or %GAMMAEDGE_API_KEY% (Windows) by name for you to run — never one with the key value spelled out.

Keep your key safe while using AI agents

‼️ Never let your real API key appear in a chat

  • Only ever mention the environment variable name (GAMMAEDGE_API_KEY) in your prompt — never paste the sk_... value itself into Claude, ChatGPT, Copilot, or any other AI tool.
  • Anything you send to a hosted AI tool may be stored by that provider.
  • Check the AI's response before trusting it: it should show a JSON result, not your key. If a literal sk_... string ever appears in the AI's output or in a command it suggests, treat that key as exposed — regenerate it immediately.

4. If authentication fails

  • Confirm the header is exactly X-API-Key.
  • Confirm the header holds only your sk_... key, exactly as copied, with nothing added.
  • Confirm the variable is not empty (your check step should show sk_).
  • If you regenerated your key, update the variable to the new value.

For details, see Authentication.

5. Validate usage and continue

6. Safety checklist

  • Keep keys in secure storage.
  • Never put keys in source control.
  • Rotate keys immediately if exposure is suspected.