Skip to content

Authentication

The Auto Content Engine API supports two authentication methods:

MethodHeaderUse case
API Key (recommended)X-API-Key: your_keyServer-side scripts, automation, CI/CD, MCP integrations
JWT Bearer TokenAuthorization: Bearer <token>Frontend apps using Clerk/Dynamic auth

For most integrations, use an API key. JWTs are primarily for the GEN web app and authenticated frontends.

  1. Sign in to GEN

    Go to gen.pro and sign in to your account.

  2. Navigate to API Keys

    Open Settings > API Keys from the sidebar.

  3. Create a key

    Click Create API Key. Give it a descriptive name (e.g., n8n-production or claude-code).

  4. Copy the key

    Your key is displayed once. Copy it immediately and store it somewhere secure.

    gen_pat_a1b2c3d4e5f6...

Pass the key in the X-API-Key header on every request:

Terminal window
curl https://api.gen.pro/v1/me \
-H "X-API-Key: $GEN_API_KEY"

A successful response confirms your key is valid:

{
"id": "user_abc123",
"email": "you@example.com",
"name": "Your Name"
}

You can list, rename, and revoke keys through the API itself:

Terminal window
# List all your keys
curl https://api.gen.pro/v1/personal_access_tokens \
-H "X-API-Key: $GEN_API_KEY"
# Rename a key
curl -X PATCH https://api.gen.pro/v1/personal_access_tokens/{token_id} \
-H "X-API-Key: $GEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "new-name"}'
# Revoke a key
curl -X DELETE https://api.gen.pro/v1/personal_access_tokens/{token_id} \
-H "X-API-Key: $GEN_API_KEY"
  • Never commit keys to source control. Use environment variables or a secrets manager.
  • Use separate keys per integration. Create one key for n8n, another for Claude Code, etc. If one is compromised, revoke it without disrupting others.
  • Rotate keys regularly. Create a new key, update your integrations, then revoke the old one.
  • Restrict access. Only share keys with people and systems that need them.
Terminal window
# Store your key in an environment variable
export GEN_API_KEY="gen_pat_a1b2c3d4e5f6..."
# Or use a .env file (make sure it's in .gitignore)
echo "GEN_API_KEY=gen_pat_a1b2c3d4e5f6..." >> .env