Authentication

API key authentication

All API requests require authentication using an API key. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY
Keep your API key secret. Do not share it publicly or commit it to version control.

Getting your API key

  1. Create an account or log in on SynGen
  2. Navigate to your profile page
  3. Your API key is displayed in the "API key" section
  4. Click "Copy" to copy it to your clipboard
Log in to view your API key.

Example request

# Using curl $ curl -X POST http://localhost:8000/generate \ -H "Authorization: Bearer sk_live_abc123..." \ -H "Content-Type: application/json" \ -d '{"rows": 10, "format": "json", "fields": [...]}' # Using Python import requests headers = { "Authorization": "Bearer sk_live_abc123...", "Content-Type": "application/json" } response = requests.post( "http://localhost:8000/generate", headers=headers, json={"rows": 10, "format": "json", "fields": [...]} )

Error responses

Status Error Description
401 Unauthorized Missing or invalid API key
403 Forbidden API key is valid but lacks permission
429 Rate limited Daily limit of 1,000 requests exceeded (resets at midnight UTC)