Menu
View Categories

Authentication

The Slapshot API authenticates requests with an API key. Include your key in the x-api-key header of every request. Requests without a valid key are rejected.

HEADERx-api-key: YOUR_API_KEY

Getting an API key

API keys are issued by Slapshot. If you don’t have one yet, contact support@slapshot.ai.

Making an authenticated request

export SLAPSHOT_API_KEY="your_api_key"

curl "https://autopilot.slapshot.ai/api/jobs" \
  -H "x-api-key: $SLAPSHOT_API_KEY"

Using a requests.Session sends the header automatically on every call and reuses the connection.

Keeping your key secure

  • Treat your API key like a password. Anyone with the key can create and cancel jobs on your account.
  • Load the key from an environment variable or a secrets manager. Don’t hard-code it or commit it to source control.
  • Only call the API from server-side code. Never ship the key in a browser, mobile app or DCC plugin that end users can inspect.
  • If you think a key has been exposed, contact support@slapshot.ai to have it replaced.