All API requests to Opper require authentication. We use API keys to authenticate requests.

API Keys

API keys are unique identifiers that grant access to the Opper API. Your API key should be kept secure and should not be shared publicly.

Obtaining an API Key

  1. Log in to your Opper dashboard
  2. Navigate to your account settings
  3. Find the API Keys section
  4. Click “Generate new API key”

Using Your API Key

Include your API key in the header of all API requests:

curl https://api.opper.ai/v1/function-call \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Hello world"}'

Security Best Practices

  • Never expose your API key in client-side code
  • Rotate your API keys periodically
  • Use environment variables to store API keys in your applications
  • Set appropriate permissions for your API keys